chombo-discharge
|
Class for holding multifluid Realms, which are the Realms that we actually use. More...
#include <CD_Realm.H>
Public Member Functions | |
Realm () | |
Default constructor. Must subsequently call define. | |
Realm (const Realm &a_other)=delete | |
Disallowed copy ctor. More... | |
Realm (const Realm &&a_other)=delete | |
Disallowed move ctor. More... | |
Realm & | operator= (const Realm &a_other)=delete |
Disallowed copy assignment operator. More... | |
Realm & | operator= (const Realm &&a_other)=delete |
Disallowed move assignment operator. More... | |
~Realm () | |
Destructor. | |
void | define (const Vector< DisjointBoxLayout > &a_grids, const Vector< ProblemDomain > &a_domains, const Vector< int > &a_refRat, const Vector< Real > &a_dx, const RealVect a_probLo, const int a_finestLevel, const int a_blockingFactor, const int a_ebGhost, const int a_numGhost, const int a_lsfGhost, const int a_redistRad, const int a_mgInterpOrder, const int a_mgInterpRadius, const int a_mgInterpWeight, const IrregStencil::StencilType a_centroidStencil, const IrregStencil::StencilType a_ebStencil, const std::map< phase::which_phase, RefCountedPtr< BaseIF >> a_baseif, const RefCountedPtr< MultiFluidIndexSpace > &a_mfis) |
Full define function. More... | |
void | setGrids (const Vector< DisjointBoxLayout > &a_grids, const int a_finestLevel) |
Set grid method. More... | |
void | preRegrid () |
Perform pre-regrid operations. | |
void | regridBase (const int a_lmin) |
Regrid method for EBAMR base. More... | |
void | regridOperators (const int a_lmin) |
Regrid method for EBAMR operators. More... | |
void | registerOperator (const std::string a_operator, const phase::which_phase a_phase) |
Register an AMR operator. More... | |
bool | queryOperator (const std::string a_operator, const phase::which_phase a_phase) const |
Query if an AMR operator has been registered. More... | |
void | registerMask (const std::string a_mask, const int a_buffer) |
Register a mask. More... | |
bool | queryMask (const std::string a_mask, const int a_buffer) const |
Query if a mask has been registered. More... | |
const Vector< int > & | getRefinementRatios () const |
Get refinement ratios. More... | |
const Vector< Real > & | getDx () const |
Get grid resolutions. More... | |
const Vector< DisjointBoxLayout > & | getGrids () const |
Get AMR grids. More... | |
const Vector< ProblemDomain > & | getDomains () const |
Get problem domains. | |
Vector< RefCountedPtr< MFLevelGrid > > & | getMFLevelGrid () |
Get MFLevelGrids. | |
const RefCountedPtr< EBIndexSpace > & | getEBIndexSpace (const phase::which_phase a_phase) const |
Get EBIndexSpace for particular phase. More... | |
const Vector< EBISLayout > & | getEBISLayout (const phase::which_phase a_phase) const |
Get EBISLayout for particular phase. More... | |
const Vector< RefCountedPtr< EBLevelGrid > > & | getEBLevelGrid (const phase::which_phase a_phase) const |
Get EBLevelGrid for particular phase. More... | |
const Vector< RefCountedPtr< EBLevelGrid > > & | getEBLevelGridCoFi (const phase::which_phase a_phase) const |
Get coarsened fine EBLevelGrid for particular phase. More... | |
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & | getVofIterator (const phase::which_phase a_phase) const |
Get VoFIterators for particular phase. More... | |
const IrregAmrStencil< CentroidInterpolationStencil > & | getCentroidInterpolationStencils (const phase::which_phase a_phase) const |
Get stencils for interpolating from cell center to centroids (for specified phase) More... | |
const IrregAmrStencil< EbCentroidInterpolationStencil > & | getEbCentroidInterpolationStencilStencils (const phase::which_phase a_phase) const |
Get stencils for interpolating from cell center to eb centroids. More... | |
const IrregAmrStencil< NonConservativeDivergenceStencil > & | getNonConservativeDivergenceStencils (const phase::which_phase a_phase) const |
Get stencils for computing "non-conservative divergences". More... | |
Vector< RefCountedPtr< EBCoarAve > > & | getCoarseAverage (const phase::which_phase a_phase) |
Get data coarsening utility. More... | |
Vector< RefCountedPtr< EBMultigridInterpolator > > & | getMultigridInterpolator (const phase::which_phase a_phase) |
Get the multigrid interpolator. More... | |
EBAMRParticleMesh & | getParticleMesh (const phase::which_phase a_phase) |
Get the particle mesh operator. More... | |
EBAMRSurfaceDeposition & | getSurfaceDeposition (const phase::which_phase a_phase) |
Get the particle mesh operator. More... | |
const Vector< RefCountedPtr< EBGradient > > & | getGradientOp (const phase::which_phase a_phase) const |
Get gradient operator. More... | |
Vector< RefCountedPtr< EBGhostCellInterpolator > > & | getGhostCellInterpolator (const phase::which_phase a_phase) |
Get ghost cell interpolator. More... | |
Vector< RefCountedPtr< EBCoarseToFineInterp > > & | getFineInterp (const phase::which_phase a_phase) |
Get piecewise linear ghost cell interpolation utility. More... | |
Vector< RefCountedPtr< EBReflux > > & | getFluxRegister (const phase::which_phase a_phase) |
Get flux register utility. More... | |
Vector< RefCountedPtr< EBFluxRedistribution > > & | getRedistributionOp (const phase::which_phase a_phase) |
Get the redistribution operators. More... | |
const EBAMRFAB & | getLevelset (const phase::which_phase a_phase) const |
Get level-set function. More... | |
const AMRMask & | getMask (const std::string a_mask, const int a_buffer) const |
Get AMR mask. More... | |
const AMRMask & | getValidCells () const |
Get all valid cells. | |
const Vector< RefCountedPtr< LevelTiles > > & | getLevelTiles () const noexcept |
Get the tiled space. | |
Static Public Attributes | |
static const std::string | Primal = "primal" |
Identifier for perimal realm. | |
static const std::string | primal = "primal" |
Identifier for perimal realm. | |
Protected Member Functions | |
void | defineMFLevelGrid (const int a_lmin) |
Define MFLevelGrid. More... | |
void | defineMasks (const int a_lmin) |
Define masks. More... | |
void | defineHaloMasks (const int a_lmin) |
Define particle halo amsks. More... | |
void | defineHaloMask (LevelData< BaseFab< bool >> &a_coarMask, const ProblemDomain &a_domainCoar, const ProblemDomain &a_domainFine, const DisjointBoxLayout &a_gridsCoar, const DisjointBoxLayout &a_gridsFine, const int a_buffer, const int a_refRat) |
Define particle halo masks. This is the level-version. More... | |
void | defineValidCells () |
Define the valid cell region mask. More... | |
void | defineLevelTiles () noexcept |
Define the tiled space. | |
PhaseRealm & | getRealm (const phase::which_phase a_phase) |
Get a particular realm. More... | |
Protected Attributes | |
bool | m_isDefined |
Realm defined or not. | |
int | m_verbosity |
Realm verbosity. Used for debugging. | |
int | m_finestLevel |
Finest AMR level. | |
int | m_blockingFactor |
Blocking factor. | |
RealVect | m_probLo |
Physical coordinates of lower-left corner in simulation domain. | |
Vector< Real > | m_dx |
Grid resolutions. | |
Vector< int > | m_refinementRatios |
Refinement ratios. | |
Vector< DisjointBoxLayout > | m_grids |
AMR grids. | |
Vector< ProblemDomain > | m_domains |
Domains. | |
Vector< RefCountedPtr< MFLevelGrid > > | m_mflg |
MFLevelGrids. | |
Vector< RefCountedPtr< LevelTiles > > | m_levelTiles |
Level "tiles" – i.e. the grids viewed as constant-size boxes. | |
RefCountedPtr< MultiFluidIndexSpace > | m_multifluidIndexSpace |
Index spaces. | |
AMRMask | m_validCells |
Mask which is true for all valid cells. | |
std::map< phase::which_phase, RefCountedPtr< PhaseRealm > > | m_realms |
Phase realms. More... | |
std::map< phase::which_phase, RefCountedPtr< BaseIF > > | m_baseif |
Implicit/signed distance functions on each phase. | |
std::map< std::pair< std::string, int >, AMRMask > | m_masks |
Masks. | |
Class for holding multifluid Realms, which are the Realms that we actually use.
|
delete |
Disallowed copy ctor.
[in] | a_other | Other realm |
|
delete |
Disallowed move ctor.
[in] | a_other | Other realm |
void Realm::define | ( | const Vector< DisjointBoxLayout > & | a_grids, |
const Vector< ProblemDomain > & | a_domains, | ||
const Vector< int > & | a_refRat, | ||
const Vector< Real > & | a_dx, | ||
const RealVect | a_probLo, | ||
const int | a_finestLevel, | ||
const int | a_blockingFactor, | ||
const int | a_ebGhost, | ||
const int | a_numGhost, | ||
const int | a_lsfGhost, | ||
const int | a_redistRad, | ||
const int | a_mgInterpOrder, | ||
const int | a_mgInterpRadius, | ||
const int | a_mgInterpWeight, | ||
const IrregStencil::StencilType | a_centroidStencil, | ||
const IrregStencil::StencilType | a_ebStencil, | ||
const std::map< phase::which_phase, RefCountedPtr< BaseIF >> | a_baseif, | ||
const RefCountedPtr< MultiFluidIndexSpace > & | a_mfis | ||
) |
Full define function.
[in] | a_grids | Grids on each level, i.e. boxes and processor distributions |
[in] | a_domains | Problem domains |
[in] | a_refRat | Refinement ratios |
[in] | a_dx | Grid resolutions |
[in] | a_probLo | Lower-left corner of physical domain |
[in] | a_finestLevel | Finest grid level |
[in] | a_blockingFactor | Grid blocking factor |
[in] | a_ebGhost | Number of ghost cells used for geometric information when making operators |
[in] | a_numGhost | Number of ghost cells in data holders |
[in] | a_lsfGhost | Number of ghost cells used when computing the level set on the mesh |
[in] | a_redistRad | Redistribution radius |
[in] | a_mgInterpOrder | Multigrid ghost cell interpolation order |
[in] | a_mgInterpRadius | Multigrid ghost cell interpolation radius |
[in] | a_mgInterpWeight | Multigrid ghost cell interpolation weight (for least squares) |
[in] | a_centroidStencil | Stencil type for interpolation from cell centers to cell centroids |
[in] | a_ebStencil | Stencil type for interpolation from cell centers to eb centroids |
[in] | a_baseif | Implicit/signed distance function |
[in] | a_mfis | EBIndexSpace discrete information |
|
protected |
Define particle halo masks. This is the level-version.
[out] | a_coarMask | Mask |
[in] | a_domainCoar | Coarse domain |
[in] | a_domainFine | Fine domain |
[in] | a_gridsCoar | Coarse grids |
[in] | a_gridsFine | Fine grids |
[in] | a_buffer | Buffer (i.e. width of "halo") |
[in] | a_refRat | Refinement ratio between the two levels |
|
protected |
Define particle halo amsks.
[in] | a_lmin | Coarsest level that changed during regrid |
|
protected |
Define masks.
[in] | a_lmin | Coarsest level that changed during regrid |
|
protected |
Define MFLevelGrid.
[in] | a_lmin | Coarsest level that changed during regrid |
|
protected |
Define the valid cell region mask.
[in] | a_lmin | Coarsest level that changed during regrid. |
const IrregAmrStencil< CentroidInterpolationStencil > & Realm::getCentroidInterpolationStencils | ( | const phase::which_phase | a_phase | ) | const |
Get stencils for interpolating from cell center to centroids (for specified phase)
[in] | a_phase | Phase |
Vector< RefCountedPtr< EBCoarAve > > & Realm::getCoarseAverage | ( | const phase::which_phase | a_phase | ) |
Get data coarsening utility.
[in] | a_phase | Phase |
const Vector< Real > & Realm::getDx | ( | ) | const |
Get grid resolutions.
const IrregAmrStencil< EbCentroidInterpolationStencil > & Realm::getEbCentroidInterpolationStencilStencils | ( | const phase::which_phase | a_phase | ) | const |
Get stencils for interpolating from cell center to eb centroids.
[in] | a_phase | Phase |
const RefCountedPtr< EBIndexSpace > & Realm::getEBIndexSpace | ( | const phase::which_phase | a_phase | ) | const |
Get EBIndexSpace for particular phase.
[in] | a_phase | Phase |
const Vector< EBISLayout > & Realm::getEBISLayout | ( | const phase::which_phase | a_phase | ) | const |
Get EBISLayout for particular phase.
[in] | a_phase | Phase |
const Vector< RefCountedPtr< EBLevelGrid > > & Realm::getEBLevelGrid | ( | const phase::which_phase | a_phase | ) | const |
Get EBLevelGrid for particular phase.
[in] | a_phase | Phase |
const Vector< RefCountedPtr< EBLevelGrid > > & Realm::getEBLevelGridCoFi | ( | const phase::which_phase | a_phase | ) | const |
Get coarsened fine EBLevelGrid for particular phase.
[in] | a_phase | Phase |
Vector< RefCountedPtr< EBCoarseToFineInterp > > & Realm::getFineInterp | ( | const phase::which_phase | a_phase | ) |
Get piecewise linear ghost cell interpolation utility.
[in] | a_phase | Phase |
Vector< RefCountedPtr< EBReflux > > & Realm::getFluxRegister | ( | const phase::which_phase | a_phase | ) |
Get flux register utility.
[in] | a_phase | Phase |
Vector< RefCountedPtr< EBGhostCellInterpolator > > & Realm::getGhostCellInterpolator | ( | const phase::which_phase | a_phase | ) |
Get ghost cell interpolator.
[in] | a_phase | Phase |
const Vector< RefCountedPtr< EBGradient > > & Realm::getGradientOp | ( | const phase::which_phase | a_phase | ) | const |
Get gradient operator.
[in] | a_phase | Phase |
const Vector< DisjointBoxLayout > & Realm::getGrids | ( | ) | const |
Get AMR grids.
const EBAMRFAB & Realm::getLevelset | ( | const phase::which_phase | a_phase | ) | const |
Get level-set function.
[in] | a_phase | Phase |
const AMRMask & Realm::getMask | ( | const std::string | a_mask, |
const int | a_buffer | ||
) | const |
Get AMR mask.
[in] | a_phase | Phase |
Vector< RefCountedPtr< EBMultigridInterpolator > > & Realm::getMultigridInterpolator | ( | const phase::which_phase | a_phase | ) |
Get the multigrid interpolator.
[in] | a_phase | Phase |
const IrregAmrStencil< NonConservativeDivergenceStencil > & Realm::getNonConservativeDivergenceStencils | ( | const phase::which_phase | a_phase | ) | const |
Get stencils for computing "non-conservative divergences".
[in] | a_phase | Phase |
EBAMRParticleMesh & Realm::getParticleMesh | ( | const phase::which_phase | a_phase | ) |
Get the particle mesh operator.
[in] | a_phase | Which phase |
|
protected |
Get a particular realm.
[in] | a_phase | Phase |
Vector< RefCountedPtr< EBFluxRedistribution > > & Realm::getRedistributionOp | ( | const phase::which_phase | a_phase | ) |
Get the redistribution operators.
[in] | a_phase | Phase (gas or solid) |
const Vector< int > & Realm::getRefinementRatios | ( | ) | const |
Get refinement ratios.
EBAMRSurfaceDeposition & Realm::getSurfaceDeposition | ( | const phase::which_phase | a_phase | ) |
Get the particle mesh operator.
[in] | a_phase | Which phase |
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & Realm::getVofIterator | ( | const phase::which_phase | a_phase | ) | const |
Get VoFIterators for particular phase.
[in] | a_phase | Phase |
Disallowed move assignment operator.
[in] | a_other | Other realm |
Disallowed copy assignment operator.
[in] | a_other | Other realm |
bool Realm::queryMask | ( | const std::string | a_mask, |
const int | a_buffer | ||
) | const |
Query if a mask has been registered.
[in] | a_mask | Mask name |
[in] | a_phase | Phase where mask is registered |
bool Realm::queryOperator | ( | const std::string | a_operator, |
const phase::which_phase | a_phase | ||
) | const |
Query if an AMR operator has been registered.
[in] | a_operator | operator name |
[in] | a_phase | Phase where operator is registered |
void Realm::registerMask | ( | const std::string | a_mask, |
const int | a_buffer | ||
) |
Register a mask.
[in] | a_mask | Mask name |
[in] | a_phase | Phase where mask is registered |
void Realm::registerOperator | ( | const std::string | a_operator, |
const phase::which_phase | a_phase | ||
) |
Register an AMR operator.
[in] | a_operator | Operator name |
[in] | a_phase | Phase where operator is registered |
Issues run-time error if a_operator can't be recognized
void Realm::regridBase | ( | const int | a_lmin | ) |
Regrid method for EBAMR base.
[in] | a_lmin | Coarsest grid level that changed. |
This regrids EBLevelGrid and iterators
void Realm::regridOperators | ( | const int | a_lmin | ) |
Regrid method for EBAMR operators.
[in] | a_lmin | Coarsest grid level that changed. |
This regrids all operators.
void Realm::setGrids | ( | const Vector< DisjointBoxLayout > & | a_grids, |
const int | a_finestLevel | ||
) |
Set grid method.
[in] | a_grids | New grids |
[in] | a_finestLevel | New finest grid level |
This sets m_grids to be a_grids, but does not perform a regrid of remaining members.
|
mutableprotected |
Phase realms.
Mutable because some of the operators are mutable.