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
111 void
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_minBlockSize,
119 const int a_ebGhost,
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,
126 const int a_mirrorBandRadius,
127 const Real a_mirrorCondTol,
128 const Real a_mirrorCreaseTol,
129 const CellCentroidInterpolation::Type a_centroidInterpType,
130 const EBCentroidInterpolation::Type a_ebInterpType,
131 const std::map<phase::which_phase, RefCountedPtr<BaseIF>>& a_baseif,
132 const RefCountedPtr<MultiFluidIndexSpace>& a_mfis);
133
140 void
141 setGrids(const Vector<DisjointBoxLayout>& a_grids, const int a_finestLevel);
142
146 void
147 preRegrid();
148
154 void
155 regridBase(const int a_lmin);
156
162 void
163 regridOperators(const int a_lmin);
164
171 void
172 registerOperator(const std::string& a_operator, const phase::which_phase a_phase);
173
180 bool
181 queryOperator(const std::string& a_operator, const phase::which_phase a_phase) const;
182
188 void
189 registerMask(const std::string& a_mask, const int a_buffer);
190
197 bool
198 queryMask(const std::string& a_mask, const int a_buffer) const;
199
204 const Vector<int>&
205 getRefinementRatios() const;
206
211 const Vector<Real>&
212 getDx() const;
213
218 const Vector<DisjointBoxLayout>&
219 getGrids() const;
220
225 const Vector<ProblemDomain>&
226 getDomains() const;
227
232 Vector<RefCountedPtr<MFLevelGrid>>&
234
241 Vector<RefCountedPtr<MFLevelGrid>>&
243
250 Vector<RefCountedPtr<MFLevelGrid>>&
252
258 const RefCountedPtr<EBIndexSpace>&
259 getEBIndexSpace(const phase::which_phase a_phase) const;
260
266 const Vector<EBISLayout>&
267 getEBISLayout(const phase::which_phase a_phase) const;
268
274 const Vector<RefCountedPtr<EBLevelGrid>>&
275 getEBLevelGrid(const phase::which_phase a_phase) const;
276
282 const Vector<RefCountedPtr<EBLevelGrid>>&
283 getEBLevelGridCoFi(const phase::which_phase a_phase) const;
284
291 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
292 getVofIterator(const phase::which_phase a_phase) const;
293
299 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
300 getMultiCutVofIterator(const phase::which_phase a_phase) const;
301
311 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
312 getFaceIterator(const phase::which_phase a_phase) const;
313
322 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
324
333 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
335
343 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
344 getMultiCutFaceIterator(const phase::which_phase a_phase) const;
345
351 const Vector<RefCountedPtr<EBNonConservativeDivergence>>&
353
359 const Vector<RefCountedPtr<CellCentroidInterpolation>>&
361
367 const Vector<RefCountedPtr<EBCentroidInterpolation>>&
369
375 Vector<RefCountedPtr<EBCoarAve>>&
377
383 Vector<RefCountedPtr<EBMultigridInterpolator>>&
385
392 getParticleMesh(const phase::which_phase a_phase);
393
401
407 const Vector<RefCountedPtr<EBGradient>>&
408 getGradientOp(const phase::which_phase a_phase) const;
409
415 Vector<RefCountedPtr<EBGhostCellInterpolator>>&
417
423 Vector<RefCountedPtr<EBCoarseToFineInterp>>&
424 getFineInterp(const phase::which_phase a_phase);
425
431 Vector<RefCountedPtr<EBReflux>>&
432 getFluxRegister(const phase::which_phase a_phase);
433
439 Vector<RefCountedPtr<EBFluxRedistribution>>&
441
447 const EBAMRFAB&
448 getLevelset(const phase::which_phase a_phase) const;
449
455 const EBAMRCellData&
456 getRegularCells(const phase::which_phase a_phase) const;
457
463 const EBAMRCellData&
464 getCoveredCells(const phase::which_phase a_phase) const;
465
471 const EBAMRCellData&
472 getNotCoveredCells(const phase::which_phase a_phase) const;
473
479 const EBAMRCellData&
480 getIrregularCells(const phase::which_phase a_phase) const;
481
487 const EBAMRCellData&
488 getMirrorSurfaceData(const phase::which_phase a_phase) const;
489
495 const Vector<int>&
496 getMirrorHasCutCells(const phase::which_phase a_phase) const;
497
504 const AMRMask&
505 getMask(const std::string& a_mask, const int a_buffer) const;
506
511 const AMRMask&
512 getValidCells() const;
513
521 void
522 registerParticleGhostMask(const int a_width) noexcept;
523
530 getParticleGhostMask(const int a_width) const noexcept;
531
538 getParticleGhostMaskFineToCoar(const int a_width) const noexcept;
539
546 getParticleGhostMaskCoarToFine(const int a_width) const noexcept;
547
555 getTrivialParticleGhostMask() const noexcept;
556
564 const AMRMask&
565 getParticleGhostExposure(const int a_width) const noexcept;
566
571 const Vector<RefCountedPtr<LevelTiles>>&
572 getLevelTiles() const noexcept;
573
585 LevelTiles::LevelAndBox
586 getLevelAndBox(const RealVect& a_pos) const noexcept;
587
588#ifdef CH_USE_PETSC
592 const RefCountedPtr<PetscGrid>&
593 getPetscGrid() const noexcept;
594#endif
595
596protected:
601
606
611
616
621
625 RealVect m_probLo;
626
630 Vector<Real> m_dx;
631
636
640 Vector<DisjointBoxLayout> m_grids;
641
645 Vector<ProblemDomain> m_domains;
646
650 Vector<RefCountedPtr<MFLevelGrid>> m_mflg;
651
655 Vector<RefCountedPtr<MFLevelGrid>> m_mflgCoFi;
656
660 Vector<RefCountedPtr<MFLevelGrid>> m_mflgFiCo;
661
665 Vector<RefCountedPtr<LevelTiles>> m_levelTiles;
666
670 RefCountedPtr<MultiFluidIndexSpace> m_multifluidIndexSpace;
671
676
682
687 std::map<int, AMRParticleGhostMask> m_particleGhostMask;
688
693 std::map<int, AMRParticleGhostMask> m_particleGhostMaskFineToCoar;
694
699 std::map<int, AMRParticleGhostMask> m_particleGhostMaskCoarToFine;
700
715 std::map<int, AMRMask> m_particleGhostExposure;
716
717#ifdef CH_USE_PETSC
721 RefCountedPtr<PetscGrid> m_petscGrid;
722#endif
723
728 mutable std::map<phase::which_phase, RefCountedPtr<PhaseRealm>> m_realms;
729
733 std::map<phase::which_phase, RefCountedPtr<BaseIF>> m_baseif;
734
738 std::map<std::pair<std::string, int>, AMRMask> m_masks;
739
744 void
745 defineMFLevelGrid(const int a_lmin);
746
751 void
752 defineMasks(const int a_lmin);
753
759 void
760 defineOuterHaloMask(const int a_lmin);
761
772 void
773 defineOuterHaloMask(LevelData<BaseFab<bool>>& a_coarMask,
774 const ProblemDomain& a_domainCoar,
775 const ProblemDomain& a_domainFine,
776 const DisjointBoxLayout& a_gridsCoar,
777 const DisjointBoxLayout& a_gridsFine,
778 const int a_buffer,
779 const int a_refRat);
780
788 void
789 defineInnerHaloMask(const int a_lmin);
790
795 void
796 defineOuterCFMask(const int a_lmin);
797
808 void
809 defineOuterCFMask(LevelData<BaseFab<bool>>& a_coarMask,
810 const ProblemDomain& a_domainCoar,
811 const ProblemDomain& a_domainFine,
812 const DisjointBoxLayout& a_gridsCoar,
813 const DisjointBoxLayout& a_gridsFine,
814 const int a_buffer,
815 const int a_refRat);
816
821 void
822 defineInnerCFMask(const int a_lmin);
823
829 void
830 defineCFIVS(const int a_lmin);
831
835 void
837
841 void
842 defineLevelTiles() noexcept;
843
853 void
854 defineParticleGhostMasks() noexcept;
855
871 void
873 const DisjointBoxLayout& a_dbl,
874 const ProblemDomain& a_domain,
875 const int a_ghost) noexcept;
876
895 void
897 const DisjointBoxLayout& a_thisLayout,
898 const DisjointBoxLayout& a_coarLayout,
899 const ProblemDomain& a_coarDomain,
900 const int a_refRat,
901 const int a_ghost) noexcept;
902
921 void
923 const DisjointBoxLayout& a_thisLayout,
924 const DisjointBoxLayout& a_fineLayout,
925 const LevelData<BaseFab<bool>>& a_validCells,
926 const ProblemDomain& a_fineDomain,
927 const int a_refRat,
928 const int a_ghost) noexcept;
929
944 void
945 defineParticleGhostExposure(LevelData<BaseFab<bool>>& a_exposure,
946 const DisjointBoxLayout& a_dbl,
947 const LayoutData<ParticleGhostMask>& a_same,
948 const LayoutData<ParticleGhostMask>& a_fineToCoar,
949 const LayoutData<ParticleGhostMask>& a_coarToFine,
950 const bool a_hasCoar,
951 const bool a_hasFine) noexcept;
952
956 void
957 definePetscGrid() noexcept;
958
965 getRealm(const phase::which_phase a_phase);
966};
967
968#include <CD_NamespaceFooter.H>
969
970#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:95
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:74
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:1572
int m_minBlockSize
Blocking factor.
Definition CD_Realm.H:615
Vector< RefCountedPtr< EBReflux > > & getFluxRegister(const phase::which_phase a_phase)
Get flux register utility.
Definition CD_Realm.cpp:1771
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:1199
void defineMFLevelGrid(const int a_lmin)
Define MFLevelGrid.
Definition CD_Realm.cpp:229
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 int a_mirrorBandRadius, const Real a_mirrorCondTol, const Real a_mirrorCreaseTol, 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
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:1561
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:1874
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp(const phase::which_phase a_phase)
Get piecewise linear ghost cell interpolation utility.
Definition CD_Realm.cpp:1765
AMRMask m_validCells
Mask which is true for all valid cells.
Definition CD_Realm.H:675
static const std::string primal
Identifier for perimal realm.
Definition CD_Realm.H:49
const EBAMRCellData & getMirrorSurfaceData(const phase::which_phase a_phase) const
Get the per-band-cell surface data used by mirrored deposition, for a phase.
Definition CD_Realm.cpp:1813
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:1250
bool m_isDefined
Realm defined or not.
Definition CD_Realm.H:600
void defineOuterHaloMask(const int a_lmin)
Define outer particle halo mask.
Definition CD_Realm.cpp:301
std::map< phase::which_phase, RefCountedPtr< BaseIF > > m_baseif
Implicit/signed distance functions on each phase.
Definition CD_Realm.H:733
Vector< ProblemDomain > m_domains
Domains.
Definition CD_Realm.H:645
Vector< int > m_refinementRatios
Refinement ratios.
Definition CD_Realm.H:635
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp(const phase::which_phase a_phase)
Get the redistribution operators.
Definition CD_Realm.cpp:1777
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:681
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:693
const Vector< ProblemDomain > & getDomains() const
Get problem domains.
Definition CD_Realm.cpp:1627
const AMRParticleGhostMask & getTrivialParticleGhostMask() const noexcept
Get a trivial (empty) particle ghost mask that scatters no particles.
Definition CD_Realm.cpp:1887
bool queryMask(const std::string &a_mask, const int a_buffer) const
Query if a mask has been registered.
Definition CD_Realm.cpp:1583
const Vector< RefCountedPtr< EBNonConservativeDivergence > > & getNonConservativeDivergence(const phase::which_phase a_phase) const
Get objects for computing "non-conservative divergences".
Definition CD_Realm.cpp:1711
Vector< RefCountedPtr< MFLevelGrid > > m_mflgCoFi
Coarsened grids. Entry lvl contains the coarsened version of grids on level lvl+1.
Definition CD_Realm.H:655
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:1801
const AMRMask & getParticleGhostExposure(const int a_width) const noexcept
Get the boundary-exposure mask for a registered particle ghost width.
Definition CD_Realm.cpp:1895
void defineValidCells()
Define the valid cell region mask.
Definition CD_Realm.cpp:1000
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:1303
const Vector< int > & getMirrorHasCutCells(const phase::which_phase a_phase) const
Get, per level, whether that level has any cut cell anywhere in the domain, for a phase.
Definition CD_Realm.cpp:1819
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:1705
Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGridFiCo()
Get the refined grids.
Definition CD_Realm.cpp:1645
const Vector< EBISLayout > & getEBISLayout(const phase::which_phase a_phase) const
Get EBISLayout for particular phase.
Definition CD_Realm.cpp:1657
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:1681
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:1417
Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGridCoFi()
Get the coarsened grids.
Definition CD_Realm.cpp:1639
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:1699
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:1675
Vector< RefCountedPtr< EBMultigridInterpolator > > & getMultigridInterpolator(const phase::which_phase a_phase)
Get the multigrid interpolator.
Definition CD_Realm.cpp:1747
const Vector< RefCountedPtr< EBGradient > > & getGradientOp(const phase::which_phase a_phase) const
Get gradient operator.
Definition CD_Realm.cpp:1753
const Vector< DisjointBoxLayout > & getGrids() const
Get AMR grids.
Definition CD_Realm.cpp:1621
int m_verbosity
Realm verbosity. Used for debugging.
Definition CD_Realm.H:605
void registerOperator(const std::string &a_operator, const phase::which_phase a_phase)
Register an AMR operator.
Definition CD_Realm.cpp:1550
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:854
Vector< RefCountedPtr< MFLevelGrid > > m_mflg
MFLevelGrids.
Definition CD_Realm.H:650
Vector< RefCountedPtr< EBCoarAve > > & getCoarseAverage(const phase::which_phase a_phase)
Get data coarsening utility.
Definition CD_Realm.cpp:1729
void defineParticleGhostMasks() noexcept
Define the same-level, fine-to-coarse, and coarse-to-fine particle ghost masks on every level.
Definition CD_Realm.cpp:1104
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:1861
Vector< Real > m_dx
Grid resolutions.
Definition CD_Realm.H:630
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGrid(const phase::which_phase a_phase) const
Get EBLevelGrid for particular phase.
Definition CD_Realm.cpp:1663
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:1795
std::map< phase::which_phase, RefCountedPtr< PhaseRealm > > m_realms
Phase realms.
Definition CD_Realm.H:728
Vector< RefCountedPtr< EBGhostCellInterpolator > > & getGhostCellInterpolator(const phase::which_phase a_phase)
Get ghost cell interpolator.
Definition CD_Realm.cpp:1759
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:1693
const AMRMask & getValidCells() const
Get all valid cells.
Definition CD_Realm.cpp:1836
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:1609
Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrid()
Get MFLevelGrids.
Definition CD_Realm.cpp:1633
void defineLevelTiles() noexcept
Define the tiled space.
Definition CD_Realm.cpp:1506
int m_finestLevel
Finest AMR level.
Definition CD_Realm.H:610
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:1807
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:1687
void regridOperators(const int a_lmin)
Regrid method for EBAMR operators.
Definition CD_Realm.cpp:188
void defineMasks(const int a_lmin)
Define masks.
Definition CD_Realm.cpp:205
Vector< RefCountedPtr< LevelTiles > > m_levelTiles
Level "tiles" – i.e. the grids viewed as constant-size boxes.
Definition CD_Realm.H:665
std::map< std::pair< std::string, int >, AMRMask > m_masks
Masks.
Definition CD_Realm.H:738
const AMRParticleGhostMask & getParticleGhostMask(const int a_width) const noexcept
Get the same-level particle ghost mask for a registered width.
Definition CD_Realm.cpp:1848
Vector< RefCountedPtr< MFLevelGrid > > m_mflgFiCo
Refined grids. Entry lvl+1 contains the refined version of grids on level lvl.
Definition CD_Realm.H:660
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGridCoFi(const phase::which_phase a_phase) const
Get coarsened fine EBLevelGrid for particular phase.
Definition CD_Realm.cpp:1669
void definePetscGrid() noexcept
Define the PETSc composite grid.
Definition CD_Realm.cpp:1521
EBAMRParticleMesh & getParticleMesh(const phase::which_phase a_phase)
Get the particle mesh operator.
Definition CD_Realm.cpp:1735
const Vector< RefCountedPtr< LevelTiles > > & getLevelTiles() const noexcept
Get the tiled space.
Definition CD_Realm.cpp:1842
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:1089
const Vector< Real > & getDx() const
Get grid resolutions.
Definition CD_Realm.cpp:1615
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:687
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:699
PhaseRealm & getRealm(const phase::which_phase a_phase)
Get a particular realm.
Definition CD_Realm.cpp:1603
void setGrids(const Vector< DisjointBoxLayout > &a_grids, const int a_finestLevel)
Set grid method.
Definition CD_Realm.cpp:136
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
Index spaces.
Definition CD_Realm.H:670
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:1789
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace(const phase::which_phase a_phase) const
Get EBIndexSpace for particular phase.
Definition CD_Realm.cpp:1651
const AMRMask & getMask(const std::string &a_mask, const int a_buffer) const
Get AMR mask.
Definition CD_Realm.cpp:1825
void defineCFIVS(const int a_lmin)
Define the coarse-fine interface.
Definition CD_Realm.cpp:935
Realm()
Default constructor. Must subsequently call define.
Definition CD_Realm.cpp:34
EBAMRSurfaceDeposition & getSurfaceDeposition(const phase::which_phase a_phase)
Get the particle mesh operator.
Definition CD_Realm.cpp:1741
void defineInnerHaloMask(const int a_lmin)
Define inner particle halo mask.
Definition CD_Realm.cpp:495
Vector< DisjointBoxLayout > m_grids
AMR grids.
Definition CD_Realm.H:640
static const std::string Primal
Identifier for perimal realm.
Definition CD_Realm.H:44
void preRegrid()
Perform pre-regrid operations.
Definition CD_Realm.cpp:149
LevelTiles::LevelAndBox getLevelAndBox(const RealVect &a_pos) const noexcept
Find the (finest) grid box covering a physical position.
Definition CD_Realm.cpp:1910
RealVect m_probLo
Physical coordinates of lower-left corner in simulation domain.
Definition CD_Realm.H:625
const EBAMRFAB & getLevelset(const phase::which_phase a_phase) const
Get level-set function.
Definition CD_Realm.cpp:1783
int m_numGhost
Number of ghost cells.
Definition CD_Realm.H:620
~Realm()
Destructor.
void regridBase(const int a_lmin)
Regrid method for EBAMR base.
Definition CD_Realm.cpp:171
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:1723
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:660
std::map< int, AMRMask > m_particleGhostExposure
Particle boundary-exposure masks, keyed by ghost width. Per width: indexed by level,...
Definition CD_Realm.H:715
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:1717
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38