chombo-discharge
Loading...
Searching...
No Matches
CD_Realm.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_REALM_H
14#define CD_REALM_H
15
16// Std includes
17#include <map>
18#include <set>
19
20// Our includes
21#include <CD_PhaseRealm.H>
24#include <CD_MFLevelGrid.H>
25#include <CD_LevelTiles.H>
27#include <CD_PetscGrid.H>
28#include <CD_NamespaceHeader.H>
29
33using AMRMask = Vector<RefCountedPtr<LevelData<BaseFab<bool>>>>;
34
38class Realm
39{
40public:
44 const static std::string Primal;
45
49 const static std::string primal;
50
54 Realm();
55
60 Realm(const Realm& a_other) = delete;
61
66 Realm(const Realm&& a_other) = delete;
67
72 Realm&
73 operator=(const Realm& a_other) = delete;
74
79 Realm&
80 operator=(const Realm&& a_other) = delete;
81
86
108 void
109 define(const Vector<DisjointBoxLayout>& a_grids,
110 const Vector<ProblemDomain>& a_domains,
111 const Vector<int>& a_refRat,
112 const Vector<Real>& a_dx,
113 const RealVect& a_probLo,
114 const int a_finestLevel,
115 const int a_minBlockSize,
116 const int a_ebGhost,
117 const int a_numGhost,
118 const int a_lsfGhost,
119 const int a_redistRad,
120 const int a_mgInterpOrder,
121 const int a_mgInterpRadius,
122 const int a_mgInterpWeight,
123 const CellCentroidInterpolation::Type a_centroidInterpType,
124 const EBCentroidInterpolation::Type a_ebInterpType,
125 const std::map<phase::which_phase, RefCountedPtr<BaseIF>>& a_baseif,
126 const RefCountedPtr<MultiFluidIndexSpace>& a_mfis);
127
134 void
135 setGrids(const Vector<DisjointBoxLayout>& a_grids, const int a_finestLevel);
136
140 void
141 preRegrid();
142
148 void
149 regridBase(const int a_lmin);
150
156 void
157 regridOperators(const int a_lmin);
158
165 void
166 registerOperator(const std::string& a_operator, const phase::which_phase a_phase);
167
174 bool
175 queryOperator(const std::string& a_operator, const phase::which_phase a_phase) const;
176
182 void
183 registerMask(const std::string& a_mask, const int a_buffer);
184
191 bool
192 queryMask(const std::string& a_mask, const int a_buffer) const;
193
198 const Vector<int>&
199 getRefinementRatios() const;
200
205 const Vector<Real>&
206 getDx() const;
207
212 const Vector<DisjointBoxLayout>&
213 getGrids() const;
214
219 const Vector<ProblemDomain>&
220 getDomains() const;
221
226 Vector<RefCountedPtr<MFLevelGrid>>&
228
235 Vector<RefCountedPtr<MFLevelGrid>>&
237
244 Vector<RefCountedPtr<MFLevelGrid>>&
246
252 const RefCountedPtr<EBIndexSpace>&
253 getEBIndexSpace(const phase::which_phase a_phase) const;
254
260 const Vector<EBISLayout>&
261 getEBISLayout(const phase::which_phase a_phase) const;
262
268 const Vector<RefCountedPtr<EBLevelGrid>>&
269 getEBLevelGrid(const phase::which_phase a_phase) const;
270
276 const Vector<RefCountedPtr<EBLevelGrid>>&
277 getEBLevelGridCoFi(const phase::which_phase a_phase) const;
278
285 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
286 getVofIterator(const phase::which_phase a_phase) const;
287
293 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
294 getMultiCutVofIterator(const phase::which_phase a_phase) const;
295
305 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
306 getFaceIterator(const phase::which_phase a_phase) const;
307
316 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
318
327 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
329
337 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
338 getMultiCutFaceIterator(const phase::which_phase a_phase) const;
339
345 const Vector<RefCountedPtr<EBNonConservativeDivergence>>&
347
353 const Vector<RefCountedPtr<CellCentroidInterpolation>>&
355
361 const Vector<RefCountedPtr<EBCentroidInterpolation>>&
363
369 Vector<RefCountedPtr<EBCoarAve>>&
371
377 Vector<RefCountedPtr<EBMultigridInterpolator>>&
379
386 getParticleMesh(const phase::which_phase a_phase);
387
395
401 const Vector<RefCountedPtr<EBGradient>>&
402 getGradientOp(const phase::which_phase a_phase) const;
403
409 Vector<RefCountedPtr<EBGhostCellInterpolator>>&
411
417 Vector<RefCountedPtr<EBCoarseToFineInterp>>&
418 getFineInterp(const phase::which_phase a_phase);
419
425 Vector<RefCountedPtr<EBReflux>>&
426 getFluxRegister(const phase::which_phase a_phase);
427
433 Vector<RefCountedPtr<EBFluxRedistribution>>&
435
441 const EBAMRFAB&
442 getLevelset(const phase::which_phase a_phase) const;
443
449 const EBAMRCellData&
450 getRegularCells(const phase::which_phase a_phase) const;
451
457 const EBAMRCellData&
458 getCoveredCells(const phase::which_phase a_phase) const;
459
465 const EBAMRCellData&
466 getNotCoveredCells(const phase::which_phase a_phase) const;
467
473 const EBAMRCellData&
474 getIrregularCells(const phase::which_phase a_phase) const;
475
482 const AMRMask&
483 getMask(const std::string& a_mask, const int a_buffer) const;
484
489 const AMRMask&
490 getValidCells() const;
491
499 void
500 registerParticleGhostMask(const int a_width) noexcept;
501
508 getParticleGhostMask(const int a_width) const noexcept;
509
516 getParticleGhostMaskFineToCoar(const int a_width) const noexcept;
517
524 getParticleGhostMaskCoarToFine(const int a_width) const noexcept;
525
533 getTrivialParticleGhostMask() const noexcept;
534
542 const AMRMask&
543 getParticleGhostExposure(const int a_width) const noexcept;
544
549 const Vector<RefCountedPtr<LevelTiles>>&
550 getLevelTiles() const noexcept;
551
563 LevelTiles::LevelAndBox
564 getLevelAndBox(const RealVect& a_pos) const noexcept;
565
566#ifdef CH_USE_PETSC
570 const RefCountedPtr<PetscGrid>&
571 getPetscGrid() const noexcept;
572#endif
573
574protected:
579
584
589
594
599
603 RealVect m_probLo;
604
608 Vector<Real> m_dx;
609
614
618 Vector<DisjointBoxLayout> m_grids;
619
623 Vector<ProblemDomain> m_domains;
624
628 Vector<RefCountedPtr<MFLevelGrid>> m_mflg;
629
633 Vector<RefCountedPtr<MFLevelGrid>> m_mflgCoFi;
634
638 Vector<RefCountedPtr<MFLevelGrid>> m_mflgFiCo;
639
643 Vector<RefCountedPtr<LevelTiles>> m_levelTiles;
644
648 RefCountedPtr<MultiFluidIndexSpace> m_multifluidIndexSpace;
649
654
660
665 std::map<int, AMRParticleGhostMask> m_particleGhostMask;
666
671 std::map<int, AMRParticleGhostMask> m_particleGhostMaskFineToCoar;
672
677 std::map<int, AMRParticleGhostMask> m_particleGhostMaskCoarToFine;
678
693 std::map<int, AMRMask> m_particleGhostExposure;
694
695#ifdef CH_USE_PETSC
699 RefCountedPtr<PetscGrid> m_petscGrid;
700#endif
701
706 mutable std::map<phase::which_phase, RefCountedPtr<PhaseRealm>> m_realms;
707
711 std::map<phase::which_phase, RefCountedPtr<BaseIF>> m_baseif;
712
716 std::map<std::pair<std::string, int>, AMRMask> m_masks;
717
722 void
723 defineMFLevelGrid(const int a_lmin);
724
729 void
730 defineMasks(const int a_lmin);
731
737 void
738 defineOuterHaloMask(const int a_lmin);
739
750 void
751 defineOuterHaloMask(LevelData<BaseFab<bool>>& a_coarMask,
752 const ProblemDomain& a_domainCoar,
753 const ProblemDomain& a_domainFine,
754 const DisjointBoxLayout& a_gridsCoar,
755 const DisjointBoxLayout& a_gridsFine,
756 const int a_buffer,
757 const int a_refRat);
758
766 void
767 defineInnerHaloMask(const int a_lmin);
768
773 void
774 defineOuterCFMask(const int a_lmin);
775
786 void
787 defineOuterCFMask(LevelData<BaseFab<bool>>& a_coarMask,
788 const ProblemDomain& a_domainCoar,
789 const ProblemDomain& a_domainFine,
790 const DisjointBoxLayout& a_gridsCoar,
791 const DisjointBoxLayout& a_gridsFine,
792 const int a_buffer,
793 const int a_refRat);
794
799 void
800 defineInnerCFMask(const int a_lmin);
801
807 void
808 defineCFIVS(const int a_lmin);
809
813 void
815
819 void
820 defineLevelTiles() noexcept;
821
831 void
832 defineParticleGhostMasks() noexcept;
833
849 void
851 const DisjointBoxLayout& a_dbl,
852 const ProblemDomain& a_domain,
853 const int a_ghost) noexcept;
854
873 void
875 const DisjointBoxLayout& a_thisLayout,
876 const DisjointBoxLayout& a_coarLayout,
877 const ProblemDomain& a_coarDomain,
878 const int a_refRat,
879 const int a_ghost) noexcept;
880
899 void
901 const DisjointBoxLayout& a_thisLayout,
902 const DisjointBoxLayout& a_fineLayout,
903 const LevelData<BaseFab<bool>>& a_validCells,
904 const ProblemDomain& a_fineDomain,
905 const int a_refRat,
906 const int a_ghost) noexcept;
907
922 void
923 defineParticleGhostExposure(LevelData<BaseFab<bool>>& a_exposure,
924 const DisjointBoxLayout& a_dbl,
925 const LayoutData<ParticleGhostMask>& a_same,
926 const LayoutData<ParticleGhostMask>& a_fineToCoar,
927 const LayoutData<ParticleGhostMask>& a_coarToFine,
928 const bool a_hasCoar,
929 const bool a_hasFine) noexcept;
930
934 void
935 definePetscGrid() noexcept;
936
943 getRealm(const phase::which_phase a_phase);
944};
945
946#include <CD_NamespaceFooter.H>
947
948#endif
Declaration of an AMR driver that deposits/interpolates ParticleContainer particles.
Declaration of LevelTiles.
Declaration of a wrapper for wrapping multifluid EBLevelGrids.
Multi-fluid index space.
Declaration of ParticleGhostMask, a per-box CSR lookup of particle ghost scatter targets.
Vector< RefCountedPtr< LayoutData< ParticleGhostMask > > > AMRParticleGhostMask
AMR-wide particle ghost-target lookup: one per-box CSR table per level, indexed by SOURCE level.
Definition CD_ParticleGhostMask.H:210
File containing declaration of PetscGrid.
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:33
Type
Supported interpolation types.
Definition CD_CellCentroidInterpolation.H:44
AMR driver that deposits/interpolates ParticleContainer particles across the hierarchy.
Definition CD_EBAMRParticleMesh.H:74
class for handling surface deposition of particles with EB and AMR.
Definition CD_EBAMRSurfaceDeposition.H:30
Type
Supported interpolation types.
Definition CD_EBCentroidInterpolation.H:44
Class for storing the AMR hierarchy as a collection of tiles.
Definition CD_LevelTiles.H:43
Per-box CSR lookup from a source cell to the destination boxes whose ghosted region covers it.
Definition CD_ParticleGhostMask.H:53
Class that holds important things for doing AMR over a specific phase and processor distribution.
Definition CD_PhaseRealm.H:73
Class for holding multifluid Realms, which are the Realms that we actually use.
Definition CD_Realm.H:39
void registerMask(const std::string &a_mask, const int a_buffer)
Register a mask.
Definition CD_Realm.cpp:1563
int m_minBlockSize
Blocking factor.
Definition CD_Realm.H:593
Vector< RefCountedPtr< EBReflux > > & getFluxRegister(const phase::which_phase a_phase)
Get flux register utility.
Definition CD_Realm.cpp:1762
void defineParticleGhostExposure(LevelData< BaseFab< bool > > &a_exposure, const DisjointBoxLayout &a_dbl, const LayoutData< ParticleGhostMask > &a_same, const LayoutData< ParticleGhostMask > &a_fineToCoar, const LayoutData< ParticleGhostMask > &a_coarToFine, const bool a_hasCoar, const bool a_hasFine) noexcept
Define the boundary-exposure mask on one level from that level's three particle ghost masks.
Definition CD_Realm.cpp:1190
void defineMFLevelGrid(const int a_lmin)
Define MFLevelGrid.
Definition CD_Realm.cpp:220
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:1552
const AMRParticleGhostMask & getParticleGhostMaskCoarToFine(const int a_width) const noexcept
Get the coarse-to-fine particle ghost mask for a registered width.
Definition CD_Realm.cpp:1853
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp(const phase::which_phase a_phase)
Get piecewise linear ghost cell interpolation utility.
Definition CD_Realm.cpp:1756
AMRMask m_validCells
Mask which is true for all valid cells.
Definition CD_Realm.H:653
static const std::string primal
Identifier for perimal realm.
Definition CD_Realm.H:49
Realm(const Realm &a_other)=delete
Disallowed copy ctor.
void defineParticleGhostMaskSameLevel(LayoutData< ParticleGhostMask > &a_mask, const DisjointBoxLayout &a_dbl, const ProblemDomain &a_domain, const int a_ghost) noexcept
Define the SAME-level particle ghost mask on one level.
Definition CD_Realm.cpp:1241
bool m_isDefined
Realm defined or not.
Definition CD_Realm.H:578
void defineOuterHaloMask(const int a_lmin)
Define outer particle halo mask.
Definition CD_Realm.cpp:292
std::map< phase::which_phase, RefCountedPtr< BaseIF > > m_baseif
Implicit/signed distance functions on each phase.
Definition CD_Realm.H:711
Vector< ProblemDomain > m_domains
Domains.
Definition CD_Realm.H:623
Vector< int > m_refinementRatios
Refinement ratios.
Definition CD_Realm.H:613
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp(const phase::which_phase a_phase)
Get the redistribution operators.
Definition CD_Realm.cpp:1768
std::set< int > m_particleGhostMaskWidths
Registered particle ghost-mask widths (>0). Persist across regrids; the masks below are (re)built for...
Definition CD_Realm.H:659
Realm(const Realm &&a_other)=delete
Disallowed move ctor.
std::map< int, AMRParticleGhostMask > m_particleGhostMaskFineToCoar
Fine-to-coarse particle ghost masks, keyed by ghost width. Per width: indexed by source level (>=1); ...
Definition CD_Realm.H:671
const Vector< ProblemDomain > & getDomains() const
Get problem domains.
Definition CD_Realm.cpp:1618
const AMRParticleGhostMask & getTrivialParticleGhostMask() const noexcept
Get a trivial (empty) particle ghost mask that scatters no particles.
Definition CD_Realm.cpp:1866
bool queryMask(const std::string &a_mask, const int a_buffer) const
Query if a mask has been registered.
Definition CD_Realm.cpp:1574
const Vector< RefCountedPtr< EBNonConservativeDivergence > > & getNonConservativeDivergence(const phase::which_phase a_phase) const
Get objects for computing "non-conservative divergences".
Definition CD_Realm.cpp:1702
Vector< RefCountedPtr< MFLevelGrid > > m_mflgCoFi
Coarsened grids. Entry lvl contains the coarsened version of grids on level lvl+1.
Definition CD_Realm.H:633
const EBAMRCellData & getNotCoveredCells(const phase::which_phase a_phase) const
Get the non-covered-cell mask (1 in regular/irregular cells, 0 in covered cells) for a phase.
Definition CD_Realm.cpp:1792
const AMRMask & getParticleGhostExposure(const int a_width) const noexcept
Get the boundary-exposure mask for a registered particle ghost width.
Definition CD_Realm.cpp:1874
void defineValidCells()
Define the valid cell region mask.
Definition CD_Realm.cpp:991
void defineParticleGhostMaskFineToCoar(LayoutData< ParticleGhostMask > &a_mask, const DisjointBoxLayout &a_thisLayout, const DisjointBoxLayout &a_coarLayout, const ProblemDomain &a_coarDomain, const int a_refRat, const int a_ghost) noexcept
Define the FINE-to-COARSE particle ghost mask on one level (targets on the next-coarser level).
Definition CD_Realm.cpp:1294
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getMultiCutFaceIterator(const phase::which_phase a_phase) const
Get face iterators restricted to multiply-cut faces in each valid grid box.
Definition CD_Realm.cpp:1696
Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGridFiCo()
Get the refined grids.
Definition CD_Realm.cpp:1636
const Vector< EBISLayout > & getEBISLayout(const phase::which_phase a_phase) const
Get EBISLayout for particular phase.
Definition CD_Realm.cpp:1648
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getMultiCutVofIterator(const phase::which_phase a_phase) const
Get VoFIterators restricted to multiply-cut cells for a particular phase.
Definition CD_Realm.cpp:1672
void defineParticleGhostMaskCoarToFine(LayoutData< ParticleGhostMask > &a_mask, const DisjointBoxLayout &a_thisLayout, const DisjointBoxLayout &a_fineLayout, const LevelData< BaseFab< bool > > &a_validCells, const ProblemDomain &a_fineDomain, const int a_refRat, const int a_ghost) noexcept
Define the COARSE-to-FINE particle ghost mask on one level (targets on the next-finer level).
Definition CD_Realm.cpp:1408
Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGridCoFi()
Get the coarsened grids.
Definition CD_Realm.cpp:1630
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getFaceIteratorWithTangentialGhosts(const phase::which_phase a_phase) const
Get per-direction face iterators covering cut-cell faces that reach into the tangential ghost layer.
Definition CD_Realm.cpp:1690
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getVofIterator(const phase::which_phase a_phase) const
Get VoFIterators covering all cut-cells (singly- and multiply-cut) for a particular phase.
Definition CD_Realm.cpp:1666
Vector< RefCountedPtr< EBMultigridInterpolator > > & getMultigridInterpolator(const phase::which_phase a_phase)
Get the multigrid interpolator.
Definition CD_Realm.cpp:1738
const Vector< RefCountedPtr< EBGradient > > & getGradientOp(const phase::which_phase a_phase) const
Get gradient operator.
Definition CD_Realm.cpp:1744
const Vector< DisjointBoxLayout > & getGrids() const
Get AMR grids.
Definition CD_Realm.cpp:1612
int m_verbosity
Realm verbosity. Used for debugging.
Definition CD_Realm.H:583
void registerOperator(const std::string &a_operator, const phase::which_phase a_phase)
Register an AMR operator.
Definition CD_Realm.cpp:1541
void defineInnerCFMask(const int a_lmin)
Define a mask which is true on the inside (i.e., fine side) of the refinement boundary.
Definition CD_Realm.cpp:845
Vector< RefCountedPtr< MFLevelGrid > > m_mflg
MFLevelGrids.
Definition CD_Realm.H:628
Vector< RefCountedPtr< EBCoarAve > > & getCoarseAverage(const phase::which_phase a_phase)
Get data coarsening utility.
Definition CD_Realm.cpp:1720
void defineParticleGhostMasks() noexcept
Define the same-level, fine-to-coarse, and coarse-to-fine particle ghost masks on every level.
Definition CD_Realm.cpp:1095
const AMRParticleGhostMask & getParticleGhostMaskFineToCoar(const int a_width) const noexcept
Get the fine-to-coarse particle ghost mask for a registered width.
Definition CD_Realm.cpp:1840
Vector< Real > m_dx
Grid resolutions.
Definition CD_Realm.H:608
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGrid(const phase::which_phase a_phase) const
Get EBLevelGrid for particular phase.
Definition CD_Realm.cpp:1654
const EBAMRCellData & getCoveredCells(const phase::which_phase a_phase) const
Get the covered-cell mask (value 1 in covered cells, 0 elsewhere) for a phase.
Definition CD_Realm.cpp:1786
std::map< phase::which_phase, RefCountedPtr< PhaseRealm > > m_realms
Phase realms.
Definition CD_Realm.H:706
Vector< RefCountedPtr< EBGhostCellInterpolator > > & getGhostCellInterpolator(const phase::which_phase a_phase)
Get ghost cell interpolator.
Definition CD_Realm.cpp:1750
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getFaceIteratorNoBoundary(const phase::which_phase a_phase) const
Get face iterators with FaceStop::SurroundingNoBoundary over cut-cell faces in each valid grid box fo...
Definition CD_Realm.cpp:1684
const AMRMask & getValidCells() const
Get all valid cells.
Definition CD_Realm.cpp:1815
Realm & operator=(const Realm &&a_other)=delete
Disallowed move assignment operator.
Realm & operator=(const Realm &a_other)=delete
Disallowed copy assignment operator.
const Vector< int > & getRefinementRatios() const
Get refinement ratios.
Definition CD_Realm.cpp:1600
Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrid()
Get MFLevelGrids.
Definition CD_Realm.cpp:1624
void defineLevelTiles() noexcept
Define the tiled space.
Definition CD_Realm.cpp:1497
int m_finestLevel
Finest AMR level.
Definition CD_Realm.H:588
const EBAMRCellData & getIrregularCells(const phase::which_phase a_phase) const
Get the irregular-cell mask (value 1 in irregular cells, 0 elsewhere) for a phase.
Definition CD_Realm.cpp:1798
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getFaceIterator(const phase::which_phase a_phase) const
Get face iterators with FaceStop::SurroundingWithBoundary over cut-cell faces in each valid grid box ...
Definition CD_Realm.cpp:1678
void regridOperators(const int a_lmin)
Regrid method for EBAMR operators.
Definition CD_Realm.cpp:179
void defineMasks(const int a_lmin)
Define masks.
Definition CD_Realm.cpp:196
Vector< RefCountedPtr< LevelTiles > > m_levelTiles
Level "tiles" – i.e. the grids viewed as constant-size boxes.
Definition CD_Realm.H:643
std::map< std::pair< std::string, int >, AMRMask > m_masks
Masks.
Definition CD_Realm.H:716
const AMRParticleGhostMask & getParticleGhostMask(const int a_width) const noexcept
Get the same-level particle ghost mask for a registered width.
Definition CD_Realm.cpp:1827
Vector< RefCountedPtr< MFLevelGrid > > m_mflgFiCo
Refined grids. Entry lvl+1 contains the refined version of grids on level lvl.
Definition CD_Realm.H:638
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGridCoFi(const phase::which_phase a_phase) const
Get coarsened fine EBLevelGrid for particular phase.
Definition CD_Realm.cpp:1660
void definePetscGrid() noexcept
Define the PETSc composite grid.
Definition CD_Realm.cpp:1512
EBAMRParticleMesh & getParticleMesh(const phase::which_phase a_phase)
Get the particle mesh operator.
Definition CD_Realm.cpp:1726
const Vector< RefCountedPtr< LevelTiles > > & getLevelTiles() const noexcept
Get the tiled space.
Definition CD_Realm.cpp:1821
void registerParticleGhostMask(const int a_width) noexcept
Register a particle ghost-mask width so it is (re)built at every regrid.
Definition CD_Realm.cpp:1080
const Vector< Real > & getDx() const
Get grid resolutions.
Definition CD_Realm.cpp:1606
std::map< int, AMRParticleGhostMask > m_particleGhostMask
Same-level particle ghost masks, keyed by ghost width. Per width: indexed by source level,...
Definition CD_Realm.H:665
std::map< int, AMRParticleGhostMask > m_particleGhostMaskCoarToFine
Coarse-to-fine particle ghost masks, keyed by ghost width. Per width: indexed by source level (<fines...
Definition CD_Realm.H:677
PhaseRealm & getRealm(const phase::which_phase a_phase)
Get a particular realm.
Definition CD_Realm.cpp:1594
void setGrids(const Vector< DisjointBoxLayout > &a_grids, const int a_finestLevel)
Set grid method.
Definition CD_Realm.cpp:127
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
Index spaces.
Definition CD_Realm.H:648
const EBAMRCellData & getRegularCells(const phase::which_phase a_phase) const
Get the regular-cell mask (value 1 in regular cells, 0 elsewhere) for a phase.
Definition CD_Realm.cpp:1780
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace(const phase::which_phase a_phase) const
Get EBIndexSpace for particular phase.
Definition CD_Realm.cpp:1642
const AMRMask & getMask(const std::string &a_mask, const int a_buffer) const
Get AMR mask.
Definition CD_Realm.cpp:1804
void defineCFIVS(const int a_lmin)
Define the coarse-fine interface.
Definition CD_Realm.cpp:926
Realm()
Default constructor. Must subsequently call define.
Definition CD_Realm.cpp:34
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_minBlockSize, 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 CellCentroidInterpolation::Type a_centroidInterpType, const EBCentroidInterpolation::Type a_ebInterpType, const std::map< phase::which_phase, RefCountedPtr< BaseIF > > &a_baseif, const RefCountedPtr< MultiFluidIndexSpace > &a_mfis)
Full define function.
Definition CD_Realm.cpp:49
EBAMRSurfaceDeposition & getSurfaceDeposition(const phase::which_phase a_phase)
Get the particle mesh operator.
Definition CD_Realm.cpp:1732
void defineInnerHaloMask(const int a_lmin)
Define inner particle halo mask.
Definition CD_Realm.cpp:486
Vector< DisjointBoxLayout > m_grids
AMR grids.
Definition CD_Realm.H:618
static const std::string Primal
Identifier for perimal realm.
Definition CD_Realm.H:44
void preRegrid()
Perform pre-regrid operations.
Definition CD_Realm.cpp:140
LevelTiles::LevelAndBox getLevelAndBox(const RealVect &a_pos) const noexcept
Find the (finest) grid box covering a physical position.
Definition CD_Realm.cpp:1889
RealVect m_probLo
Physical coordinates of lower-left corner in simulation domain.
Definition CD_Realm.H:603
const EBAMRFAB & getLevelset(const phase::which_phase a_phase) const
Get level-set function.
Definition CD_Realm.cpp:1774
int m_numGhost
Number of ghost cells.
Definition CD_Realm.H:598
~Realm()
Destructor.
void regridBase(const int a_lmin)
Regrid method for EBAMR base.
Definition CD_Realm.cpp:162
const Vector< RefCountedPtr< EBCentroidInterpolation > > & getEBCentroidInterpolation(const phase::which_phase a_phase) const
Get objects for computing interpolation of cell-centered data to EB centroids.
Definition CD_Realm.cpp:1714
void defineOuterCFMask(const int a_lmin)
Define a mask which is true on the outside (i.e., coarse side) of the refinement boundary.
Definition CD_Realm.cpp:651
std::map< int, AMRMask > m_particleGhostExposure
Particle boundary-exposure masks, keyed by ghost width. Per width: indexed by level,...
Definition CD_Realm.H:693
const Vector< RefCountedPtr< CellCentroidInterpolation > > & getCellCentroidInterpolation(const phase::which_phase a_phase) const
Get objects for computing interpolation of cell-centered data to cell centroids.
Definition CD_Realm.cpp:1708
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38