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

#include <coupling.h>

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

Public Types

using solverType = LbSolverDxQy< nDim, nDist, SysEqn >
 
using LbBndCnd = LbBndCndDxQy< nDim, nDist, SysEqn >
 
using MbCellCollector = maia::lb::collector::LbMbCellCollector< nDim >
 

Public Member Functions

 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

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 Attributes

std::vector< solverType * > m_lbSolvers {}
 

Detailed Description

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

Definition at line 428 of file coupling.h.

Member Typedef Documentation

◆ LbBndCnd

template<MInt nDim, MInt nDist, class SysEqn >
using CouplingLB< nDim, nDist, SysEqn >::LbBndCnd = LbBndCndDxQy<nDim, nDist, SysEqn>

Definition at line 431 of file coupling.h.

◆ MbCellCollector

template<MInt nDim, MInt nDist, class SysEqn >
using CouplingLB< nDim, nDist, SysEqn >::MbCellCollector = maia::lb::collector::LbMbCellCollector<nDim>

Definition at line 432 of file coupling.h.

◆ solverType

template<MInt nDim, MInt nDist, class SysEqn >
using CouplingLB< nDim, nDist, SysEqn >::solverType = LbSolverDxQy<nDim, nDist, SysEqn>

Definition at line 430 of file coupling.h.

Constructor & Destructor Documentation

◆ CouplingLB() [1/2]

template<MInt nDim, MInt nDist, class SysEqn >
CouplingLB< nDim, nDist, SysEqn >::CouplingLB ( const MInt  couplingId,
Solver solvers,
const MInt  noSolvers = 1 
)
inline

Definition at line 434 of file coupling.h.

434 : Coupling(couplingId) {
435 TRACE();
436
437 // Store solver pointers
438 for(MInt i = 0; i < noSolvers; i++) {
439 m_lbSolvers.push_back(static_cast<solverType*>(&solvers[i]));
440 }
441 }
LbSolverDxQy< nDim, nDist, SysEqn > solverType
Definition: coupling.h:430
std::vector< solverType * > m_lbSolvers
Definition: coupling.h:464
MInt noSolvers() const
Definition: coupling.h:453
int32_t MInt
Definition: maiatypes.h:62
MInt * solvers
Definition: maiatypes.h:72

◆ CouplingLB() [2/2]

template<MInt nDim, MInt nDist, class SysEqn >
CouplingLB< nDim, nDist, SysEqn >::CouplingLB ( const MInt  couplingId,
std::vector< solverType * >  solvers 
)
inline

Definition at line 443 of file coupling.h.

443 : Coupling(couplingId) {
444 TRACE();
445
446 // Store solver pointers
447 for(const auto& solver : solvers) {
448 m_lbSolvers.push_back(static_cast<solverType*>(solver));
449 }
450 }

Member Function Documentation

◆ a_associatedBodyIdsMb() [1/2]

template<MInt nDim, MInt nDist, class SysEqn >
MInt & CouplingLB< nDim, nDist, SysEqn >::a_associatedBodyIdsMb ( const MInt  cellId,
const MInt  set,
const MInt  id = 0 
)
inline

Definition at line 498 of file coupling.h.

498 {
499 return lbSolver(id).a_associatedBodyIds(cellId, set);
500 }
solverType & lbSolver(const MInt solverId=0) const
Definition: coupling.h:454

◆ a_associatedBodyIdsMb() [2/2]

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::a_associatedBodyIdsMb ( const MInt  cellId,
const MInt  set,
const MInt  id = 0 
) const
inline

Definition at line 502 of file coupling.h.

502 {
503 return lbSolver(id).a_associatedBodyIds(cellId, set);
504 }

◆ a_bndCellId()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::a_bndCellId ( const MInt  bndCell,
const MInt  id = 0 
)
inline

Definition at line 537 of file coupling.h.

537{ return lbBndCnd(id).m_bndCells[bndCell].m_cellId; }
LbBndCnd & lbBndCnd(const MInt id=0)
Definition: coupling.h:461
std::vector< LbGridBoundaryCell< nDim > > m_bndCells
Definition: lbbndcnd.h:130

◆ a_boundaryCellMb()

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

Definition at line 487 of file coupling.h.

487{ return lbBndCnd(id).a_boundaryCellMb(cellId); }
MInt a_boundaryCellMb(const MInt cellId)
Definition: lbbndcnd.h:83

◆ a_cellLengthAtLevel()

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

Definition at line 518 of file coupling.h.

518{ return lbSolver(id).grid().cellLengthAtLevel(level); }

◆ 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 
)
inline

Definition at line 508 of file coupling.h.

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

◆ a_initTemperatureKelvin()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::a_initTemperatureKelvin ( const MInt  id = 0) const
inline

Definition at line 482 of file coupling.h.

482{ return lbSolver(id).m_initTemperatureKelvin; }

◆ a_isActive()

template<MInt nDim, MInt nDist, class SysEqn >
MBool CouplingLB< nDim, nDist, SysEqn >::a_isActive ( const MInt  cellId,
const MInt  id = 0 
) const
inline

Definition at line 522 of file coupling.h.

522{ return lbSolver(id).a_isActive(cellId); }

◆ a_isThermal()

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

Definition at line 479 of file coupling.h.

479{ return lbSolver(id).m_isThermal; }

◆ a_levelSetFunctionMb() [1/2]

template<MInt nDim, MInt nDist, class SysEqn >
MFloat & CouplingLB< nDim, nDist, SysEqn >::a_levelSetFunctionMb ( const MInt  cellId,
const MInt  set,
const MInt  id = 0 
)
inline

Definition at line 490 of file coupling.h.

490 {
491 return lbSolver(id).a_levelSetFunctionMB(cellId, set);
492 }

◆ a_levelSetFunctionMb() [2/2]

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::a_levelSetFunctionMb ( const MInt  cellId,
const MInt  set,
const MInt  id = 0 
) const
inline

Definition at line 494 of file coupling.h.

494 {
495 return lbSolver(id).a_levelSetFunctionMB(cellId, set);
496 }

◆ a_Ma()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::a_Ma ( const MInt  id = 0) const
inline

Definition at line 472 of file coupling.h.

472{ return lbSolver(id).m_Ma; }

◆ a_mbCell()

template<MInt nDim, MInt nDist, class SysEqn >
MbCellCollector & CouplingLB< nDim, nDist, SysEqn >::a_mbCell ( const MInt  id = 0)
inline

Definition at line 486 of file coupling.h.

486{ return lbBndCnd(id).m_boundaryCellsMb; }
MbCellCollector m_boundaryCellsMb
Definition: lbbndcnd.h:57

◆ a_noBndCells()

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

Definition at line 539 of file coupling.h.

539{ return lbBndCnd(id).m_bndCells.size(); }

◆ a_noCells()

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

Definition at line 516 of file coupling.h.

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

◆ a_noDistributions()

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

Definition at line 481 of file coupling.h.

481{ return lbSolver(id).m_noDistributions; }
static constexpr MInt m_noDistributions
Definition: lbsolverdxqy.h:180

◆ a_noEmbeddedBodiesLB()

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

Definition at line 520 of file coupling.h.

520{ return lbSolver(id).m_noEmbeddedBodies; }

◆ a_noLbCells()

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

Definition at line 470 of file coupling.h.

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

◆ a_noLevelSetsMb()

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

Definition at line 471 of file coupling.h.

471{ return lbSolver(id).m_noLevelSetsUsedForMb; }

◆ a_noVariables()

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

Definition at line 526 of file coupling.h.

526{ return lbSolver(id).noVariables(); }

◆ a_oldVariable()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat & CouplingLB< nDim, nDist, SysEqn >::a_oldVariable ( const MInt  cellId,
const MInt  varId,
const MInt  id = 0 
)
inline

Definition at line 533 of file coupling.h.

533 {
534 return lbSolver(id).a_oldVariable(cellId, varId);
535 }

◆ a_parentId()

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

Definition at line 506 of file coupling.h.

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

◆ a_physicalTime()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::a_physicalTime ( ) const
inline

Definition at line 467 of file coupling.h.

467{ return globalTimeStep; } // The nondimensional time in LB is the globalTimeStep
MInt globalTimeStep

◆ a_pvrho()

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

Definition at line 477 of file coupling.h.

477{ return lbSolver(id).PV->RHO; }

◆ a_pvt()

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

Definition at line 478 of file coupling.h.

478{ return lbSolver(id).PV->T; }

◆ a_pvu()

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

Definition at line 474 of file coupling.h.

474{ return lbSolver(id).PV->U; }

◆ a_pvv()

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

Definition at line 475 of file coupling.h.

475{ return lbSolver(id).PV->V; }

◆ a_pvw()

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

Definition at line 476 of file coupling.h.

476{ return lbSolver(id).PV->W; }

◆ a_Re()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::a_Re ( const MInt  id = 0) const
inline

Definition at line 473 of file coupling.h.

473{ return lbSolver(id).m_Re; }

◆ a_RKStep()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::a_RKStep ( ) const
inline

Definition at line 469 of file coupling.h.

469{ return 0; } // There is no Runge Kutta Step in LB

◆ a_time()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::a_time ( ) const
inline

Definition at line 484 of file coupling.h.

484{ return globalTimeStep; }

◆ a_variable()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat & CouplingLB< nDim, nDist, SysEqn >::a_variable ( const MInt  cellId,
const MInt  varId,
const MInt  id = 0 
)
inline

Definition at line 528 of file coupling.h.

528 {
529 return lbSolver(id).a_variable(cellId, varId);
530 }

◆ a_wasActive()

template<MInt nDim, MInt nDist, class SysEqn >
MBool CouplingLB< nDim, nDist, SysEqn >::a_wasActive ( const MInt  cellId,
const MInt  id = 0 
) const
inline

Definition at line 524 of file coupling.h.

524{ return lbSolver(id).a_wasActive(cellId); }

◆ lbBndCnd()

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

Definition at line 461 of file coupling.h.

461{ return *lbSolver(id).m_bndCnd; }
LbBndCnd * m_bndCnd
Pointers for the Boundary Conditions, for flow solving.
Definition: lbsolverdxqy.h:332

◆ 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 }

◆ lsTimeStep()

template<MInt nDim, MInt nDist, class SysEqn >
MFloat CouplingLB< nDim, nDist, SysEqn >::lsTimeStep ( ) const
inline

Definition at line 468 of file coupling.h.

468{ return 1.0; } // The nondimensional time step in LB is 1

◆ minCell()

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

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
inline

Definition at line 514 of file coupling.h.

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

◆ noSolvers()

template<MInt nDim, MInt nDist, class SysEqn >
MInt CouplingLB< nDim, nDist, SysEqn >::noSolvers ( ) const
inlineprotected

Definition at line 453 of file coupling.h.

453{ return m_lbSolvers.size(); }

Member Data Documentation

◆ m_lbSolvers

template<MInt nDim, MInt nDist, class SysEqn >
std::vector<solverType*> CouplingLB< nDim, nDist, SysEqn >::m_lbSolvers {}
private

Definition at line 464 of file coupling.h.


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