MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
CouplerLbLb< nDim, nDist, SysEqn > Class Template Reference

#include <couplerlblb.h>

Inheritance diagram for CouplerLbLb< nDim, nDist, SysEqn >:
[legend]
Collaboration diagram for CouplerLbLb< nDim, nDist, SysEqn >:
[legend]

Public Types

using LbSolver = LbSolverDxQy< nDim, nDist, SysEqn >
 
using Cell = typename maia::grid::tree::Tree< nDim >::Cell
 
using Base = CouplingLB< nDim, nDist, SysEqn >
 
- Public Types inherited from CouplingLB< nDim, nDist, SysEqn >
using solverType = LbSolverDxQy< nDim, nDist, SysEqn >
 
using LbBndCnd = LbBndCndDxQy< nDim, nDist, SysEqn >
 
using MbCellCollector = maia::lb::collector::LbMbCellCollector< nDim >
 

Public Member Functions

 CouplerLbLb (const MInt couplingId, std::vector< LbSolver * > solvers)
 
 ~CouplerLbLb ()
 
virtual void init ()
 
virtual void checkProperties ()
 
virtual void preCouple (MInt)
 
virtual void postCouple (MInt)
 
virtual void finalizeCouplerInit ()
 
virtual void finalizeSubCoupleInit (MInt)
 
virtual void subCouple (MInt, MInt, std::vector< MBool > &)
 
virtual void readProperties ()
 
void testCoupling ()
 
- Public Member Functions inherited from CouplingLB< nDim, nDist, SysEqn >
 CouplingLB (const MInt couplingId, Solver *solvers, const MInt noSolvers=1)
 
 CouplingLB (const MInt couplingId, std::vector< solverType * > solvers)
 
MFloat a_physicalTime () const
 
MFloat lsTimeStep () const
 
MInt a_RKStep () const
 
MInt a_noLbCells (const MInt id=0) const
 
MInt a_noLevelSetsMb (const MInt id=0) const
 
MFloat a_Ma (const MInt id=0) const
 
MFloat a_Re (const MInt id=0) const
 
MInt a_pvu (const MInt id=0) const
 
MInt a_pvv (const MInt id=0) const
 
MInt a_pvw (const MInt id=0) const
 
MInt a_pvrho (const MInt id=0) const
 
MInt a_pvt (const MInt id=0) const
 
MInt a_isThermal (const MInt id=0) const
 
MInt a_noDistributions (const MInt id=0) const
 
MFloat a_initTemperatureKelvin (const MInt id=0) const
 
MFloat a_time () const
 
MbCellCollectora_mbCell (const MInt id=0)
 
MInt a_boundaryCellMb (const MInt cellId, const MInt id=0)
 
MFloata_levelSetFunctionMb (const MInt cellId, const MInt set, const MInt id=0)
 
MFloat a_levelSetFunctionMb (const MInt cellId, const MInt set, const MInt id=0) const
 
MInta_associatedBodyIdsMb (const MInt cellId, const MInt set, const MInt id=0)
 
MInt a_associatedBodyIdsMb (const MInt cellId, const MInt set, const MInt id=0) const
 
MInt a_parentId (const MInt cellId, const MInt id=0)
 
MInt a_childId (const MInt cellId, const MInt child, const MInt id=0)
 
MInt minCell (const MInt index, const MInt id=0) const
 
MInt noMinCells (const MInt id=0) const
 
MInt a_noCells (const MInt id=0) const
 
MFloat a_cellLengthAtLevel (MInt level, const MInt id=0)
 
MInt a_noEmbeddedBodiesLB (const MInt id=0) const
 
MBool a_isActive (const MInt cellId, const MInt id=0) const
 
MBool a_wasActive (const MInt cellId, const MInt id=0) const
 
MInt a_noVariables (const MInt id=0) const
 
MFloata_variable (const MInt cellId, const MInt varId, const MInt id=0)
 
MFloata_oldVariable (const MInt cellId, const MInt varId, const MInt id=0)
 
MInt a_bndCellId (const MInt bndCell, const MInt id=0)
 
MInt a_noBndCells (const MInt id=0)
 
- Public Member Functions inherited from Coupling
 Coupling (const MInt couplingId)
 
virtual ~Coupling ()=default
 
 Coupling (const Coupling &)=delete
 
Couplingoperator= (const Coupling &)=delete
 
MInt couplerId () const
 
virtual void init ()=0
 
virtual void finalizeSubCoupleInit (MInt solverId)=0
 
virtual void finalizeCouplerInit ()=0
 
virtual void preCouple (MInt recipeStep)=0
 
virtual void subCouple (MInt recipeStep, MInt solverId, std::vector< MBool > &solverCompleted)=0
 
virtual void postCouple (MInt recipeStep)=0
 
virtual void cleanUp ()=0
 
virtual void balancePre ()
 Load balancing. More...
 
virtual void balancePost ()
 
virtual void reinitAfterBalance ()
 
virtual void prepareAdaptation ()
 
virtual void postAdaptation ()
 
virtual void finalizeAdaptation (const MInt)
 
virtual void writeRestartFile (const MInt)
 
virtual MInt noCellDataDlb () const
 Methods to inquire coupler data during balancing. More...
 
virtual MInt cellDataTypeDlb (const MInt NotUsed(dataId)) const
 
virtual MInt cellDataSizeDlb (const MInt NotUsed(dataId), const MInt NotUsed(cellId))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MInt *const NotUsed(data))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MLong *const NotUsed(data))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MFloat *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MInt *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MLong *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MFloat *const NotUsed(data))
 
virtual void finalizeBalance (const MInt)
 
virtual MInt noCouplingTimers (const MBool NotUsed(allTimings)) const
 Number of coupling timers. More...
 
virtual void getCouplingTimings (std::vector< std::pair< MString, MFloat > > &NotUsed(timings), const MBool NotUsed(allTimings))
 Return coupling timings. More...
 
virtual void getDomainDecompositionInformation (std::vector< std::pair< MString, MInt > > &NotUsed(domainInfo))
 Return information on current domain decomposition (e.g. number of coupled cells/elements/...) More...
 
void setDlbTimer (const MInt timerId)
 
void startLoadTimer (const MString &name) const
 Start the load timer of the coupler. More...
 
void stopLoadTimer (const MString &name) const
 Stop the load timer of the coupler. More...
 

Protected Member Functions

MFloat a_cellLengthAtLevel (MInt level, const MInt id=0)
 
MInt a_childId (const MInt cellId, const MInt child, const MInt id=0)
 
MInt a_noCells (const MInt id=0) const
 
MInt a_noLbCells (const MInt id=0) const
 
MInt a_parentId (const MInt cellId, const MInt id=0)
 
solverTypelbSolver (const MInt solverId=0) const
 
MInt minCell (const MInt index, const MInt id=0) const
 
MInt noMinCells (const MInt id=0) const
 
- Protected Member Functions inherited from CouplingLB< nDim, nDist, SysEqn >
MInt noSolvers () const
 
solverTypelbSolver (const MInt solverId=0) const
 
LbBndCndlbBndCnd (const MInt id=0)
 
- Protected Member Functions inherited from Coupling
MFloat returnLoadRecord () const
 
MFloat returnIdleRecord () const
 

Private Member Functions

void initData ()
 
void cleanUp () override
 
LbSolversourceSolver () const
 
LbSolverdestSolver () const
 
MInt source2DestId (const MInt sourceId) const
 
MInt dest2SourceId (const MInt destId) const
 

Private Attributes

MInt m_sourceSolverId {}
 
MInt m_destSolverId {}
 
std::array< MFloat, 2 *nDim > m_transferBox {}
 
std::vector< MIntm_transferCellIds
 
MInt m_noVarsTransfer {}
 
MFloat ** m_sourceBaseAddresses = nullptr
 
MFloat ** m_destBaseAddresses = nullptr
 
MIntm_dataBlockSizes = nullptr
 

Friends

class LbSolverDxQy< nDim, nDist, SysEqn >
 
class LbBndCndDxQy< nDim, nDist, SysEqn >
 

Detailed Description

template<MInt nDim, MInt nDist, class SysEqn>
class CouplerLbLb< nDim, nDist, SysEqn >

Definition at line 37 of file couplerlblb.h.

Member Typedef Documentation

◆ Base

template<MInt nDim, MInt nDist, class SysEqn >
using CouplerLbLb< nDim, nDist, SysEqn >::Base = CouplingLB<nDim, nDist, SysEqn>

Definition at line 48 of file couplerlblb.h.

◆ Cell

template<MInt nDim, MInt nDist, class SysEqn >
using CouplerLbLb< nDim, nDist, SysEqn >::Cell = typename maia::grid::tree::Tree<nDim>::Cell

Definition at line 46 of file couplerlblb.h.

◆ LbSolver

template<MInt nDim, MInt nDist, class SysEqn >
using CouplerLbLb< nDim, nDist, SysEqn >::LbSolver = LbSolverDxQy<nDim, nDist, SysEqn>

Definition at line 44 of file couplerlblb.h.

Constructor & Destructor Documentation

◆ CouplerLbLb()

template<MInt nDim, MInt nDist, class SysEqn >
CouplerLbLb< nDim, nDist, SysEqn >::CouplerLbLb ( const MInt  couplingId,
std::vector< LbSolver * >  solvers 
)

Definition at line 11 of file couplerlblb.cpp.

12 : Coupling(couplingId), CouplingLB<nDim, nDist, SysEqn>(couplingId, solvers) {
13 initData();
15}
void initData()
Definition: couplerlblb.cpp:25
virtual void readProperties()
MInt * solvers
Definition: maiatypes.h:72

◆ ~CouplerLbLb()

template<MInt nDim, MInt nDist, class SysEqn >
CouplerLbLb< nDim, nDist, SysEqn >::~CouplerLbLb

Definition at line 18 of file couplerlblb.cpp.

18 {
22}
MBool mDeallocate(T *&a)
deallocates the memory previously allocated for element 'a'
Definition: alloc.h:544
MInt * m_dataBlockSizes
Definition: couplerlblb.h:63
MFloat ** m_sourceBaseAddresses
Definition: couplerlblb.h:61
MFloat ** m_destBaseAddresses
Definition: couplerlblb.h:62

Member Function Documentation

◆ a_cellLengthAtLevel()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::a_cellLengthAtLevel ( MInt  level,
const MInt  id = 0 
)
inlineprotected

Definition at line 518 of file coupling.h.

518{ return lbSolver(id).grid().cellLengthAtLevel(level); }
solverType & lbSolver(const MInt solverId=0) const
Definition: coupling.h:454

◆ a_childId()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::a_childId ( const MInt  cellId,
const MInt  child,
const MInt  id = 0 
)
inlineprotected

Definition at line 508 of file coupling.h.

508 {
509 return lbSolver(id).c_childId(cellId, child);
510 }

◆ a_noCells()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::a_noCells ( const MInt  id = 0) const
inlineprotected

Definition at line 516 of file coupling.h.

516{ return lbSolver(id).grid().noCells(); }

◆ a_noLbCells()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::a_noLbCells ( const MInt  id = 0) const
inlineprotected

Definition at line 470 of file coupling.h.

470{ return lbSolver(id).a_noCells(); }

◆ a_parentId()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::a_parentId ( const MInt  cellId,
const MInt  id = 0 
)
inlineprotected

Definition at line 506 of file coupling.h.

506{ return lbSolver(id).c_parentId(cellId); }

◆ checkProperties()

template<MInt nDim, MInt nDist, class SysEqn >
virtual void CouplerLbLb< nDim, nDist, SysEqn >::checkProperties ( )
inlinevirtual

Implements Coupling.

Definition at line 90 of file couplerlblb.h.

90{};

◆ cleanUp()

template<MInt nDim, MInt nDist, class SysEqn >
void CouplerLbLb< nDim, nDist, SysEqn >::cleanUp ( )
inlineoverrideprivatevirtual

Implements Coupling.

Definition at line 80 of file couplerlblb.h.

80{};

◆ dest2SourceId()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplerLbLb< nDim, nDist, SysEqn >::dest2SourceId ( const MInt  destId) const
inlineprivate

Definition at line 86 of file couplerlblb.h.

86{ return convertId(destSolver(), sourceSolver(), destId); };
LbSolver & destSolver() const
Definition: couplerlblb.h:83
LbSolver & sourceSolver() const
Definition: couplerlblb.h:82
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

◆ destSolver()

template<MInt nDim, MInt nDist, class SysEqn >
LbSolver & CouplerLbLb< nDim, nDist, SysEqn >::destSolver ( ) const
inlineprivate

Definition at line 83 of file couplerlblb.h.

83{ return lbSolver(1); }

◆ finalizeCouplerInit()

template<MInt nDim, MInt nDist, class SysEqn >
virtual void CouplerLbLb< nDim, nDist, SysEqn >::finalizeCouplerInit ( )
inlinevirtual

Implements Coupling.

Definition at line 93 of file couplerlblb.h.

93{};

◆ finalizeSubCoupleInit()

template<MInt nDim, MInt nDist, class SysEqn >
virtual void CouplerLbLb< nDim, nDist, SysEqn >::finalizeSubCoupleInit ( MInt  )
inlinevirtual

Implements Coupling.

Definition at line 94 of file couplerlblb.h.

94{};

◆ init()

template<MInt nDim, MInt nDist, class SysEqn >
void CouplerLbLb< nDim, nDist, SysEqn >::init
virtual

Implements Coupling.

Definition at line 31 of file couplerlblb.cpp.

31 {
32 // check if solvers are compatible
33 if(sourceSolver().m_updateMacroscopicLocation != destSolver().m_updateMacroscopicLocation) {
34 mTerm(1, AT_, "updateAfterPropagation has to be consistent between solvers");
35 }
36 if(sourceSolver().m_isThermal != destSolver().m_isThermal) {
37 mTerm(1, AT_, "isThermal has to be consistent between solvers");
38 }
39
40 // make a list of cells that are located within the transfer box. Does not work with adaptation!
41 for(MInt sourceId = 0; sourceId < sourceSolver().a_noCells(); sourceId++) {
42 if(source2DestId(sourceId) < 0) continue;
43 MBool isInside = true;
44 for(MInt i = 0; i < nDim; i++) {
45 MFloat coordinate = sourceSolver().a_coordinate(sourceId, i);
46 if(coordinate < m_transferBox[i] || coordinate > m_transferBox[i + nDim]) {
47 isInside = false;
48 break;
49 }
50 }
51 if(isInside) {
52 m_transferCellIds.push_back(sourceId);
53 }
54 }
55
56 if(sourceSolver().m_updateMacroscopicLocation == POSTPROPAGATION) {
57 if(sourceSolver().m_isThermal) {
59 mAlloc(m_dataBlockSizes, m_noVarsTransfer, "m_dataBlockSizes", 0, AT_);
60 mAlloc(m_sourceBaseAddresses, m_noVarsTransfer, "m_sourceBaseAddresses", AT_);
61 mAlloc(m_destBaseAddresses, m_noVarsTransfer, "m_destBaseAddresses", AT_);
62
63 m_dataBlockSizes[0] = nDim + 1;
64 m_dataBlockSizes[1] = nDim + 1;
65 m_dataBlockSizes[2] = nDist;
66 m_dataBlockSizes[3] = nDist;
67
68 m_sourceBaseAddresses[0] = &sourceSolver().a_variable(0, 0);
69 m_sourceBaseAddresses[1] = &sourceSolver().a_oldVariable(0, 0);
70 m_sourceBaseAddresses[2] = &sourceSolver().a_oldDistribution(0, 0);
71 m_sourceBaseAddresses[3] = &sourceSolver().a_oldDistributionThermal(0, 0);
72 m_destBaseAddresses[0] = &destSolver().a_variable(0, 0);
73 m_destBaseAddresses[1] = &destSolver().a_oldVariable(0, 0);
74 m_destBaseAddresses[2] = &destSolver().a_oldDistribution(0, 0);
75 m_destBaseAddresses[3] = &destSolver().a_oldDistributionThermal(0, 0);
76 } else {
78 mAlloc(m_dataBlockSizes, m_noVarsTransfer, "m_noDataBlockSizes", 0, AT_);
79 mAlloc(m_sourceBaseAddresses, m_noVarsTransfer, "m_sourceBaseAddresses", AT_);
80 mAlloc(m_destBaseAddresses, m_noVarsTransfer, "m_destBaseAddresses", AT_);
81 m_dataBlockSizes[0] = nDim + 1;
82 m_dataBlockSizes[1] = nDim + 1;
83 m_dataBlockSizes[2] = nDist;
84
85 m_sourceBaseAddresses[0] = &sourceSolver().a_variable(0, 0);
86 m_sourceBaseAddresses[1] = &sourceSolver().a_oldVariable(0, 0);
87 m_sourceBaseAddresses[2] = &sourceSolver().a_oldDistribution(0, 0);
88 m_destBaseAddresses[0] = &destSolver().a_variable(0, 0);
89 m_destBaseAddresses[1] = &destSolver().a_oldVariable(0, 0);
90 m_destBaseAddresses[2] = &destSolver().a_oldDistribution(0, 0);
91 }
92 } else {
93 if(sourceSolver().m_isThermal) {
95 mAlloc(m_dataBlockSizes, m_noVarsTransfer, "m_noDataBlockSizes", 0, AT_);
96 mAlloc(m_sourceBaseAddresses, m_noVarsTransfer, "m_sourceBaseAddresses", AT_);
97 mAlloc(m_destBaseAddresses, m_noVarsTransfer, "m_destBaseAddresses", AT_);
98
99 m_dataBlockSizes[0] = nDim + 1;
100 m_dataBlockSizes[1] = nDist;
101 m_dataBlockSizes[2] = nDist;
102
103 m_sourceBaseAddresses[0] = &sourceSolver().a_variable(0, 0);
104 m_sourceBaseAddresses[1] = &sourceSolver().a_oldDistribution(0, 0);
105 m_sourceBaseAddresses[2] = &sourceSolver().a_oldDistributionThermal(0, 0);
106 m_destBaseAddresses[0] = &destSolver().a_variable(0, 0);
107 m_destBaseAddresses[1] = &destSolver().a_oldDistribution(0, 0);
108 m_destBaseAddresses[2] = &destSolver().a_oldDistributionThermal(0, 0);
109 } else {
111 mAlloc(m_dataBlockSizes, m_noVarsTransfer, "m_noDataBlockSizes", 0, AT_);
112 mAlloc(m_sourceBaseAddresses, m_noVarsTransfer, "m_sourceBaseAddresses", AT_);
113 mAlloc(m_destBaseAddresses, m_noVarsTransfer, "m_destBaseAddresses", AT_);
114
115 m_dataBlockSizes[0] = nDim + 1;
116 m_dataBlockSizes[1] = nDist;
117
118 m_sourceBaseAddresses[0] = &sourceSolver().a_variable(0, 0);
119 m_sourceBaseAddresses[1] = &sourceSolver().a_oldDistribution(0, 0);
120 m_destBaseAddresses[0] = &destSolver().a_variable(0, 0);
121 m_destBaseAddresses[1] = &destSolver().a_oldDistribution(0, 0);
122 }
123 }
124
125#ifndef NDEBUG
126 // debug checks
127 for(const auto& sourceId : m_transferCellIds) {
128 const MInt destId = source2DestId(sourceId);
129 MBool isCorrect = true;
130 for(MInt i = 0; i < nDim; i++) {
131 if(fabs(sourceSolver().a_coordinate(sourceId, i) - destSolver().a_coordinate(destId, i)) > 1e-10) {
132 isCorrect = false;
133 break;
134 }
135 if(!isCorrect) {
136 std::cerr << "source:" << sourceId << " " << sourceSolver().a_coordinate(sourceId, 0) << " "
137 << sourceSolver().a_coordinate(sourceId, 1) << " " << sourceSolver().a_coordinate(sourceId, 2) << " "
138 << "dest:" << destId << " " << destSolver().a_coordinate(destId, 0) << " "
139 << destSolver().a_coordinate(destId, 1) << " " << destSolver().a_coordinate(destId, 2) << std::endl;
140 }
141 }
142 }
143 for(MInt destId = 0; destId < destSolver().a_noCells(); destId++) {
144 MBool isInside = true;
145 for(MInt i = 0; i < nDim; i++) {
146 MFloat coordinate = destSolver().a_coordinate(destId, i);
147 if(coordinate < m_transferBox[i] || coordinate > m_transferBox[i + nDim]) {
148 isInside = false;
149 break;
150 }
151 }
152 if(isInside) {
153 const MInt sourceId = dest2SourceId(destId);
154 if(std::find(m_transferCellIds.begin(), m_transferCellIds.end(), sourceId) == m_transferCellIds.end()) {
155 std::cerr << "missed cell dest:" << destId << " " << destSolver().a_coordinate(destId, 0) << " "
156 << destSolver().a_coordinate(destId, 1) << " " << destSolver().a_coordinate(destId, 2) << " "
157 << "source:" << sourceId << " " << sourceSolver().a_coordinate(sourceId, 0) << " "
158 << sourceSolver().a_coordinate(sourceId, 1) << " " << sourceSolver().a_coordinate(sourceId, 2)
159 << std::endl;
160 }
161 }
162 }
163#endif
164}
void mAlloc(T *&a, const MLong N, const MString &objectName, MString function)
allocates memory for one-dimensional array 'a' of size N
Definition: alloc.h:173
MInt source2DestId(const MInt sourceId) const
Definition: couplerlblb.h:85
MInt dest2SourceId(const MInt destId) const
Definition: couplerlblb.h:86
std::vector< MInt > m_transferCellIds
Definition: couplerlblb.h:59
std::array< MFloat, 2 *nDim > m_transferBox
Definition: couplerlblb.h:58
MInt m_noVarsTransfer
Definition: couplerlblb.h:60
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29
@ POSTPROPAGATION
Definition: lbsolver.h:34
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58

◆ initData()

template<MInt nDim, MInt nDist, class SysEqn >
void CouplerLbLb< nDim, nDist, SysEqn >::initData
private

Definition at line 25 of file couplerlblb.cpp.

25 {
26 m_sourceSolverId = sourceSolver().solverId();
27 m_destSolverId = destSolver().solverId();
28}
MInt m_sourceSolverId
Definition: couplerlblb.h:56
MInt m_destSolverId
Definition: couplerlblb.h:57

◆ lbSolver()

template<MInt nDim, MInt nDist, class SysEqn >
solverType & CouplingLB< nDim, nDist, SysEqn >::lbSolver ( const MInt  solverId = 0) const
inlineprotected

Definition at line 454 of file coupling.h.

454 {
455 ASSERT(solverId < noSolvers(), "Invalid solverId " + std::to_string(solverId) + "/" + std::to_string(noSolvers()));
456 return *m_lbSolvers[solverId];
457 }
std::vector< solverType * > m_lbSolvers
Definition: coupling.h:464
MInt noSolvers() const
Definition: coupling.h:453

◆ minCell()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::minCell ( const MInt  index,
const MInt  id = 0 
) const
inlineprotected

Definition at line 512 of file coupling.h.

512{ return lbSolver(id).grid().minCell(index); }

◆ noMinCells()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::noMinCells ( const MInt  id = 0) const
inlineprotected

Definition at line 514 of file coupling.h.

514{ return lbSolver(id).grid().noMinCells(); }

◆ postCouple()

template<MInt nDim, MInt nDist, class SysEqn >
void CouplerLbLb< nDim, nDist, SysEqn >::postCouple ( MInt  )
virtual

Implements Coupling.

Definition at line 184 of file couplerlblb.cpp.

184 {
185 for(const auto& sourceId : m_transferCellIds) {
186 const MInt destId = source2DestId(sourceId);
187 for(MInt var = 0; var < m_noVarsTransfer; var++) {
188 memcpy(m_destBaseAddresses[var] + (m_dataBlockSizes[var] * destId),
189 m_sourceBaseAddresses[var] + (m_dataBlockSizes[var] * sourceId),
190 m_dataBlockSizes[var] * sizeof(MFloat));
191 }
192 }
193}

◆ preCouple()

template<MInt nDim, MInt nDist, class SysEqn >
virtual void CouplerLbLb< nDim, nDist, SysEqn >::preCouple ( MInt  )
inlinevirtual

Implements Coupling.

Definition at line 91 of file couplerlblb.h.

91{};

◆ readProperties()

template<MInt nDim, MInt nDist, class SysEqn >
virtual void CouplerLbLb< nDim, nDist, SysEqn >::readProperties ( )
virtual

Implements Coupling.

◆ source2DestId()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplerLbLb< nDim, nDist, SysEqn >::source2DestId ( const MInt  sourceId) const
inlineprivate

Definition at line 85 of file couplerlblb.h.

85{ return convertId(sourceSolver(), destSolver(), sourceId); };

◆ sourceSolver()

template<MInt nDim, MInt nDist, class SysEqn >
LbSolver & CouplerLbLb< nDim, nDist, SysEqn >::sourceSolver ( ) const
inlineprivate

Definition at line 82 of file couplerlblb.h.

82{ return lbSolver(0); }

◆ subCouple()

template<MInt nDim, MInt nDist, class SysEqn >
virtual void CouplerLbLb< nDim, nDist, SysEqn >::subCouple ( MInt  ,
MInt  ,
std::vector< MBool > &   
)
inlinevirtual

Implements Coupling.

Definition at line 95 of file couplerlblb.h.

95{};

◆ testCoupling()

template<MInt nDim, MInt nDist, class SysEqn >
void CouplerLbLb< nDim, nDist, SysEqn >::testCoupling ( )

Friends And Related Function Documentation

◆ LbBndCndDxQy< nDim, nDist, SysEqn >

template<MInt nDim, MInt nDist, class SysEqn >
friend class LbBndCndDxQy< nDim, nDist, SysEqn >
friend

Definition at line 1 of file couplerlblb.h.

◆ LbSolverDxQy< nDim, nDist, SysEqn >

template<MInt nDim, MInt nDist, class SysEqn >
friend class LbSolverDxQy< nDim, nDist, SysEqn >
friend

Definition at line 1 of file couplerlblb.h.

Member Data Documentation

◆ m_dataBlockSizes

template<MInt nDim, MInt nDist, class SysEqn >
MInt* CouplerLbLb< nDim, nDist, SysEqn >::m_dataBlockSizes = nullptr
private

Definition at line 63 of file couplerlblb.h.

◆ m_destBaseAddresses

template<MInt nDim, MInt nDist, class SysEqn >
MFloat** CouplerLbLb< nDim, nDist, SysEqn >::m_destBaseAddresses = nullptr
private

Definition at line 62 of file couplerlblb.h.

◆ m_destSolverId

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplerLbLb< nDim, nDist, SysEqn >::m_destSolverId {}
private

Definition at line 57 of file couplerlblb.h.

◆ m_noVarsTransfer

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplerLbLb< nDim, nDist, SysEqn >::m_noVarsTransfer {}
private

Definition at line 60 of file couplerlblb.h.

◆ m_sourceBaseAddresses

template<MInt nDim, MInt nDist, class SysEqn >
MFloat** CouplerLbLb< nDim, nDist, SysEqn >::m_sourceBaseAddresses = nullptr
private

Definition at line 61 of file couplerlblb.h.

◆ m_sourceSolverId

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplerLbLb< nDim, nDist, SysEqn >::m_sourceSolverId {}
private

Definition at line 56 of file couplerlblb.h.

◆ m_transferBox

template<MInt nDim, MInt nDist, class SysEqn >
std::array<MFloat, 2 * nDim> CouplerLbLb< nDim, nDist, SysEqn >::m_transferBox {}
private

Definition at line 58 of file couplerlblb.h.

◆ m_transferCellIds

template<MInt nDim, MInt nDist, class SysEqn >
std::vector<MInt> CouplerLbLb< nDim, nDist, SysEqn >::m_transferCellIds
private

Definition at line 59 of file couplerlblb.h.


The documentation for this class was generated from the following files: