21 #include <CD_NamespaceHeader.H>
26 static const std::string s_particle_halo =
"particle_halo";
31 static const std::string s_particle_valid_region =
"pvr";
36 using AMRMask = Vector<RefCountedPtr<LevelData<BaseFab<bool>>>>;
112 define(
const Vector<DisjointBoxLayout>& a_grids,
113 const Vector<ProblemDomain>& a_domains,
114 const Vector<int>& a_refRat,
115 const Vector<Real>& a_dx,
116 const RealVect a_probLo,
117 const int a_finestLevel,
118 const int a_blockingFactor,
120 const int a_numGhost,
121 const int a_lsfGhost,
122 const int a_redistRad,
123 const int a_mgInterpOrder,
124 const int a_mgInterpRadius,
125 const int a_mgInterpWeight,
128 const std::map<phase::which_phase, RefCountedPtr<BaseIF>> a_baseif,
129 const RefCountedPtr<MultiFluidIndexSpace>& a_mfis);
138 setGrids(
const Vector<DisjointBoxLayout>& a_grids,
const int a_finestLevel);
169 registerOperator(
const std::string a_operator,
const phase::which_phase a_phase);
178 queryOperator(
const std::string a_operator,
const phase::which_phase a_phase)
const;
186 registerMask(
const std::string a_mask,
const int a_buffer);
195 queryMask(
const std::string a_mask,
const int a_buffer)
const;
215 const Vector<DisjointBoxLayout>&
221 const Vector<ProblemDomain>&
227 Vector<RefCountedPtr<MFLevelGrid>>&
234 const RefCountedPtr<EBIndexSpace>&
241 const Vector<EBISLayout>&
248 const Vector<RefCountedPtr<EBLevelGrid>>&
255 const Vector<RefCountedPtr<EBLevelGrid>>&
262 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
290 Vector<RefCountedPtr<EBCoarAve>>&
297 Vector<RefCountedPtr<EBMultigridInterpolator>>&
318 const Vector<RefCountedPtr<EBGradient>>&
325 Vector<RefCountedPtr<EBGhostCellInterpolator>>&
332 Vector<RefCountedPtr<EBCoarseToFineInterp>>&
339 Vector<RefCountedPtr<EBReflux>>&
346 Vector<RefCountedPtr<EBFluxRedistribution>>&
354 getLevelset(
const phase::which_phase a_phase)
const;
361 getMask(
const std::string a_mask,
const int a_buffer)
const;
372 const Vector<RefCountedPtr<LevelTiles>>&
490 const ProblemDomain& a_domainCoar,
491 const ProblemDomain& a_domainFine,
492 const DisjointBoxLayout& a_gridsCoar,
493 const DisjointBoxLayout& a_gridsFine,
518 #include <CD_NamespaceFooter.H>
Declaration of a class for handling particle-mesh operations with AMR.
Declaration of LevelTiles.
Declaration of a wrapper for wrapping multifluid EBLevelGrids.
Declaration of the PhaseRealm class.
Vector< RefCountedPtr< LevelData< BaseFab< bool > >> > AMRMask
Alias for cutting down on the typic of booleans defined over AMR grids.
Definition: CD_Realm.H:36
Class for handling particle-mesh operations with AMR.
Definition: CD_EBAMRParticleMesh.H:47
class for handling surface deposition of particles with EB and AMR.
Definition: CD_EBAMRSurfaceDeposition.H:29
Class for holding VoFStencils on irregular cells over an entire AMR hierarchy. The template parameter...
Definition: CD_IrregAmrStencil.H:29
StencilType
Enum for identifying stencil – only meant for enhancing code visibility.
Definition: CD_IrregStencil.H:44
Class for storing the AMR hierarchy as a collection of tiles.
Definition: CD_LevelTiles.H:33
Wrapper class for holding multifluid EBLevelGrids.
Definition: CD_MFLevelGrid.H:29
Two-fluid index space.
Definition: CD_MultiFluidIndexSpace.H:42
Class that holds important things for doing AMR over a specific phase and processor distribution.
Definition: CD_PhaseRealm.H:66
Class for holding multifluid Realms, which are the Realms that we actually use.
Definition: CD_Realm.H:42
void registerMask(const std::string a_mask, const int a_buffer)
Register a mask.
Definition: CD_Realm.cpp:534
Vector< RefCountedPtr< EBReflux > > & getFluxRegister(const phase::which_phase a_phase)
Get flux register utility.
Definition: CD_Realm.cpp:691
void defineMFLevelGrid(const int a_lmin)
Define MFLevelGrid.
Definition: CD_Realm.cpp:200
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp(const phase::which_phase a_phase)
Get piecewise linear ghost cell interpolation utility.
Definition: CD_Realm.cpp:685
Realm & operator=(const Realm &a_other)=delete
Disallowed copy assignment operator.
AMRMask m_validCells
Mask which is true for all valid cells.
Definition: CD_Realm.H:439
static const std::string primal
Identifier for perimal realm.
Definition: CD_Realm.H:52
Realm(const Realm &a_other)=delete
Disallowed copy ctor.
const IrregAmrStencil< NonConservativeDivergenceStencil > & getNonConservativeDivergenceStencils(const phase::which_phase a_phase) const
Get stencils for computing "non-conservative divergences".
Definition: CD_Realm.cpp:643
bool m_isDefined
Realm defined or not.
Definition: CD_Realm.H:379
std::map< phase::which_phase, RefCountedPtr< BaseIF > > m_baseif
Implicit/signed distance functions on each phase.
Definition: CD_Realm.H:450
Vector< ProblemDomain > m_domains
Domains.
Definition: CD_Realm.H:419
Vector< int > m_refinementRatios
Refinement ratios.
Definition: CD_Realm.H:409
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp(const phase::which_phase a_phase)
Get the redistribution operators.
Definition: CD_Realm.cpp:697
Realm(const Realm &&a_other)=delete
Disallowed move ctor.
const Vector< ProblemDomain > & getDomains() const
Get problem domains.
Definition: CD_Realm.cpp:589
void defineValidCells()
Define the valid cell region mask.
Definition: CD_Realm.cpp:408
Realm & operator=(const Realm &&a_other)=delete
Disallowed move assignment operator.
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.
Definition: CD_Realm.cpp:273
const Vector< EBISLayout > & getEBISLayout(const phase::which_phase a_phase) const
Get EBISLayout for particular phase.
Definition: CD_Realm.cpp:607
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getVofIterator(const phase::which_phase a_phase) const
Get VoFIterators for particular phase.
Definition: CD_Realm.cpp:625
Vector< RefCountedPtr< EBMultigridInterpolator > > & getMultigridInterpolator(const phase::which_phase a_phase)
Get the multigrid interpolator.
Definition: CD_Realm.cpp:667
const Vector< RefCountedPtr< EBGradient > > & getGradientOp(const phase::which_phase a_phase) const
Get gradient operator.
Definition: CD_Realm.cpp:673
bool queryOperator(const std::string a_operator, const phase::which_phase a_phase) const
Query if an AMR operator has been registered.
Definition: CD_Realm.cpp:523
const Vector< DisjointBoxLayout > & getGrids() const
Get AMR grids.
Definition: CD_Realm.cpp:583
int m_verbosity
Realm verbosity. Used for debugging.
Definition: CD_Realm.H:384
Vector< RefCountedPtr< MFLevelGrid > > m_mflg
MFLevelGrids.
Definition: CD_Realm.H:424
Vector< RefCountedPtr< EBCoarAve > > & getCoarseAverage(const phase::which_phase a_phase)
Get data coarsening utility.
Definition: CD_Realm.cpp:649
const IrregAmrStencil< EbCentroidInterpolationStencil > & getEbCentroidInterpolationStencilStencils(const phase::which_phase a_phase) const
Get stencils for interpolating from cell center to eb centroids.
Definition: CD_Realm.cpp:637
Vector< Real > m_dx
Grid resolutions.
Definition: CD_Realm.H:404
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGrid(const phase::which_phase a_phase) const
Get EBLevelGrid for particular phase.
Definition: CD_Realm.cpp:613
std::map< phase::which_phase, RefCountedPtr< PhaseRealm > > m_realms
Phase realms.
Definition: CD_Realm.H:445
Vector< RefCountedPtr< EBGhostCellInterpolator > > & getGhostCellInterpolator(const phase::which_phase a_phase)
Get ghost cell interpolator.
Definition: CD_Realm.cpp:679
const AMRMask & getValidCells() const
Get all valid cells.
Definition: CD_Realm.cpp:720
const Vector< int > & getRefinementRatios() const
Get refinement ratios.
Definition: CD_Realm.cpp:571
Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrid()
Get MFLevelGrids.
Definition: CD_Realm.cpp:595
void defineLevelTiles() noexcept
Define the tiled space.
Definition: CD_Realm.cpp:497
int m_finestLevel
Finest AMR level.
Definition: CD_Realm.H:389
void registerOperator(const std::string a_operator, const phase::which_phase a_phase)
Register an AMR operator.
Definition: CD_Realm.cpp:512
const IrregAmrStencil< CentroidInterpolationStencil > & getCentroidInterpolationStencils(const phase::which_phase a_phase) const
Get stencils for interpolating from cell center to centroids (for specified phase)
Definition: CD_Realm.cpp:631
void regridOperators(const int a_lmin)
Regrid method for EBAMR operators.
Definition: CD_Realm.cpp:173
void defineMasks(const int a_lmin)
Define masks.
Definition: CD_Realm.cpp:188
Vector< RefCountedPtr< LevelTiles > > m_levelTiles
Level "tiles" – i.e. the grids viewed as constant-size boxes.
Definition: CD_Realm.H:429
std::map< std::pair< std::string, int >, AMRMask > m_masks
Masks.
Definition: CD_Realm.H:455
int m_blockingFactor
Blocking factor.
Definition: CD_Realm.H:394
bool queryMask(const std::string a_mask, const int a_buffer) const
Query if a mask has been registered.
Definition: CD_Realm.cpp:545
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGridCoFi(const phase::which_phase a_phase) const
Get coarsened fine EBLevelGrid for particular phase.
Definition: CD_Realm.cpp:619
EBAMRParticleMesh & getParticleMesh(const phase::which_phase a_phase)
Get the particle mesh operator.
Definition: CD_Realm.cpp:655
const Vector< RefCountedPtr< LevelTiles > > & getLevelTiles() const noexcept
Get the tiled space.
Definition: CD_Realm.cpp:726
const Vector< Real > & getDx() const
Get grid resolutions.
Definition: CD_Realm.cpp:577
void defineHaloMasks(const int a_lmin)
Define particle halo amsks.
Definition: CD_Realm.cpp:228
PhaseRealm & getRealm(const phase::which_phase a_phase)
Get a particular realm.
Definition: CD_Realm.cpp:565
void setGrids(const Vector< DisjointBoxLayout > &a_grids, const int a_finestLevel)
Set grid method.
Definition: CD_Realm.cpp:121
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
Index spaces.
Definition: CD_Realm.H:434
const AMRMask & getMask(const std::string a_mask, const int a_buffer) const
Get AMR mask.
Definition: CD_Realm.cpp:709
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace(const phase::which_phase a_phase) const
Get EBIndexSpace for particular phase.
Definition: CD_Realm.cpp:601
Realm()
Default constructor. Must subsequently call define.
Definition: CD_Realm.cpp:26
EBAMRSurfaceDeposition & getSurfaceDeposition(const phase::which_phase a_phase)
Get the particle mesh operator.
Definition: CD_Realm.cpp:661
Vector< DisjointBoxLayout > m_grids
AMR grids.
Definition: CD_Realm.H:414
static const std::string Primal
Identifier for perimal realm.
Definition: CD_Realm.H:47
void preRegrid()
Perform pre-regrid operations.
Definition: CD_Realm.cpp:134
RealVect m_probLo
Physical coordinates of lower-left corner in simulation domain.
Definition: CD_Realm.H:399
const EBAMRFAB & getLevelset(const phase::which_phase a_phase) const
Get level-set function.
Definition: CD_Realm.cpp:703
~Realm()
Destructor.
Definition: CD_Realm.cpp:40
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.
Definition: CD_Realm.cpp:44
void regridBase(const int a_lmin)
Regrid method for EBAMR base.
Definition: CD_Realm.cpp:156
phase names
Definition: CD_MultiFluidIndexSpace.H:27