MAIA bb96820c
Multiphysics at AIA
|
#include <lbdgape.h>
Classes | |
struct | ConversionFactors |
Public Member Functions | |
LbDgApe (const MInt couplingId, LbSolver *const lb, DgSolver *const dg) | |
~LbDgApe () | |
void | init () override |
void | finalizeCouplerInit () override |
solverType & | lbSolver (const MInt solverId=0) const |
![]() | |
CouplingDgApe (const MInt couplingId, DgCartesianSolverType *dg, DonorSolverType *ds) | |
Initialize timers and read properties in c'tor. More... | |
virtual | ~CouplingDgApe ()=default |
void | init () override |
void | finalizeSubCoupleInit (MInt) override final |
void | preCouple (MInt) final |
Calculate source terms and add to the external source terms of the DG solver. More... | |
void | subCouple (MInt, MInt, std::vector< MBool > &) override final |
void | postCouple (MInt) override final |
void | cleanUp () override final |
void | getCouplingTimings (std::vector< std::pair< MString, MFloat > > &timings, const MBool allTimings) override |
void | getDomainDecompositionInformation (std::vector< std::pair< MString, MInt > > &domainInfo) override final |
MInt | noCouplingTimers (const MBool allTimings) const override |
MInt | noMeanVars () const |
Return number of mean variables. More... | |
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... | |
![]() | |
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 |
MbCellCollector & | a_mbCell (const MInt id=0) |
MInt | a_boundaryCellMb (const MInt cellId, const MInt id=0) |
MFloat & | a_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 |
MInt & | a_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 |
MFloat & | a_variable (const MInt cellId, const MInt varId, const MInt id=0) |
MFloat & | a_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) |
![]() | |
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... | |
![]() | |
CouplingDg (const MInt couplingId, solverType *b) | |
virtual | ~CouplingDg ()=default |
solverType & | dgSolver () const |
Return MPI communicator. More... | |
MInt | solverId () const |
Return solver id. More... | |
DgSysEqnAcousticPerturb< nDim > & | sysEqn () |
Return reference to SysEqn object. More... | |
ElementCollector & | elements () |
Return reference to elements. More... | |
MInt | noElements () const |
Return number of elements. More... | |
MFloat * | externalSource () 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... | |
Private Member Functions | |
void | initConversionFactors () |
LbSolver & | donorSolver (const MInt xSolverId=0) const override |
void | getDonorVelocityAndVorticity (const std::vector< MInt > &donorCellIds, MFloatScratchSpace &p_velocity, MFloatScratchSpace &p_vorticity) override |
Get velocity and vorticity of donor solver. More... | |
virtual void | performUnitConversion (const MString &, const MInt, const MInt, MFloat *) override |
Transform data from donor solver unit system into DG unit system. More... | |
void | calcSourceLambLinearized (const MFloat *const, const MFloat *const, MFloat *) override |
void | calcSourceLambNonlinear (const MFloat *const velocity, const MFloat *const vorticity, MFloat *const sourceTerms) override |
void | calcSourceQmII (const MFloat *const, MFloat *const) override |
void | calcSourceQmIII (const MFloat *const, MFloat *) override |
void | calcSourceQe (const MFloat *const, const MFloat, MFloat *const) override |
void | calcSourceQc (const MFloat *const, MFloat *const, const MFloat, const MInt) override |
Private Attributes | |
struct LbDgApe::ConversionFactors | m_conversionLb2Dg |
Additional Inherited Members | |
![]() | |
static constexpr MInt | noVelocities () |
Return number of velocity variables. More... | |
static constexpr MInt | noVorticities () |
Return number of vorticity variables. More... | |
![]() | |
using | ElementCollector = maia::dg::collector::ElementCollector< nDim, DgSysEqnAcousticPerturb< nDim > > |
![]() | |
void | calcInitialCondition (const MFloat time) |
Apply initial conditions for this coupling condition. More... | |
void | initCoupler () |
Initialize the coupling condition (data structures). More... | |
void | initData () |
Initialize the data (initial conditions or for a restart) of the coupling condition. More... | |
void | initProjection () |
Initialize the projection information for spatial coupling. More... | |
void | initRestart (const MFloat time, const MFloat dt) |
Perform initializations for a restart. More... | |
void | initSourceFilter () |
Calculate source filter values for all elements and store element ids on which source terms need to be computed. More... | |
void | initTimers () |
Create timers. More... | |
MBool | loadCouplingData (const MString &filename, const MString &name_, const MInt stride, MFloat *data) |
Auxiliary method to load coupling data (i.e. anything coming from the LES) from a file. More... | |
void | loadMeanQuantities (const MBool skipNodeVars=false) |
Load mean velocities from file and store them to the node variables. More... | |
void | projectToElement (const MInt elementId, const MInt noVars, const MFloat *data, const MFloat *defaultValues, MFloat *target) |
Project the given data fields onto a single element. More... | |
void | saveFilterValues () |
Save filter values to file. More... | |
void | saveFilterValuesDonor () |
Save the filter values on the donor cells. More... | |
void | applyStoredSources (const MFloat time) |
Apply the stored source terms to the time derivative. More... | |
void | storeSources (const MFloat time, const MInt timeStep) |
Load coupling data from LES, then calculate, accumulate, project and store coupling source terms. More... | |
virtual void | performUnitConversion (const MString &, const MInt, const MInt, MFloat *) |
virtual void | calcSourceLambLinearized (const MFloat *const velocity, const MFloat *const vorticity, MFloat *sourceTerms)=0 |
virtual void | calcSourceLambNonlinear (const MFloat *const velocity, const MFloat *const vorticity, MFloat *const sourceTerms)=0 |
virtual void | calcSourceQmII (const MFloat *const velocity, MFloat *const sourceTerms)=0 |
virtual void | calcSourceQmIII (const MFloat *const velocity, MFloat *sourceTerms)=0 |
virtual void | calcSourceQe (const MFloat *const velocity, const MFloat time, MFloat *const sourceTerms)=0 |
virtual void | calcSourceQc (const MFloat *const velocity, MFloat *const sourceTerms, const MFloat time, const MInt timeStep)=0 |
void | saveSourceTermsDonorGrid (const MInt timeStep, const MFloat *const data) |
Store the source terms on the donor grid. More... | |
void | saveSourceTermsTargetGrid (const MInt timeStep) |
Store the source terms on the target grid, i.e. after interpolation. More... | |
void | readProperties () override final |
Read properties and store in member variables. More... | |
void | checkProperties () override final |
virtual DonorSolverType & | donorSolver (const MInt solverId=0) const=0 |
virtual void | getDonorVelocityAndVorticity (const std::vector< MInt > &donorCellIds, MFloatScratchSpace &p_velocity, MFloatScratchSpace &p_vorticity)=0 |
![]() | |
MInt | noSolvers () const |
solverType & | lbSolver (const MInt solverId=0) const |
LbBndCnd & | lbBndCnd (const MInt id=0) |
![]() | |
MFloat | returnLoadRecord () const |
MFloat | returnIdleRecord () const |
![]() | |
MBool | m_isRestart |
Store whether this is a restart (in case special treatment is necessary) More... | |
MBool | m_hasDgCartesianSolver |
Store whether this domain has DG cells/elements. More... | |
MBool | m_hasDonorCartesianSolver |
Store whether this domain has Cartesian donor solver cells. More... | |
MInt | m_maxNoNodesXD |
Maximum number of nodes of an element (corresponding to maxPolyDeg) More... | |
MFloat | m_fixedTimeStep |
Fixed time step to use. More... | |
MFloat | m_previousTime |
Previous time for the calculation of time derivatives. More... | |
MInt | m_previousTimeStep |
Previous time step (to determine whether new sources need to be calculated) More... | |
std::vector< MInt > | m_activeMeanVars |
List of active mean variables for all active source terms. More... | |
MString | m_meanDataFileName |
File name for mean quantities. More... | |
std::vector< MInt > | m_activeSourceTerms |
List of active source terms. More... | |
MBool | m_saveSourceTermsDonorGrid |
Store whether the sources on the donor grid should be saved as well. More... | |
MInt | m_saveSourceTermsInterval |
Interval at which source term data should be saved to disk. More... | |
MBool | m_calcProjectionError |
Calculate the L2 error of the Galerkin projection. More... | |
MInt | m_noActiveDonorCells |
MInt | m_noDonorCells |
Total number of donor cells on this domain. More... | |
std::vector< std::vector< MInt > > | m_elementDonorLevels |
Donor cell levels relative to element. More... | |
std::vector< std::vector< MInt > > | m_elementDonorMap |
Mapping from donor cells to elements. More... | |
std::vector< std::vector< MInt > > | m_elementDonorPos |
Donor cell positions on the corresponding cell level. More... | |
std::vector< ProjectionType > | m_projection |
Galerkin projection (access by polynomial degree) More... | |
MBool | m_isFirstSourceCalculation |
Store whether this is the first calculation of the source terms. More... | |
std::vector< MFloat > | m_sourceTerms |
Local storage for source terms. More... | |
std::vector< MInt > | m_calcSourceDonorCells |
List of all donor cell ids for which source terms need to be computed. More... | |
std::vector< MInt > | m_calcSourceElements |
List of all element ids for which source terms need to be computed. More... | |
MFloat | m_sourceFactor |
Factor by which the source terms are multiplied. More... | |
MBool | m_checkConservation |
Check if each Galerkin projection is conservative. More... | |
MFloat | m_maxConservationError |
Maximum conservation error. More... | |
MFloat | m_maxL2Error |
Maximum computed L2 error of the Galerkin projection. More... | |
std::vector< MFloat > | m_meanVars |
Local storage for mean variables of the donor cells. More... | |
std::vector< MInt > | m_elementInsideBody |
Marker if elements are inside a geometric object. More... | |
Filter< nDim > | m_sourceTermFilter |
Auxiliary object that handles source filtering. More... | |
std::vector< MFloat > | m_filter |
Local storage for source filter values. More... | |
std::vector< MFloat > | m_filterDonor |
Local storage for source filter values on donor cells. More... | |
MInt | m_noCutModesLowPass |
Number of modes to cut using the low-pass source term. More... | |
MBool | m_useLowPassFilter |
Switch low pass on and off to allow disabling e.g. for node vars. More... | |
std::vector< MFloatTensor > | m_vdmLowPass |
Vandermonde matrix/matrices for the low-pass filter. More... | |
MBool | m_applySourceFilterDonor |
Apply source filter on donor cells or on DG elements after projection. More... | |
MBool | m_saveSourceTermFilter |
Store whether filter values should be written to a file at initialization. More... | |
MBool | m_projectionFilter |
Use spatial projection filter (i.e. exclude elements from the projection) More... | |
std::vector< MFloat > | m_projectionFilterBox |
Spatial projection filter box (excluding) More... | |
std::array< MInt, s_totalNoMeanVars > | m_meanVarsIndex |
std::array< MInt, Timers::_count > | m_timers |
![]() | |
solverType * | m_dgSolver |
![]() | |
static const MInt | s_totalNoMeanVars |
static const std::array< MString, ST::totalNoSourceTerms > | s_sourceTermNames |
Hold indices for source terms. More... | |
using LbDgApe< nDim, nDist, SysEqn >::BaseDg = CouplingDgApe<nDim, BaseLb> |
using LbDgApe< nDim, nDist, SysEqn >::BaseLb = CouplingLB<nDim, nDist, SysEqn> |
using LbDgApe< nDim, nDist, SysEqn >::DgSolver = typename BaseDg::DgCartesianSolverType |
using LbDgApe< nDim, nDist, SysEqn >::LbSolver = typename BaseLb::solverType |
using LbDgApe< nDim, nDist, SysEqn >::SysEqnDg = DgSysEqnAcousticPerturb<nDim> |
|
inline |
|
inlineoverrideprivatevirtual |
Implements CouplingDgApe< nDim, CouplingLB< nDim, nDist, SysEqn > >.
Definition at line 52 of file lbdgape.h.
|
overrideprivatevirtual |
Implements CouplingDgApe< nDim, CouplingLB< nDim, nDist, SysEqn > >.
Definition at line 141 of file lbdgape.cpp.
|
inlineoverrideprivatevirtual |
|
inlineoverrideprivatevirtual |
|
inlineoverrideprivatevirtual |
Implements CouplingDgApe< nDim, CouplingLB< nDim, nDist, SysEqn > >.
Definition at line 58 of file lbdgape.h.
|
inlineoverrideprivatevirtual |
Implements CouplingDgApe< nDim, CouplingLB< nDim, nDist, SysEqn > >.
Definition at line 61 of file lbdgape.h.
|
inlineoverrideprivatevirtual |
Implements CouplingDgApe< nDim, CouplingLB< nDim, nDist, SysEqn > >.
Definition at line 46 of file lbdgape.h.
Implements Coupling.
Definition at line 14 of file lbdgape.cpp.
|
overrideprivatevirtual |
[in] | donorCellIds | collections of cellIds of interest |
[out] | p_velocity | pointer to write velocity field |
[out] | p_vorticity | pointer to write vorticity field |
Implements CouplingDgApe< nDim, CouplingLB< nDim, nDist, SysEqn > >.
Definition at line 70 of file lbdgape.cpp.
Implements Coupling.
Definition at line 25 of file lbdgape.cpp.
|
inline |
Definition at line 454 of file coupling.h.
|
overrideprivatevirtual |
Reimplemented from CouplingDgApe< nDim, CouplingLB< nDim, nDist, SysEqn > >.
Definition at line 105 of file lbdgape.cpp.
|
private |