chombo-discharge
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Realm Class Reference

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...
 
Realmoperator= (const Realm &a_other)=delete
 Disallowed copy assignment operator. More...
 
Realmoperator= (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...
 
EBAMRParticleMeshgetParticleMesh (const phase::which_phase a_phase)
 Get the particle mesh operator. More...
 
EBAMRSurfaceDepositiongetSurfaceDeposition (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 EBAMRFABgetLevelset (const phase::which_phase a_phase) const
 Get level-set function. More...
 
const AMRMaskgetMask (const std::string a_mask, const int a_buffer) const
 Get AMR mask. More...
 
const AMRMaskgetValidCells () 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.
 
PhaseRealmgetRealm (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< MultiFluidIndexSpacem_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 >, AMRMaskm_masks
 Masks.
 

Detailed Description

Class for holding multifluid Realms, which are the Realms that we actually use.

Constructor & Destructor Documentation

◆ Realm() [1/2]

Realm::Realm ( const Realm a_other)
delete

Disallowed copy ctor.

Parameters
[in]a_otherOther realm

◆ Realm() [2/2]

Realm::Realm ( const Realm &&  a_other)
delete

Disallowed move ctor.

Parameters
[in]a_otherOther realm

Member Function Documentation

◆ define()

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.

Parameters
[in]a_gridsGrids on each level, i.e. boxes and processor distributions
[in]a_domainsProblem domains
[in]a_refRatRefinement ratios
[in]a_dxGrid resolutions
[in]a_probLoLower-left corner of physical domain
[in]a_finestLevelFinest grid level
[in]a_blockingFactorGrid blocking factor
[in]a_ebGhostNumber of ghost cells used for geometric information when making operators
[in]a_numGhostNumber of ghost cells in data holders
[in]a_lsfGhostNumber of ghost cells used when computing the level set on the mesh
[in]a_redistRadRedistribution radius
[in]a_mgInterpOrderMultigrid ghost cell interpolation order
[in]a_mgInterpRadiusMultigrid ghost cell interpolation radius
[in]a_mgInterpWeightMultigrid ghost cell interpolation weight (for least squares)
[in]a_centroidStencilStencil type for interpolation from cell centers to cell centroids
[in]a_ebStencilStencil type for interpolation from cell centers to eb centroids
[in]a_baseifImplicit/signed distance function
[in]a_mfisEBIndexSpace discrete information

◆ defineHaloMask()

void Realm::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 
)
protected

Define particle halo masks. This is the level-version.

Parameters
[out]a_coarMaskMask
[in]a_domainCoarCoarse domain
[in]a_domainFineFine domain
[in]a_gridsCoarCoarse grids
[in]a_gridsFineFine grids
[in]a_bufferBuffer (i.e. width of "halo")
[in]a_refRatRefinement ratio between the two levels

◆ defineHaloMasks()

void Realm::defineHaloMasks ( const int  a_lmin)
protected

Define particle halo amsks.

Parameters
[in]a_lminCoarsest level that changed during regrid

◆ defineMasks()

void Realm::defineMasks ( const int  a_lmin)
protected

Define masks.

Parameters
[in]a_lminCoarsest level that changed during regrid

◆ defineMFLevelGrid()

void Realm::defineMFLevelGrid ( const int  a_lmin)
protected

Define MFLevelGrid.

Parameters
[in]a_lminCoarsest level that changed during regrid

◆ defineValidCells()

void Realm::defineValidCells ( )
protected

Define the valid cell region mask.

Parameters
[in]a_lminCoarsest level that changed during regrid.

◆ getCentroidInterpolationStencils()

const IrregAmrStencil< CentroidInterpolationStencil > & Realm::getCentroidInterpolationStencils ( const phase::which_phase  a_phase) const

Get stencils for interpolating from cell center to centroids (for specified phase)

Parameters
[in]a_phasePhase

◆ getCoarseAverage()

Vector< RefCountedPtr< EBCoarAve > > & Realm::getCoarseAverage ( const phase::which_phase  a_phase)

Get data coarsening utility.

Parameters
[in]a_phasePhase

◆ getDx()

const Vector< Real > & Realm::getDx ( ) const

Get grid resolutions.

Returns
m_dx

◆ getEbCentroidInterpolationStencilStencils()

const IrregAmrStencil< EbCentroidInterpolationStencil > & Realm::getEbCentroidInterpolationStencilStencils ( const phase::which_phase  a_phase) const

Get stencils for interpolating from cell center to eb centroids.

Parameters
[in]a_phasePhase

◆ getEBIndexSpace()

const RefCountedPtr< EBIndexSpace > & Realm::getEBIndexSpace ( const phase::which_phase  a_phase) const

Get EBIndexSpace for particular phase.

Parameters
[in]a_phasePhase

◆ getEBISLayout()

const Vector< EBISLayout > & Realm::getEBISLayout ( const phase::which_phase  a_phase) const

Get EBISLayout for particular phase.

Parameters
[in]a_phasePhase

◆ getEBLevelGrid()

const Vector< RefCountedPtr< EBLevelGrid > > & Realm::getEBLevelGrid ( const phase::which_phase  a_phase) const

Get EBLevelGrid for particular phase.

Parameters
[in]a_phasePhase

◆ getEBLevelGridCoFi()

const Vector< RefCountedPtr< EBLevelGrid > > & Realm::getEBLevelGridCoFi ( const phase::which_phase  a_phase) const

Get coarsened fine EBLevelGrid for particular phase.

Parameters
[in]a_phasePhase

◆ getFineInterp()

Vector< RefCountedPtr< EBCoarseToFineInterp > > & Realm::getFineInterp ( const phase::which_phase  a_phase)

Get piecewise linear ghost cell interpolation utility.

Parameters
[in]a_phasePhase

◆ getFluxRegister()

Vector< RefCountedPtr< EBReflux > > & Realm::getFluxRegister ( const phase::which_phase  a_phase)

Get flux register utility.

Parameters
[in]a_phasePhase

◆ getGhostCellInterpolator()

Vector< RefCountedPtr< EBGhostCellInterpolator > > & Realm::getGhostCellInterpolator ( const phase::which_phase  a_phase)

Get ghost cell interpolator.

Parameters
[in]a_phasePhase

◆ getGradientOp()

const Vector< RefCountedPtr< EBGradient > > & Realm::getGradientOp ( const phase::which_phase  a_phase) const

Get gradient operator.

Parameters
[in]a_phasePhase

◆ getGrids()

const Vector< DisjointBoxLayout > & Realm::getGrids ( ) const

Get AMR grids.

Returns
m_grids

◆ getLevelset()

const EBAMRFAB & Realm::getLevelset ( const phase::which_phase  a_phase) const

Get level-set function.

Parameters
[in]a_phasePhase

◆ getMask()

const AMRMask & Realm::getMask ( const std::string  a_mask,
const int  a_buffer 
) const

Get AMR mask.

Parameters
[in]a_phasePhase

◆ getMultigridInterpolator()

Vector< RefCountedPtr< EBMultigridInterpolator > > & Realm::getMultigridInterpolator ( const phase::which_phase  a_phase)

Get the multigrid interpolator.

Parameters
[in]a_phasePhase

◆ getNonConservativeDivergenceStencils()

const IrregAmrStencil< NonConservativeDivergenceStencil > & Realm::getNonConservativeDivergenceStencils ( const phase::which_phase  a_phase) const

Get stencils for computing "non-conservative divergences".

Parameters
[in]a_phasePhase

◆ getParticleMesh()

EBAMRParticleMesh & Realm::getParticleMesh ( const phase::which_phase  a_phase)

Get the particle mesh operator.

Parameters
[in]a_phaseWhich phase

◆ getRealm()

PhaseRealm & Realm::getRealm ( const phase::which_phase  a_phase)
protected

Get a particular realm.

Parameters
[in]a_phasePhase

◆ getRedistributionOp()

Vector< RefCountedPtr< EBFluxRedistribution > > & Realm::getRedistributionOp ( const phase::which_phase  a_phase)

Get the redistribution operators.

Parameters
[in]a_phasePhase (gas or solid)

◆ getRefinementRatios()

const Vector< int > & Realm::getRefinementRatios ( ) const

Get refinement ratios.

Returns
m_refinementRatios

◆ getSurfaceDeposition()

EBAMRSurfaceDeposition & Realm::getSurfaceDeposition ( const phase::which_phase  a_phase)

Get the particle mesh operator.

Parameters
[in]a_phaseWhich phase

◆ getVofIterator()

Vector< RefCountedPtr< LayoutData< VoFIterator > > > & Realm::getVofIterator ( const phase::which_phase  a_phase) const

Get VoFIterators for particular phase.

Parameters
[in]a_phasePhase

◆ operator=() [1/2]

Realm& Realm::operator= ( const Realm &&  a_other)
delete

Disallowed move assignment operator.

Parameters
[in]a_otherOther realm

◆ operator=() [2/2]

Realm& Realm::operator= ( const Realm a_other)
delete

Disallowed copy assignment operator.

Parameters
[in]a_otherOther realm

◆ queryMask()

bool Realm::queryMask ( const std::string  a_mask,
const int  a_buffer 
) const

Query if a mask has been registered.

Parameters
[in]a_maskMask name
[in]a_phasePhase where mask is registered
Returns
true if mask has been registered

◆ queryOperator()

bool Realm::queryOperator ( const std::string  a_operator,
const phase::which_phase  a_phase 
) const

Query if an AMR operator has been registered.

Parameters
[in]a_operatoroperator name
[in]a_phasePhase where operator is registered
Returns
True if operator has been registered and false otherwise

◆ registerMask()

void Realm::registerMask ( const std::string  a_mask,
const int  a_buffer 
)

Register a mask.

Parameters
[in]a_maskMask name
[in]a_phasePhase where mask is registered

◆ registerOperator()

void Realm::registerOperator ( const std::string  a_operator,
const phase::which_phase  a_phase 
)

Register an AMR operator.

Parameters
[in]a_operatorOperator name
[in]a_phasePhase where operator is registered

Issues run-time error if a_operator can't be recognized

◆ regridBase()

void Realm::regridBase ( const int  a_lmin)

Regrid method for EBAMR base.

Parameters
[in]a_lminCoarsest grid level that changed.

This regrids EBLevelGrid and iterators

◆ regridOperators()

void Realm::regridOperators ( const int  a_lmin)

Regrid method for EBAMR operators.

Parameters
[in]a_lminCoarsest grid level that changed.

This regrids all operators.

◆ setGrids()

void Realm::setGrids ( const Vector< DisjointBoxLayout > &  a_grids,
const int  a_finestLevel 
)

Set grid method.

Parameters
[in]a_gridsNew grids
[in]a_finestLevelNew finest grid level

This sets m_grids to be a_grids, but does not perform a regrid of remaining members.

Member Data Documentation

◆ m_realms

std::map<phase::which_phase, RefCountedPtr<PhaseRealm> > Realm::m_realms
mutableprotected

Phase realms.

Mutable because some of the operators are mutable.


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