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

Class that holds important things for doing AMR over a specific phase and processor distribution. More...

#include <CD_PhaseRealm.H>

Collaboration diagram for PhaseRealm:
Collaboration graph
[legend]

Public Member Functions

 PhaseRealm ()
 Default constructor. Must subsequently call define.
 
 PhaseRealm (const PhaseRealm &a_other)=delete
 Disallowed copy ctor. More...
 
 PhaseRealm (const PhaseRealm &&a_other)=delete
 Disallowed move ctor. More...
 
PhaseRealmoperator= (const PhaseRealm &a_other)=delete
 Disallowed copy assignment operator. More...
 
PhaseRealmoperator= (const PhaseRealm &&a_other)=delete
 Disallowed move assignment operator. More...
 
virtual ~PhaseRealm ()
 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_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 RefCountedPtr< BaseIF > &a_baseif, const RefCountedPtr< EBIndexSpace > &a_ebis)
 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)
 Register an AMR operator. More...
 
bool queryOperator (const std::string a_operator) const
 Query if an AMR operator has been registered. More...
 
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace () const
 Return the EB index space.
 
const Vector< int > & getRefinementRatios () const
 Get refinment ratios. More...
 
const Vector< Real > & getDx () const
 Returns resolutions. More...
 
const Vector< DisjointBoxLayout > & getGrids () const
 Get AMR grids. More...
 
const Vector< ProblemDomain > & getDomains () const
 Get problem domains. More...
 
const Vector< EBISLayout > & getEBISLayout () const
 Get EBIS layout. More...
 
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGrid () const
 Get EBLevelGrids. More...
 
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGridCoFi () const
 Get coarsened fine grids. More...
 
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getVofIterator () const
 Return vof iterator for iterating over irregular cells in each grid patch. More...
 
const IrregAmrStencil< CentroidInterpolationStencil > & getCentroidInterpolationStencils () const
 Get stencils for interpolating from cell center to centroids.
 
const IrregAmrStencil< EbCentroidInterpolationStencil > & getEbCentroidInterpolationStencilStencils () const
 Get stencils for interpolating from cell center to eb centroids.
 
const IrregAmrStencil< NonConservativeDivergenceStencil > & getNonConservativeDivergenceStencils () const
 Get stencils for computing "non-conservative divergences".
 
const Vector< RefCountedPtr< EBGradient > > & getGradientOp () const
 Get gradient object.
 
EBAMRParticleMeshgetParticleMesh () const
 Get particle-mesh operator.
 
EBAMRSurfaceDepositiongetSurfaceDeposition () const
 Get the surface deposition operator.
 
Vector< RefCountedPtr< EBCoarAve > > & getCoarseAverage () const
 Get coarsening operators.
 
Vector< RefCountedPtr< EBCoarseFineParticleMesh > > & getEBCoarseFineParticleMesh () const
 Get deposition operator.
 
Vector< RefCountedPtr< EBMultigridInterpolator > > & getMultigridInterpolator () const
 Get multigrid interpolator.
 
Vector< RefCountedPtr< EBGhostCellInterpolator > > & getGhostCellInterpolator () const
 Get ghost cell interpolation utility.
 
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp () const
 Get piecewise linear ghost cell interpolation utility.
 
Vector< RefCountedPtr< EBReflux > > & getFluxRegister () const
 Get flux register utility.
 
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp () const
 Get the redistribution operators. More...
 
const EBAMRFABgetLevelset () const
 Get level-set function.
 

Protected Member Functions

void defineEBLevelGrid (const int a_lmin)
 Define EBLevelGrids. More...
 
void defineVofIterator (const int a_lmin)
 Define vof iterators. More...
 
void defineEBCoarAve (const int a_lmin)
 Define coarsening utility. More...
 
void defineEBMultigrid (const int a_lmin)
 Define multigrid interpolation utility. More...
 
void defineFillPatch (const int a_lmin)
 Define regrid utility. More...
 
void defineEBCoarseToFineInterp (const int a_lmin)
 Define ghost cell interpolation utility. More...
 
void defineMultigridInjection (const int a_lmin)
 Define multigrid injection utility. More...
 
void defineFluxReg (const int a_lmin, const int a_regsize)
 Define flux register utility. More...
 
void defineRedistOper (const int a_lmin, const int a_regsize)
 Define operator redistribution utility. More...
 
void defineFineToCoarRedistOper (const int a_lmin, const int a_regsize)
 Define operator redistribution utility. More...
 
void defineCoarToFineRedistOper (const int a_lmin, const int a_regsize)
 Define operator redistribution utility. More...
 
void defineCoarToCoarRedistOper (const int a_lmin, const int a_regsize)
 Define operator redistribution utility. More...
 
void defineParticleMesh ()
 Define particle mesh operator.
 
void defineGradSten (const int a_lmin)
 Define gradient stencils. More...
 
void defineIrregSten ()
 Define data recentering stencils. More...
 
void defineNonConsDivSten ()
 Define non-conservative divergence stencils. More...
 
void defineLevelSet (const int a_lmin, const int a_numGhost)
 Put the level-set on the mesh. More...
 

Protected Attributes

bool m_isDefined
 True if things on this phase can be defined. False otherwise. Only used internally.
 
bool m_hasEbCf
 Relic of an ancient past. Always true.
 
bool m_profile
 Profile or not.
 
bool m_verbose
 Verbose or not.
 
int m_finestLevel
 Finest grid level.
 
int m_numGhostCells
 Number of ghost cells in data holders.
 
int m_numEbGhostsCells
 Number of ghost cells in EBLevelGrid/EBISLayout/EBISBox.
 
int m_numLsfGhostCells
 Number of ghost cells in level-set function (on the mesh)
 
int m_redistributionRadius
 Redistribution radius.
 
int m_multigridInterpolationOrder
 Multigrid interpolator order.
 
int m_multigridInterpolationRadius
 Multigrid interpolator radius.
 
int m_multigridInterpolationWeight
 Multigrid interpolator weight (for least squares)
 
RealVect m_probLo
 Lower-left corner of computational domain.
 
IrregStencil::StencilType m_centroidStencilType
 Stencil recentering type.
 
IrregStencil::StencilType m_ebCentroidStencilType
 Stencil recentering type.
 
Vector< Real > m_dx
 Grid resolutions.
 
Vector< int > m_refinementRatios
 Refinement ratios between levels.
 
RefCountedPtr< EBIndexSpace > m_ebis
 EB index space.
 
RefCountedPtr< BaseIF > m_baseif
 Implicit/SD function.
 
std::map< std::string, bool > m_operatorMap
 Operator map for checking which ones are registered.
 
Vector< DisjointBoxLayout > m_grids
 AMR grids.
 
Vector< ProblemDomain > m_domains
 Problem domains.
 
Vector< EBISLayout > m_ebisl
 EBIS layouts.
 
Vector< RefCountedPtr< EBLevelGrid > > m_eblg
 EB level grids.
 
Vector< RefCountedPtr< EBLevelGrid > > m_eblgCoFi
 Coarsened fine-level EB grids. More...
 
Vector< RefCountedPtr< EBLevelGrid > > m_eblgFiCo
 Coarsened fine-level EB grids. More...
 
EBAMRFAB m_levelset
 Level-set function.
 
Vector< RefCountedPtr< LayoutData< VoFIterator > > > m_vofIter
 Cut-cell iterator.
 
Vector< RefCountedPtr< EBCoarAve > > m_coarAve
 Coarsening operator.
 
Vector< RefCountedPtr< EBMultigridInterpolator > > m_multigridInterpolator
 Multigrid interpolation utility.
 
Vector< RefCountedPtr< EBGhostCellInterpolator > > m_ghostCellInterpolator
 Ghost cell interpolation utility.
 
Vector< RefCountedPtr< EBCoarseToFineInterp > > m_ebFineInterp
 Regridding utility (for filling new grid patches)
 
Vector< RefCountedPtr< EBReflux > > m_ebReflux
 Flux register utility.
 
Vector< RefCountedPtr< EBFluxRedistribution > > m_redistributionOp
 Redistribution utilities.
 
Vector< RefCountedPtr< EBGradient > > m_gradientOp
 Gradient operator.
 
EBAMRParticleMesh m_particleMesh
 For doing particle-mesh operations.
 
EBAMRSurfaceDeposition m_surfaceDeposition
 For doing particle deposition onto surfaces.
 
RefCountedPtr< IrregAmrStencil< CentroidInterpolationStencil > > m_centroidInterpolationStencil
 Data recentering utility (center to centroid)
 
RefCountedPtr< IrregAmrStencil< EbCentroidInterpolationStencil > > m_ebCentroidInterpolationStencil
 Data recentering utility (center to eb centroid)
 
RefCountedPtr< IrregAmrStencil< NonConservativeDivergenceStencil > > m_NonConservativeDivergenceStencil
 Stencils for non-conservative divergences.
 

Detailed Description

Class that holds important things for doing AMR over a specific phase and processor distribution.

This class is essentially an EBAMR core-grid class, containing the usually EBAMR stuff within a single EBIndexSpace. In thus contains a set of grids (DisjointBoxLayout) and the usual EB stuff (EBLevelGrid, EBISLayout). In addition, it contains a bunch of operators that can be registered by the user (through the user interface AmrMesh). These operators live in this class, and they can be fetched e.g. by AmrMesh.

Note
This class is a book-keeping class used by AmrMesh – it is not meant for direct interaction.
To use run-time profiling/debugging, use PhaseRealm.profile=true or PhaseRealm.verbose=true

Constructor & Destructor Documentation

◆ PhaseRealm() [1/2]

PhaseRealm::PhaseRealm ( const PhaseRealm a_other)
delete

Disallowed copy ctor.

Parameters
[in]a_otherOther realm

◆ PhaseRealm() [2/2]

PhaseRealm::PhaseRealm ( const PhaseRealm &&  a_other)
delete

Disallowed move ctor.

Parameters
[in]a_otherOther realm

Member Function Documentation

◆ define()

void PhaseRealm::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_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 RefCountedPtr< BaseIF > &  a_baseif,
const RefCountedPtr< EBIndexSpace > &  a_ebis 
)

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_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_ebisEBIndexSpace discrete information

◆ defineCoarToCoarRedistOper()

void PhaseRealm::defineCoarToCoarRedistOper ( const int  a_lmin,
const int  a_regsize 
)
protected

Define operator redistribution utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineCoarToFineRedistOper()

void PhaseRealm::defineCoarToFineRedistOper ( const int  a_lmin,
const int  a_regsize 
)
protected

Define operator redistribution utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineEBCoarAve()

void PhaseRealm::defineEBCoarAve ( const int  a_lmin)
protected

Define coarsening utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineEBCoarseToFineInterp()

void PhaseRealm::defineEBCoarseToFineInterp ( const int  a_lmin)
protected

Define ghost cell interpolation utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineEBLevelGrid()

void PhaseRealm::defineEBLevelGrid ( const int  a_lmin)
protected

Define EBLevelGrids.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineEBMultigrid()

void PhaseRealm::defineEBMultigrid ( const int  a_lmin)
protected

Define multigrid interpolation utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineFillPatch()

void PhaseRealm::defineFillPatch ( const int  a_lmin)
protected

Define regrid utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineFineToCoarRedistOper()

void PhaseRealm::defineFineToCoarRedistOper ( const int  a_lmin,
const int  a_regsize 
)
protected

Define operator redistribution utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineFluxReg()

void PhaseRealm::defineFluxReg ( const int  a_lmin,
const int  a_regsize 
)
protected

Define flux register utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineGradSten()

void PhaseRealm::defineGradSten ( const int  a_lmin)
protected

Define gradient stencils.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineIrregSten()

void PhaseRealm::defineIrregSten ( )
protected

Define data recentering stencils.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineLevelSet()

void PhaseRealm::defineLevelSet ( const int  a_lmin,
const int  a_numGhost 
)
protected

Put the level-set on the mesh.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineMultigridInjection()

void PhaseRealm::defineMultigridInjection ( const int  a_lmin)
protected

Define multigrid injection utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineNonConsDivSten()

void PhaseRealm::defineNonConsDivSten ( )
protected

Define non-conservative divergence stencils.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineRedistOper()

void PhaseRealm::defineRedistOper ( const int  a_lmin,
const int  a_regsize 
)
protected

Define operator redistribution utility.

Parameters
[in]a_lminCoarsest grid level that changes

◆ defineVofIterator()

void PhaseRealm::defineVofIterator ( const int  a_lmin)
protected

Define vof iterators.

Parameters
[in]a_lminCoarsest grid level that changes

◆ getDomains()

const Vector< ProblemDomain > & PhaseRealm::getDomains ( ) const

Get problem domains.

Returns
Returns m_domains

◆ getDx()

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

Returns resolutions.

Returns
Returns m_dx

◆ getEBISLayout()

const Vector< EBISLayout > & PhaseRealm::getEBISLayout ( ) const

Get EBIS layout.

Returns
Immutable m_ebislayout

◆ getEBLevelGrid()

const Vector< RefCountedPtr< EBLevelGrid > > & PhaseRealm::getEBLevelGrid ( ) const

Get EBLevelGrids.

Returns
Immutable m_eblg

◆ getEBLevelGridCoFi()

const Vector< RefCountedPtr< EBLevelGrid > > & PhaseRealm::getEBLevelGridCoFi ( ) const

Get coarsened fine grids.

Returns
Immutable m_eblg

◆ getGrids()

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

Get AMR grids.

Returns
Immutable m_grids

◆ getRedistributionOp()

Vector< RefCountedPtr< EBFluxRedistribution > > & PhaseRealm::getRedistributionOp ( ) const

Get the redistribution operators.

Parameters
[in]a_phasePhase (gas or solid)

◆ getRefinementRatios()

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

Get refinment ratios.

Returns
Returns m_refinementRatios

◆ getVofIterator()

Vector< RefCountedPtr< LayoutData< VoFIterator > > > & PhaseRealm::getVofIterator ( ) const

Return vof iterator for iterating over irregular cells in each grid patch.

Returns
m_vofIter (which is, in fact, mutable)

◆ operator=() [1/2]

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

Disallowed move assignment operator.

Parameters
[in]a_otherOther realm

◆ operator=() [2/2]

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

Disallowed copy assignment operator.

Parameters
[in]a_otherOther realm

◆ queryOperator()

bool PhaseRealm::queryOperator ( const std::string  a_operator) const

Query if an AMR operator has been registered.

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

◆ registerOperator()

void PhaseRealm::registerOperator ( const std::string  a_operator)

Register an AMR operator.

Parameters
[in]a_operatorOperator name

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

◆ regridBase()

void PhaseRealm::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 PhaseRealm::regridOperators ( const int  a_lmin)

Regrid method for EBAMR operators.

Parameters
[in]a_lminCoarsest grid level that changed.

This regrids all operators.

◆ setGrids()

void PhaseRealm::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_eblgCoFi

Vector<RefCountedPtr<EBLevelGrid> > PhaseRealm::m_eblgCoFi
protected

Coarsened fine-level EB grids.

m_eblgCoFi[lvl] holds the grids on level lvl that are a coarsening of the grids on lvl+1

◆ m_eblgFiCo

Vector<RefCountedPtr<EBLevelGrid> > PhaseRealm::m_eblgFiCo
protected

Coarsened fine-level EB grids.

m_eblgFiCo[lvl] holds the refinement of the grids on level lvl-1


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