MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
Coupling Class Referenceabstract

#include <coupling.h>

Inheritance diagram for Coupling:
[legend]

Public Member Functions

 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 returnLoadRecord () const
 
MFloat returnIdleRecord () const
 

Private Member Functions

virtual void checkProperties ()=0
 
virtual void readProperties ()=0
 

Private Attributes

MInt m_couplingId = -1
 
MInt m_dlbTimerId = -1
 

Detailed Description

Definition at line 59 of file coupling.h.

Constructor & Destructor Documentation

◆ Coupling() [1/2]

Coupling::Coupling ( const MInt  couplingId)
inline

Definition at line 61 of file coupling.h.

61: m_couplingId(couplingId){};
MInt m_couplingId
Definition: coupling.h:165

◆ ~Coupling()

virtual Coupling::~Coupling ( )
virtualdefault

◆ Coupling() [2/2]

Coupling::Coupling ( const Coupling )
delete

Member Function Documentation

◆ balancePost()

virtual void Coupling::balancePost ( )
inlinevirtual

Reimplemented in CouplerLbFvEEMultiphase< nDim, nDist, SysEqnLb, SysEqnFv >, DgCcAcousticPerturb< nDim, FvSysEqn >, CouplerFvParticle< nDim, SysEqn >, FvZonalSTG< nDim, SysEqn >, and LsFvMb< nDim_, SysEqn >.

Definition at line 87 of file coupling.h.

87 {
88 std::cerr << "WARNING: coupler does not implement balancePost(), which might be necessary for "
89 "balancing to work correctly!"
90 << std::endl;
91 // TERMM(1, "Not implemented for this coupler");
92 };

◆ balancePre()

virtual void Coupling::balancePre ( )
inlinevirtual

Reimplemented in CouplerLbFvEEMultiphase< nDim, nDist, SysEqnLb, SysEqnFv >, DgCcAcousticPerturb< nDim, FvSysEqn >, CouplerFvParticle< nDim, SysEqn >, FvZonalSTG< nDim, SysEqn >, LbLpt< nDim, nDist, SysEqn >, and LsFvMb< nDim_, SysEqn >.

Definition at line 81 of file coupling.h.

81 {
82 std::cerr << "WARNING: coupler does not implement balancePre(), which might be necessary for "
83 "balancing to work correctly!"
84 << std::endl;
85 // TERMM(1, "Not implemented for this coupler");
86 };

◆ cellDataSizeDlb()

virtual MInt Coupling::cellDataSizeDlb ( const MInt   NotUseddataId,
const MInt   NotUsedcellId 
)
inlinevirtual

Reimplemented in DgCcAcousticPerturb< nDim, FvSysEqn >.

Definition at line 104 of file coupling.h.

104{ return -1; };

◆ cellDataTypeDlb()

virtual MInt Coupling::cellDataTypeDlb ( const MInt   NotUseddataId) const
inlinevirtual

Definition at line 103 of file coupling.h.

103{ return -1; };

◆ checkProperties()

◆ cleanUp()

◆ couplerId()

MInt Coupling::couplerId ( ) const
inline

Definition at line 67 of file coupling.h.

67{ return m_couplingId; };

◆ finalizeAdaptation()

◆ finalizeBalance()

virtual void Coupling::finalizeBalance ( const  MInt)
inlinevirtual

◆ finalizeCouplerInit()

◆ finalizeSubCoupleInit()

◆ getCellDataDlb() [1/3]

virtual void Coupling::getCellDataDlb ( const MInt   NotUseddataId,
const MInt   NotUsedoldNoCells,
const MInt *const   NotUsedbufferIdToCellId,
MFloat *const   NotUseddata 
)
inlinevirtual

Definition at line 113 of file coupling.h.

114 {
115 TERMM(1, "Not implemented for coupler.");
116 }

◆ getCellDataDlb() [2/3]

virtual void Coupling::getCellDataDlb ( const MInt   NotUseddataId,
const MInt   NotUsedoldNoCells,
const MInt *const   NotUsedbufferIdToCellId,
MInt *const   NotUseddata 
)
inlinevirtual

Definition at line 105 of file coupling.h.

106 {
107 TERMM(1, "Not implemented for coupler.");
108 }

◆ getCellDataDlb() [3/3]

virtual void Coupling::getCellDataDlb ( const MInt   NotUseddataId,
const MInt   NotUsedoldNoCells,
const MInt *const   NotUsedbufferIdToCellId,
MLong *const   NotUseddata 
)
inlinevirtual

Definition at line 109 of file coupling.h.

110 {
111 TERMM(1, "Not implemented for coupler.");
112 }

◆ getCouplingTimings()

virtual void Coupling::getCouplingTimings ( std::vector< std::pair< MString, MFloat > > &  NotUsedtimings,
const MBool   NotUsedallTimings 
)
inlinevirtual

Definition at line 135 of file coupling.h.

136 {};

◆ getDomainDecompositionInformation()

virtual void Coupling::getDomainDecompositionInformation ( std::vector< std::pair< MString, MInt > > &  NotUseddomainInfo)
inlinevirtual

Reimplemented in CouplerFvMultilevel< nDim, SysEqn >.

Definition at line 139 of file coupling.h.

139{};

◆ init()

◆ noCellDataDlb()

virtual MInt Coupling::noCellDataDlb ( ) const
inlinevirtual

Reimplemented in DgCcAcousticPerturb< nDim, FvSysEqn >.

Definition at line 102 of file coupling.h.

102{ return 0; };

◆ noCouplingTimers()

virtual MInt Coupling::noCouplingTimers ( const MBool   NotUsedallTimings) const
inlinevirtual

Reimplemented in CouplerFvParticle< nDim, SysEqn >, and LsFvMb< nDim_, SysEqn >.

Definition at line 130 of file coupling.h.

130 {
131 return 0;
132 } // TODO labels:COUPLER,TIMERS set default to 2 (load/idle)?

◆ operator=()

Coupling & Coupling::operator= ( const Coupling )
delete

◆ postAdaptation()

virtual void Coupling::postAdaptation ( )
inlinevirtual

◆ postCouple()

◆ preCouple()

◆ prepareAdaptation()

virtual void Coupling::prepareAdaptation ( )
inlinevirtual

Reimplemented in FvZonalRTV< nDim, SysEqn >, CouplerFvParticle< nDim, SysEqn >, and LsFvMb< nDim_, SysEqn >.

Definition at line 95 of file coupling.h.

95{};

◆ readProperties()

◆ reinitAfterBalance()

virtual void Coupling::reinitAfterBalance ( )
inlinevirtual

Reimplemented in LbRb< nDim, nDist, SysEqn >, and LsLbSurface< nDim, nDist, SysEqn >.

Definition at line 93 of file coupling.h.

93{};

◆ returnIdleRecord()

MFloat Coupling::returnIdleRecord ( ) const
inlineprotected

Definition at line 159 of file coupling.h.

MInt m_dlbTimerId
Definition: coupling.h:166
MFloat returnIdleRecord(const MInt dlbTimerId, const MInt mode=0)
Return the idle record of a DLB timer.
Definition: dlbtimer.h:474
DlbTimerController g_dlbTimerController

◆ returnLoadRecord()

MFloat Coupling::returnLoadRecord ( ) const
inlineprotected

Definition at line 158 of file coupling.h.

MFloat returnLoadRecord(const MInt dlbTimerId, const MInt mode=0)
Return the load record of a DLB timer.
Definition: dlbtimer.h:464

◆ setCellDataDlb() [1/3]

virtual void Coupling::setCellDataDlb ( const MInt   NotUseddataId,
const MFloat *const   NotUseddata 
)
inlinevirtual

Reimplemented in DgCcAcousticPerturb< nDim, FvSysEqn >.

Definition at line 123 of file coupling.h.

123 {
124 TERMM(1, "Not implemented for coupler.");
125 }

◆ setCellDataDlb() [2/3]

virtual void Coupling::setCellDataDlb ( const MInt   NotUseddataId,
const MInt *const   NotUseddata 
)
inlinevirtual

Definition at line 117 of file coupling.h.

117 {
118 TERMM(1, "Not implemented for coupler.");
119 }

◆ setCellDataDlb() [3/3]

virtual void Coupling::setCellDataDlb ( const MInt   NotUseddataId,
const MLong *const   NotUseddata 
)
inlinevirtual

Definition at line 120 of file coupling.h.

120 {
121 TERMM(1, "Not implemented for coupler.");
122 }

◆ setDlbTimer()

void Coupling::setDlbTimer ( const MInt  timerId)
inline

Definition at line 140 of file coupling.h.

140 {
141 if(m_dlbTimerId != -1) {
142 TERMM(1, "m_dlbTimerId already set");
143 }
144 m_dlbTimerId = timerId;
145 }

◆ startLoadTimer()

void Coupling::startLoadTimer ( const MString name) const
inline

Definition at line 148 of file coupling.h.

148 {
150 }
void startLoadTimer(const MInt dlbTimerId, const MString &name)
Start the load timer for the given DLB timer id.
Definition: dlbtimer.h:334

◆ stopLoadTimer()

void Coupling::stopLoadTimer ( const MString name) const
inline

Definition at line 152 of file coupling.h.

152 {
154 }
void stopLoadTimer(const MInt dlbTimerId, const MString &name)
Stop the load timer for the given DLB timer id.
Definition: dlbtimer.h:355

◆ subCouple()

◆ writeRestartFile()

virtual void Coupling::writeRestartFile ( const  MInt)
inlinevirtual

Reimplemented in CouplerFvParticle< nDim, SysEqn >.

Definition at line 99 of file coupling.h.

99{};

Member Data Documentation

◆ m_couplingId

MInt Coupling::m_couplingId = -1
private

Definition at line 165 of file coupling.h.

◆ m_dlbTimerId

MInt Coupling::m_dlbTimerId = -1
private

Definition at line 166 of file coupling.h.


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