MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
couplerlbfv.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef COUPLERLBFV_H_
8#define COUPLERLBFV_H_
9
10#include <algorithm>
12#include "LB/lbbndcnd.h"
13#include "LB/lbbndcnddxqy.h"
14#include "LB/lbcellcollector.h"
15#include "LB/lbcellproperties.h"
17#include "LB/lbsolver.h"
18#include "LB/lbsolverdxqy.h"
19#include "UTIL/pointbox.h"
20#include "enums.h"
21#include "solver.h"
22
23#include "coupling.h"
24#include "couplingutils.h"
25
26template <MInt nDim, MInt nDist, class SysEqn>
27class LbSolverDxQy;
28template <MInt nDim, MInt nDist, class SysEqn>
29class LbBndCndDxQy;
30
31template <class SysEqn>
33template <class SysEqn>
35
36template <MInt nDim, MInt nDist, class SysEqn>
37class CouplingLB;
38template <MInt nDim, class SysEqn>
39class CouplingFv;
40
41
42template <MInt nDim, MInt nDist, class SysEqnLb, class SysEqnFv>
43class CouplerLbFv : public CouplingFv<nDim, SysEqnFv>, public CouplingLB<nDim, nDist, SysEqnLb> {
44 private:
45 friend class LbSolverDxQy<nDim, nDist, SysEqnLb>;
46 friend class LbBndCndDxQy<nDim, nDist, SysEqnLb>;
47 friend class FvCartesianSolverXD<nDim, SysEqnFv>;
48
49 public:
50 // Simplifications
53
56
57 using BaseLb::lbBndCnd;
58
60
61 // Constructor
62 CouplerLbFv(const MInt couplingId, LbSolver* lb, FvCartesianSolver* fv);
63
64 private:
67
72
73 protected:
79 using BaseLb::lbSolver;
80 using BaseLb::minCell;
82
84 using BaseFv::fvSolver;
85
86 //--------------------------------- functions ------------------------------------------------------
87
88 private:
89 void initData();
90
91 void cleanUp() override{};
92
93 // Conversion-Factors
99 };
100
101
102 public:
105
106 virtual void init(){};
107 virtual void initConversionFactors();
109 virtual void finalizeCouplerInit(){};
111 virtual void subCouple(MInt, MInt, std::vector<MBool>&){};
112 virtual void checkProperties();
113 virtual void readProperties();
114
115 MInt fv2lbId(const MInt fvId) const { return convertId(fvSolver(), lbSolver(), fvId); };
116 MInt lb2fvId(const MInt lbId) const { return convertId(lbSolver(), fvSolver(), lbId); };
117
119
120 MInt a_fvSolverId() const { return m_fvSolverId; }
121 MInt a_lbSolverId() const { return m_lbSolverId; }
122};
123
124#endif // ifndef COUPLERLBFV_H_
GridCell
Grid cell Property Labels.
virtual void initConversionFactors()
Definition: couplerlbfv.cpp:31
virtual void finalizeSubCoupleInit(MInt)
Definition: couplerlbfv.h:110
MInt a_lbSolverId() const
Definition: couplerlbfv.h:121
virtual void finalizeCouplerInit()
Definition: couplerlbfv.h:109
MInt lb2fvId(const MInt lbId) const
Definition: couplerlbfv.h:116
MInt m_fvSolverId
Definition: couplerlbfv.h:66
MInt m_lbSolverId
Definition: couplerlbfv.h:65
MString m_solverMethod
Definition: couplerlbfv.h:71
ConversionFactors conversionLbFv
Definition: couplerlbfv.h:103
ConversionFactors conversionFvLb
Definition: couplerlbfv.h:104
void postCouple(MInt)
Definition: couplerlbfv.h:108
void cleanUp() override
Definition: couplerlbfv.h:91
virtual void subCouple(MInt, MInt, std::vector< MBool > &)
Definition: couplerlbfv.h:111
MInt a_fvSolverId() const
Definition: couplerlbfv.h:120
virtual void checkProperties()
Definition: couplerlbfv.cpp:69
MFloat m_maxVelocity
Definition: couplerlbfv.h:69
void testCoupling()
typename maia::grid::tree::Tree< nDim >::Cell Cell
Definition: couplerlbfv.h:59
void initData()
Definition: couplerlbfv.cpp:63
MInt m_timeStepMethod
Definition: couplerlbfv.h:70
MInt fv2lbId(const MInt fvId) const
Definition: couplerlbfv.h:115
virtual void readProperties()
Definition: couplerlbfv.cpp:72
MFloat m_cfl
Definition: couplerlbfv.h:68
virtual void init()
Definition: couplerlbfv.h:106
MInt a_noFvGridCells() const
Definition: coupling.h:392
solverType & fvSolver(const MInt solverId=0) const
Definition: coupling.h:386
MFloat a_cellLengthAtLevel(MInt level, const MInt id=0)
Definition: coupling.h:518
solverType & lbSolver(const MInt solverId=0) const
Definition: coupling.h:454
MInt a_childId(const MInt cellId, const MInt child, const MInt id=0)
Definition: coupling.h:508
MInt a_noCells(const MInt id=0) const
Definition: coupling.h:516
LbBndCnd & lbBndCnd(const MInt id=0)
Definition: coupling.h:461
MInt noMinCells(const MInt id=0) const
Definition: coupling.h:514
MInt a_noLbCells(const MInt id=0) const
Definition: coupling.h:470
MInt a_parentId(const MInt cellId, const MInt id=0)
Definition: coupling.h:506
MInt minCell(const MInt index, const MInt id=0) const
Definition: coupling.h:512
This class represents all LB models.
Definition: lbsolverdxqy.h:29
MInt convertId(SolverA &solverA, SolverB &solverB, const MInt solverAId)
Conversion from solverA id to the solverB id on the same-level only!
Definition: couplingutils.h:21
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55
double MFloat
Definition: maiatypes.h:52