MAIA bb96820c
Multiphysics at AIA
|
#include <couplerfvmultilevel.h>
Public Types | |
using | Base = Coupling |
using | BaseFv = CouplingFv< nDim, SysEqn > |
using | SolverType = typename BaseFv::solverType |
using | Grid = CartesianGrid< nDim > |
using | GridProxy = typename SolverType::GridProxy |
Public Types inherited from CouplingFv< nDim, SysEqn > | |
using | solverType = FvCartesianSolverXD< nDim, SysEqn > |
Public Member Functions | |
CouplerFvMultilevel (const MInt couplingId, std::vector< FvCartesianSolverXD< nDim, SysEqn > * > solvers) | |
~CouplerFvMultilevel () | |
void | init () override |
void | finalizeSubCoupleInit (MInt) |
void | finalizeCouplerInit () |
call after the initial adaptation when all cells are refined correctly More... | |
void | preCouple (MInt) override |
void | subCouple (MInt, MInt, std::vector< MBool > &) override |
void | postCouple (MInt) override |
void | cleanUp () |
void | getDomainDecompositionInformation (std::vector< std::pair< MString, MInt > > &NotUsed(domainInfo)) override |
Return information on current domain decomposition (e.g. number of coupled cells/elements/...) More... | |
void | finalizeAdaptation (MInt solverId) |
call after the initial adaptation when all cells are refined correctly More... | |
void | readProperties () override |
void | checkProperties () override |
void | restriction (const MInt level) |
Restrict the solution on the given fine level onto the next coarser level. More... | |
void | resetTau (const MInt level) |
Reset the coarse level correction tau. More... | |
void | prolongation (const MInt level) |
Prolong the solution on the given coarse level onto the next finer level. More... | |
void | sanityCheck () |
MBool | startTimer (const MString &name) |
MBool | stopTimer (const MString &name) |
solverType & | fvSolver (const MInt solverId=0) const |
MInt | noSolvers () const |
Public Member Functions inherited from CouplingFv< nDim, SysEqn > | |
CouplingFv (const MInt couplingId, std::vector< FvCartesianSolverXD< nDim, SysEqn > * > fvSolvers, const MInt noSolvers) | |
CouplingFv (const MInt couplingId, Solver *solvers) | |
~CouplingFv () override=default | |
CouplingFv (const CouplingFv &)=delete | |
CouplingFv & | operator= (const CouplingFv &)=delete |
Public Member Functions inherited from Coupling | |
Coupling (const MInt couplingId) | |
virtual | ~Coupling ()=default |
Coupling (const Coupling &)=delete | |
Coupling & | operator= (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... | |
Private Member Functions | |
void | restrictData (const MInt level) |
Restrict the data (fine-coarse) on the given level. More... | |
void | computeCoarseLevelCorrection (const MInt level) |
Compute the coarse level correction tau. More... | |
void | storeRestrictedVariables (const MInt level) |
Store the restricted variables (required for the prolongation) More... | |
void | prolongData (const MInt level) |
Prolong the data of a coarse level. More... | |
void | correctCoarseBndryCells (const MInt solverId) |
void | resetSecondaryFlowVariables () |
for each solver except the finest, reset variables to NaN to ensure that only restricted information is used More... | |
void | resetMultiLevelVariables () |
for each solver, reset multilevel variables More... | |
void | initLeafCells () |
store internal leaf cells for each solver except for finest solver, for which they are not needed More... | |
void | initMapping () |
for each coarse solver, store cell map to next finer solver More... | |
void | initSplitMapping () |
for each coarse solver, store cell map of split-cells to next finer solver childs More... | |
void | initRestrictedCells () |
for each solver that will be restricted (all except the coarsest), store restricted cells More... | |
void | sanityCheck (const MInt mode=0) |
MInt | timer (const MString &name) |
MInt & | createTimer (const MString &name) |
void | initTimers () |
Private Attributes | |
std::map< MString, MInt > | m_timers {} |
MInt | m_timerGroup = -1 |
std::vector< std::vector< MInt > > | m_leafCells {} |
std::vector< std::vector< MInt > > | m_coarse2fine {} |
std::vector< std::vector< MInt > > | m_fine2coarse {} |
std::vector< std::vector< MInt > > | m_restrictedCells {} |
std::vector< std::vector< MInt > > | m_splitCellMapping {} |
MInt | m_prolongationMethod = false |
MBool | m_correctCoarseBndry = false |
Additional Inherited Members | |
Protected Member Functions inherited from CouplingFv< nDim, SysEqn > | |
MInt | noSolvers () const |
solverType & | fvSolver (const MInt solverId=0) const |
MInt | a_noFvCells () const |
MInt | a_noFvGridCells () const |
Protected Member Functions inherited from Coupling | |
MFloat | returnLoadRecord () const |
MFloat | returnIdleRecord () const |
Protected Attributes inherited from CouplingFv< nDim, SysEqn > | |
std::vector< solverType * > | m_fvSolvers {} |
Definition at line 30 of file couplerfvmultilevel.h.
using CouplerFvMultilevel< nDim, SysEqn >::Base = Coupling |
Definition at line 32 of file couplerfvmultilevel.h.
using CouplerFvMultilevel< nDim, SysEqn >::BaseFv = CouplingFv<nDim, SysEqn> |
Definition at line 33 of file couplerfvmultilevel.h.
using CouplerFvMultilevel< nDim, SysEqn >::Grid = CartesianGrid<nDim> |
Definition at line 35 of file couplerfvmultilevel.h.
using CouplerFvMultilevel< nDim, SysEqn >::GridProxy = typename SolverType::GridProxy |
Definition at line 36 of file couplerfvmultilevel.h.
using CouplerFvMultilevel< nDim, SysEqn >::SolverType = typename BaseFv::solverType |
Definition at line 34 of file couplerfvmultilevel.h.
CouplerFvMultilevel< nDim, SysEqn >::CouplerFvMultilevel | ( | const MInt | couplingId, |
std::vector< FvCartesianSolverXD< nDim, SysEqn > * > | solvers | ||
) |
Constructor only stores arguments. All non-trivial initialization is performed in init().
Definition at line 20 of file couplerfvmultilevel.cpp.
CouplerFvMultilevel< nDim, SysEqn >::~CouplerFvMultilevel |
Definition at line 31 of file couplerfvmultilevel.cpp.
|
inlineoverridevirtual |
|
inlinevirtual |
|
private |
Definition at line 437 of file couplerfvmultilevel.cpp.
|
private |
corrects the volume and the center of gravity of the boundary cells using fine cell information creates body surfaces using fine cell information does not work correctly with multipleGhostCell formulation (claudia)! See D.Hartman et al Computers & Fluids 37 (2008) 1103-1125: concept of averaged control volumes it is required that small and master cells are not yet merged!!!
Definition at line 961 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 1235 of file couplerfvmultilevel.cpp.
|
virtual |
Reimplemented from Coupling.
Definition at line 126 of file couplerfvmultilevel.cpp.
|
virtual |
Implements Coupling.
Definition at line 99 of file couplerfvmultilevel.cpp.
|
inlinevirtual |
|
inline |
Definition at line 386 of file coupling.h.
|
inlineoverridevirtual |
|
overridevirtual |
Implements Coupling.
|
private |
Definition at line 871 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 774 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 746 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 805 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 1272 of file couplerfvmultilevel.cpp.
|
inline |
Definition at line 385 of file coupling.h.
|
overridevirtual |
Implements Coupling.
Reimplemented in CouplerFvMultilevelInterpolation< nDim, SysEqn >.
Definition at line 170 of file couplerfvmultilevel.cpp.
|
overridevirtual |
Implements Coupling.
Definition at line 152 of file couplerfvmultilevel.cpp.
void CouplerFvMultilevel< nDim, SysEqn >::prolongation | ( | const MInt | level | ) |
Definition at line 492 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 550 of file couplerfvmultilevel.cpp.
|
inlineoverridevirtual |
|
private |
Definition at line 901 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 925 of file couplerfvmultilevel.cpp.
void CouplerFvMultilevel< nDim, SysEqn >::resetTau | ( | const MInt | level | ) |
Definition at line 263 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 281 of file couplerfvmultilevel.cpp.
void CouplerFvMultilevel< nDim, SysEqn >::restriction | ( | const MInt | level | ) |
Definition at line 201 of file couplerfvmultilevel.cpp.
void CouplerFvMultilevel< nDim, SysEqn >::sanityCheck | ( | ) |
|
private |
Perform different checks to ensure that everything is properly initialized and configured. mode 0: skip checks if the solver cells are created during the initial adaptation mode 1: second call after the initial adaptation (=> don't skip checks!)
Definition at line 1128 of file couplerfvmultilevel.cpp.
MBool CouplerFvMultilevel< nDim, SysEqn >::startTimer | ( | const MString & | name | ) |
Definition at line 1252 of file couplerfvmultilevel.cpp.
MBool CouplerFvMultilevel< nDim, SysEqn >::stopTimer | ( | const MString & | name | ) |
Definition at line 1262 of file couplerfvmultilevel.cpp.
|
private |
There is an exception in the Enthalpy case where the conservative variables are exchanged!
Definition at line 459 of file couplerfvmultilevel.cpp.
|
inlineoverridevirtual |
|
private |
Return existing timer id for given timer name or die.
[in] | name | Name of the timer. If it does not exist, MAIA aborts. |
Definition at line 1226 of file couplerfvmultilevel.cpp.
|
private |
Definition at line 93 of file couplerfvmultilevel.h.
|
private |
Definition at line 100 of file couplerfvmultilevel.h.
|
private |
Definition at line 94 of file couplerfvmultilevel.h.
|
private |
Definition at line 92 of file couplerfvmultilevel.h.
|
private |
Definition at line 99 of file couplerfvmultilevel.h.
|
private |
Definition at line 95 of file couplerfvmultilevel.h.
|
private |
Definition at line 96 of file couplerfvmultilevel.h.
|
private |
Definition at line 88 of file couplerfvmultilevel.h.
|
private |
Definition at line 87 of file couplerfvmultilevel.h.