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

#include <coupling.h>

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

Public Types

using solverType = DgCartesianSolver< nDim, SysEqn >
 
using CV = typename SysEqn::CV
 

Public Member Functions

 CouplingDg (const MInt couplingId, solverType *b)
 
virtual ~CouplingDg ()=default
 
solverTypedgSolver () const
 Return MPI communicator. More...
 
MInt solverId () const
 Return solver id. More...
 
SysEqn & sysEqn ()
 Return reference to SysEqn object. More...
 
ElementCollectorelements ()
 Return reference to elements. More...
 
MInt noElements () const
 Return number of elements. More...
 
MFloatexternalSource () const
 Return pointer to external source memory. More...
 
MInt getElementByCellId (const MInt cellId)
 Return element id for cell id. More...
 
MInt minPolyDeg () const
 Return the minimum polynomial degree. More...
 
MInt maxPolyDeg () const
 Return the maximum polynomial degree. More...
 
MString outputDir () const
 Return output directory. More...
 
void saveNodalData (const MString &fileNameBase, const MInt noVars, const std::vector< MString > &varNames, const MFloat *const data) const
 Save nodal data to file. More...
 
- 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 Types

using ElementCollector = maia::dg::collector::ElementCollector< nDim, SysEqn >
 

Protected Attributes

solverTypem_dgSolver = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from Coupling
MFloat returnLoadRecord () const
 
MFloat returnIdleRecord () const
 

Detailed Description

template<MInt nDim, class SysEqn>
class CouplingDg< nDim, SysEqn >

Definition at line 289 of file coupling.h.

Member Typedef Documentation

◆ CV

template<MInt nDim, class SysEqn >
using CouplingDg< nDim, SysEqn >::CV = typename SysEqn::CV

Definition at line 312 of file coupling.h.

◆ ElementCollector

template<MInt nDim, class SysEqn >
using CouplingDg< nDim, SysEqn >::ElementCollector = maia::dg::collector::ElementCollector<nDim, SysEqn>
protected

Definition at line 300 of file coupling.h.

◆ solverType

template<MInt nDim, class SysEqn >
using CouplingDg< nDim, SysEqn >::solverType = DgCartesianSolver<nDim, SysEqn>

Definition at line 292 of file coupling.h.

Constructor & Destructor Documentation

◆ CouplingDg()

template<MInt nDim, class SysEqn >
CouplingDg< nDim, SysEqn >::CouplingDg ( const MInt  couplingId,
solverType b 
)
inline

Definition at line 294 of file coupling.h.

294: Coupling(couplingId), m_dgSolver(b) {}
solverType * m_dgSolver
Definition: coupling.h:298

◆ ~CouplingDg()

template<MInt nDim, class SysEqn >
virtual CouplingDg< nDim, SysEqn >::~CouplingDg ( )
virtualdefault

Member Function Documentation

◆ dgSolver()

template<MInt nDim, class SysEqn >
solverType & CouplingDg< nDim, SysEqn >::dgSolver ( ) const
inline

Return domain id

Definition at line 310 of file coupling.h.

310{ return *m_dgSolver; }

◆ elements()

template<MInt nDim, class SysEqn >
ElementCollector & CouplingDg< nDim, SysEqn >::elements ( )
inline

Definition at line 321 of file coupling.h.

321{ return dgSolver().m_elements; }
solverType & dgSolver() const
Return MPI communicator.
Definition: coupling.h:310
ElementCollector m_elements

◆ externalSource()

template<MInt nDim, class SysEqn >
MFloat * CouplingDg< nDim, SysEqn >::externalSource ( ) const
inline

Definition at line 327 of file coupling.h.

327{ return &dgSolver().m_elements.externalSource(0); }
MFloat & externalSource(const MInt id)
Accessor for external source terms.

◆ getElementByCellId()

template<MInt nDim, class SysEqn >
MInt CouplingDg< nDim, SysEqn >::getElementByCellId ( const MInt  cellId)
inline

Definition at line 330 of file coupling.h.

330{ return dgSolver().getElementByCellId(cellId); }

◆ maxPolyDeg()

template<MInt nDim, class SysEqn >
MInt CouplingDg< nDim, SysEqn >::maxPolyDeg ( ) const
inline

Definition at line 336 of file coupling.h.

336{ return dgSolver().m_maxPolyDeg; }

◆ minPolyDeg()

template<MInt nDim, class SysEqn >
MInt CouplingDg< nDim, SysEqn >::minPolyDeg ( ) const
inline

Definition at line 333 of file coupling.h.

333{ return dgSolver().m_minPolyDeg; }

◆ noElements()

template<MInt nDim, class SysEqn >
MInt CouplingDg< nDim, SysEqn >::noElements ( ) const
inline

Definition at line 324 of file coupling.h.

324{ return dgSolver().m_elements.size(); }
constexpr MInt size() const
Return size (i.e., currently used number of nodes)
Definition: container.h:89

◆ outputDir()

template<MInt nDim, class SysEqn >
MString CouplingDg< nDim, SysEqn >::outputDir ( ) const
inline

Definition at line 339 of file coupling.h.

339{ return dgSolver().outputDir(); }
MString outputDir() const
Return the directory for output files.
Definition: solver.h:407

◆ saveNodalData()

template<MInt nDim, class SysEqn >
void CouplingDg< nDim, SysEqn >::saveNodalData ( const MString fileNameBase,
const MInt  noVars,
const std::vector< MString > &  varNames,
const MFloat *const  data 
) const
inline

Definition at line 342 of file coupling.h.

345 {
346 dgSolver().saveNodalData(fileNameBase, noVars, varNames, data);
347 }
void saveNodalData(const MString &fileNameBase, const MInt noVars, const std::vector< MString > &varNames, const MFloat *const data) const
Save nodal data to file.

◆ solverId()

template<MInt nDim, class SysEqn >
MInt CouplingDg< nDim, SysEqn >::solverId ( ) const
inline

Definition at line 315 of file coupling.h.

315{ return dgSolver().solverId(); }
MInt solverId() const
Return the solverId.
Definition: solver.h:425

◆ sysEqn()

template<MInt nDim, class SysEqn >
SysEqn & CouplingDg< nDim, SysEqn >::sysEqn ( )
inline

Definition at line 318 of file coupling.h.

318{ return dgSolver().m_sysEqn; }

Member Data Documentation

◆ m_dgSolver

template<MInt nDim, class SysEqn >
solverType* CouplingDg< nDim, SysEqn >::m_dgSolver = nullptr
protected

Definition at line 298 of file coupling.h.


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