19#include <DisjointBoxLayout.H>
20#include <ProblemDomain.H>
38#include <CD_NamespaceHeader.H>
99 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
112 template <
typename T>
116 const Interval& a_dstComps,
117 const Interval& a_srcComps,
119 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
134 template <
typename T>
137 const LevelData<T>& a_src,
139 const std::string a_toRealm,
140 const std::string a_fromRealm,
142 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
159 template <
typename T>
162 const LevelData<T>& a_src,
164 const std::string a_toRealm,
165 const std::string a_fromRealm,
166 const Interval& a_dstComps,
167 const Interval& a_srcComps,
169 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
175 template <
typename T>
183 template <
typename T>
185 deallocate(Vector<RefCountedPtr<T>>& a_data)
const;
191 template <
typename T>
201 template <
typename T>
203 alias(Vector<T*>& a_alias,
const Vector<RefCountedPtr<T>>& a_data)
const;
211 template <
typename T,
typename S>
222 template <
typename P,
typename Traits>
231 template <
typename T>
241 template <
typename T>
243 allocatePointer(Vector<RefCountedPtr<T>>& a_data,
const int a_finestLevel)
const;
251 template <
typename T>
262 template <
typename T>
274 slice(EBAMRCellData& a_original,
const Interval a_variables)
const noexcept;
284 slice(
const EBAMRCellData& a_original,
const Interval a_variables)
const noexcept;
318 registerMask(
const std::string& a_mask,
const int a_buffer,
const std::string& a_realm);
374 alias(EBAMRCellData& a_data,
376 const MFAMRCellData& a_mfdata,
377 const int a_finestLevel)
const;
387 alias(EBAMRFluxData& a_data,
389 const MFAMRFluxData& a_mfdata,
390 const int a_finestLevel)
const;
457 const EBAMRCellData& a_phi,
458 const std::string& a_realm,
472 const EBAMRCellData& a_phi,
473 const std::string& a_realm,
485 computeGradient(MFAMRCellData& a_gradient,
const MFAMRCellData& a_phi,
const std::string& a_realm)
const;
496 computeGradient(MFAMRFluxData& a_gradient,
const MFAMRCellData& a_phi,
const std::string& a_realm)
const;
509 const std::string& a_realm,
512 const int a_ghost = -1)
const;
525 allocate(LevelData<EBCellFAB>& a_data,
526 const std::string& a_realm,
530 const int a_ghost = -1)
const;
543 const std::string& a_realm,
546 const int a_ghost = -1)
const;
559 const std::string& a_realm,
562 const int a_ghost = -1)
const;
575 const std::string& a_realm,
578 const int a_ghost = -1)
const;
589 allocate(EBAMRBool& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
602 allocate(EBAMRFAB& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
613 allocate(MFAMRCellData& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
624 allocate(MFAMRFluxData& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
635 allocate(MFAMRIVData& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = 0)
const;
684 reallocate(EBAMRBool& a_data,
const int a_lmin)
const;
693 reallocate(MFAMRCellData& a_data,
const int a_lmin)
const;
702 reallocate(MFAMRFluxData& a_data,
const int a_lmin)
const;
711 reallocate(MFAMRIVData& a_data,
const int a_lmin)
const;
720 average(MFAMRCellData& a_data,
const std::string& a_realm,
const Average& a_average)
const;
736 harmonicAverage(MFAMRCellData& a_data,
const std::string& a_realm)
const;
753 average(MFAMRFluxData& a_data,
const std::string& a_realm,
const Average& a_average)
const;
773 harmonicAverage(MFAMRFluxData& a_data,
const std::string& a_realm)
const;
792 const std::string& a_realm,
794 const Average& a_average)
const;
806 const std::string& a_realm,
809 const Interval& a_variables)
const;
829 const std::string& a_realm,
831 const Interval& a_variables)
const;
851 const std::string& a_realm,
853 const Interval& a_variables)
const;
873 const std::string& a_realm,
875 const Interval& a_variables)
const;
886 const std::string& a_realm,
888 const Average& a_average)
const;
930 const std::string& a_realm,
932 const Average& a_average)
const;
971 template <
typename P,
typename Traits>
974 const std::string& a_realm,
990 template <
typename P,
typename Traits>
993 const std::string& a_realm,
1016 template <
typename P,
typename Traits,
typename CellGather>
1019 const std::string& a_realm,
1025 CellGather a_cellGather);
1042 template <
auto... Members,
typename P,
typename Traits>
1045 const std::string& a_realm,
1063 template <
typename P,
typename Traits>
1066 const std::string& a_realm,
1068 const EBAMRCellData& a_meshScalarField,
1070 const bool a_forceIrregNGP)
const;
1086 template <
auto... Members,
typename P,
typename Traits>
1089 const std::string& a_realm,
1091 const EBAMRCellData& a_meshField,
1093 const bool a_forceIrregNGP)
const;
1103 template <
typename P,
typename Traits>
1107 const Real a_tolerance)
const;
1118 template <
typename P,
typename Traits>
1122 const Real a_tolerance)
const;
1131 template <
typename P,
typename Traits>
1147 template <
typename P,
typename Traits>
1152 const Real a_tolerance)
const;
1165 template <
typename P,
typename Traits>
1170 const Real a_tolerance)
const;
1180 template <
typename P,
typename Traits>
1196 template <
typename P,
typename Traits>
1224 template <
auto... OldPosition,
typename P,
typename Traits>
1231 const Real a_tolerance,
1232 const bool a_deleteParticles,
1252 template <
auto... OldPosition,
typename P,
typename Traits>
1259 const Real a_bisectionStep,
1260 const bool a_deleteParticles,
1282 const LevelData<EBCellFAB>& a_coarData,
1283 const int a_fineLevel,
1284 const std::string& a_realm,
1293 interpGhost(MFAMRCellData& a_data,
const std::string& a_realm)
const;
1301 interpGhostPwl(MFAMRCellData& a_data,
const std::string& a_realm)
const;
1320 interpGhostMG(MFAMRCellData& a_data,
const std::string& a_realm)
const;
1346 const MFAMRCellData& a_oldData,
1348 const int a_oldFinestLevel,
1349 const int a_newFinestLevel,
1366 const EBAMRCellData& a_oldData,
1369 const int a_oldFinestLevel,
1370 const int a_newFinestLevel,
1387 const EBAMRIVData& a_oldData,
1390 const int a_oldFinestLevel,
1391 const int a_newFinestLevel,
1403 template <
typename P,
typename Traits>
1407 const int a_newFinestLevel)
const noexcept;
1429 const std::string& a_realm,
1431 const int a_level)
const noexcept;
1444 const EBCellFAB& a_cellData,
1445 const std::string& a_realm,
1448 const DataIndex& a_din)
const noexcept;
1461 const EBAMRCellData& a_cellData,
1462 const std::string& a_realm,
1475 const LevelData<EBCellFAB>& a_cellData,
1476 const std::string& a_realm,
1478 const int a_level)
const noexcept;
1489 const EBAMRCellData& a_cellData,
1490 const std::string& a_realm,
1502 interpToEB(LevelData<BaseIVFAB<Real>>& a_centroidData,
1503 const LevelData<EBCellFAB>& a_cellData,
1504 const std::string& a_realm,
1506 const int a_level)
const noexcept;
1519 const EBCellFAB& a_cellData,
1520 const std::string& a_realm,
1523 const DataIndex& a_din)
const noexcept;
1536 const EBAMRCellData& a_kappaDivF,
1537 const std::string& a_realm,
1552 const LevelData<EBCellFAB>& a_kappaDivF,
1554 const std::string& a_realm,
1585 regridAmr(
const Vector<IntVectSet>& a_tags,
const int a_lmin,
const int a_hardcap = -1);
1597 regridAmr(
const Vector<Vector<Box>>& a_boxes,
const int a_lmin);
1608 const Vector<Vector<int>>& a_procs,
1609 const Vector<Vector<Box>>& a_boxes,
1625 setGrids(
const Vector<Vector<Box>>& a_boxes,
const std::map<std::string, Vector<Vector<long int>>>& a_realmsAndLoads);
1814 const RefCountedPtr<BaseIF>&
1822 const Vector<DisjointBoxLayout>&
1830 const Vector<DisjointBoxLayout>&
1831 getGrids(
const std::string& a_realm)
const;
1837 const Vector<ProblemDomain>&
1848 getMask(
const std::string& a_mask,
const int a_buffer,
const std::string& a_realm)
const;
1863 const Vector<RefCountedPtr<LevelTiles>>&
1932 const Vector<RefCountedPtr<EBLevelGrid>>&
1941 const Vector<RefCountedPtr<EBLevelGrid>>&
1950 const Vector<EBISLayout>&
1958 const Vector<RefCountedPtr<MFLevelGrid>>&
1969 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
1981 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
1992 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
2003 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
2017 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
2030 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
2048 const EBAMRCellData&
2057 const EBAMRCellData&
2066 const EBAMRCellData&
2075 const EBAMRCellData&
2086 const EBAMRCellData&
2138 Vector<RefCountedPtr<EBCoarAve>>&
2147 Vector<RefCountedPtr<EBMultigridInterpolator>>&
2156 Vector<RefCountedPtr<EBCoarseToFineInterp>>&
2165 Vector<RefCountedPtr<EBReflux>>&
2174 Vector<RefCountedPtr<EBFluxRedistribution>>&
2182 const RefCountedPtr<PetscGrid>&
2183 getPetscGrid(
const std::string& a_realm)
const noexcept;
2190 std::vector<std::string>
2205 RefCountedPtr<EBIndexSpace>&
2224 mutable std::map<std::string, RefCountedPtr<Realm>>
m_realms;
2229 std::map<phase::which_phase, RefCountedPtr<BaseIF>>
m_baseif;
2493 buildGrids(
const Vector<IntVectSet>& a_tags,
const int a_lmin,
const int a_hardcap = -1);
2503 buildGrids(
const Vector<Vector<Box>>& a_boxes,
const int a_lmin);
2511 defineGrids(Vector<Vector<Box>>& a_boxes,
const int a_lmin);
2653 const LevelData<EBCellFAB>& a_phi,
2654 const std::string& a_realm,
2656 const int a_lvl)
const;
2659#include <CD_NamespaceFooter.H>
Implementation of CD_AmrMesh.H.
Average
Various averaging methods.
Definition CD_Average.H:25
BoxSorting
Enum for sorting boxes.
Definition CD_BoxSorting.H:22
CoarseFineDeposition
Coarse-fine deposition types (see CD_EBAMRParticleMesh for how these are handled).
Definition CD_CoarseFineDeposition.H:28
Declaration of base class for defining geometries.
Simple enum for distinguishing copying strategies.
CopyStrategy
Enum for distinguishing how we copy data Valid => valid region ValidGhost => valid+ghost region.
Definition CD_CopyStrategy.H:24
DepositionType
Deposition types.
Definition CD_DepositionType.H:24
Declaration of factory class for DomainFluxIFFAB.
Declaration of a BaseIFFAB wrapper that holds domain fluxes.
Class for holding data across EBAMR hierarchies.
Declaration of conservative coarsening utility.
Declaration of a class which can reflux over the coarse-fine interface.
Declaration of cut-cell deposition strategies.
IrregularDeposition
How a deposition scheme treats the cut cells.
Definition CD_IrregularDeposition.H:36
Declaration of a static class for various load balancing operations.
Declaration of a wrapper for wrapping multifluid EBLevelGrids.
Declaration of an AMR-hierarchy container that owns per-patch ParticleSoA leaves.
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
Declaration of the Realm 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
Class for handling spatial operations.
Definition CD_AmrMesh.H:46
AmrMesh & operator=(const AmrMesh &a_other)=delete
Disallowed copy assignment.
const AMRParticleGhostMask & getTrivialParticleGhostMask() const
Get a trivial (empty) particle ghost mask that scatters no particles.
Definition CD_AmrMesh.cpp:3650
int m_refRatio
Refinement ratio.
Definition CD_AmrMesh.H:2320
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getFaceIterator(const std::string &a_realm, const phase::which_phase a_phase) const
Get face iterators over cut-cell faces in each valid grid box (FaceStop::SurroundingWithBoundary).
Definition CD_AmrMesh.cpp:3467
void depositGathered(EBAMRCellData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P, Traits > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const IrregularDeposition a_irregularDeposition, CellGather a_cellGather)
Deposit a custom per-particle scalar (a_cellGather) of an SoA container on the mesh.
Definition CD_AmrMeshImplem.H:391
void parseRuntimeOptions()
Parse runtime options.
Definition CD_AmrMesh.cpp:988
std::map< std::string, Vector< Copier > > m_oldToNewCellCopiers
Storage for copiers from the old grids to the new ones.
Definition CD_AmrMesh.H:2240
void registerOperator(const std::string &a_operator, const std::string &a_realm, const phase::which_phase a_phase)
Register an operator over a realm and a phase.
Definition CD_AmrMesh.cpp:4077
void allocatePointer(Vector< RefCountedPtr< T > > &a_data) const
Allocate pointer but not any memory blocks.
Definition CD_AmrMeshImplem.H:268
EBAMRSurfaceDeposition & getSurfaceDeposition(const std::string &a_realm, const phase::which_phase a_phase) const
Get EBAMRSurfaceDeposition surface deposition operator.
Definition CD_AmrMesh.cpp:3877
const AMRMask & getMask(const std::string &a_mask, const int a_buffer, const std::string &a_realm) const
Get a registered mask.
Definition CD_AmrMesh.cpp:3536
std::vector< std::string > getRealms() const
Get the name of all Realms.
Definition CD_AmrMesh.cpp:4203
RealVect getProbHi() const
Get upper-right corner of computational domain.
Definition CD_AmrMesh.cpp:3160
void parseBrBufferSize()
Parse buffer size for Berger-Rigoutsous grid algorithm.
Definition CD_AmrMesh.cpp:2745
Real getFinestDx() const
Get resolution on the finest grid level.
Definition CD_AmrMesh.cpp:3333
int getMaxBlockSize() const
Get maximum permitted block size.
Definition CD_AmrMesh.cpp:3270
void registerRealm(const std::string &a_realm)
Register a new realm.
Definition CD_AmrMesh.cpp:4064
const RefCountedPtr< BaseIF > & getBaseImplicitFunction(const phase::which_phase a_phase) const
Get implicit function for a specific phase.
Definition CD_AmrMesh.cpp:3366
AmrMesh(const AmrMesh &&a_other)=delete
Disallowed move constructor.
void transferCoveredParticlesIF(ParticleContainer< P, Traits > &a_particlesFrom, ParticleContainer< P, Traits > &a_particlesTo, const phase::which_phase &a_phase, const Real a_tolerance) const
Transfer SoA particles inside the EB (implicit-function test) from one container to another: f(x) > a...
Definition CD_AmrMeshImplem.H:673
Real m_fillRatioBR
Fill ratio.
Definition CD_AmrMesh.H:2305
void allocate(ParticleContainer< P, Traits > &a_container, const std::string &a_realm) const
Allocate a struct-of-arrays particle container on the given realm.
Definition CD_AmrMeshImplem.H:241
ProblemDomain getFinestDomain() const
Get finest domain.
Definition CD_AmrMesh.cpp:3322
void parseCellCentroidInterpolation()
Parse centroid interpolation stencils.
Definition CD_AmrMesh.cpp:2967
Vector< RefCountedPtr< EBCoarAve > > & getCoarseAverage(const std::string &a_realm, const phase::which_phase a_phase) const
Get the coarsening utility.
Definition CD_AmrMesh.cpp:3894
const Vector< RefCountedPtr< LevelTiles > > & getLevelTiles(const std::string &a_realm) const
Get the tiled space representation.
Definition CD_AmrMesh.cpp:3568
void depositWeight(EBAMRCellData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P, Traits > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const IrregularDeposition a_irregularDeposition)
Deposit the SoA container's weight column on the mesh (all coarse-fine strategies).
Definition CD_AmrMeshImplem.H:371
int m_oldFinestLevel
Finest level before a regrid.
Definition CD_AmrMesh.H:2335
void copyData(EBAMRData< T > &a_dst, const EBAMRData< T > &a_src, const CopyStrategy &a_toRegion=CopyStrategy::Valid, const CopyStrategy &a_fromRegion=CopyStrategy::Valid) const noexcept
Method for copying from a source container to a destination container. User supplies information abou...
Definition CD_AmrMeshImplem.H:23
const Vector< DisjointBoxLayout > & getProxyGrids() const
Get the "proxy" grids in AmrMesh.
Definition CD_AmrMesh.cpp:3389
void interpGhostMG(MFAMRCellData &a_data, const std::string &a_realm) const
Interpolate ghost cells over a realm and phase.
Definition CD_AmrMesh.cpp:2121
IntVect m_numCells
Coarsest box where we compute.
Definition CD_AmrMesh.H:2300
void postRegrid()
Run post-regrid operations.
Definition CD_AmrMesh.cpp:1081
void parseMaxAmrDepth()
Parse the maximum permitted AMR depth.
Definition CD_AmrMesh.cpp:2575
RealVect m_probHi
Domain simulation corner.
Definition CD_AmrMesh.H:2315
void registerParticleGhostMask(const std::string &a_realm, const int a_width)
Register a particle ghost-mask width on a realm so it is (re)built at every regrid.
Definition CD_AmrMesh.cpp:3584
const AMRMask & getValidCells(const std::string &a_realm) const
Get a map of all valid cells on a specified realm.
Definition CD_AmrMesh.cpp:3552
Vector< DisjointBoxLayout > m_grids
Grids.
Definition CD_AmrMesh.H:2461
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
MultiFluidIndexSpace.
Definition CD_AmrMesh.H:2285
void interpolateWeight(ParticleContainer< P, Traits > &a_particles, const std::string &a_realm, const phase::which_phase &a_phase, const EBAMRCellData &a_meshScalarField, const DepositionType a_interpType, const bool a_forceIrregNGP) const
Interpolate a mesh scalar field onto the SoA container's weight column.
Definition CD_AmrMeshImplem.H:441
RealVect m_probLo
Domain simulation corner.
Definition CD_AmrMesh.H:2310
int m_mirrorBandRadius
Mirror deposition: half-width, in cells, of the band around the embedded boundary that reflects.
Definition CD_AmrMesh.H:2417
void nonConservativeDivergence(EBAMRIVData &a_nonConsDivF, const EBAMRCellData &a_kappaDivF, const std::string &a_realm, const phase::which_phase &a_phase) const noexcept
Compute a non-conservative divergence.
Definition CD_AmrMesh.cpp:3997
int m_bufferSizeBR
Set buffer size.
Definition CD_AmrMesh.H:2360
void intersectParticlesBisectIF(ParticleContainer< P, Traits > &a_activeParticles, ParticleContainer< P, Traits > &a_ebParticles, ParticleContainer< P, Traits > &a_domainParticles, const phase::which_phase a_phase, const Real a_bisectionStep, const bool a_deleteParticles, const std::function< void(ParticleSoA< P, Traits > &, std::size_t)> &a_nonDeletionModifier) const noexcept
SoA bisection-based particle intersection algorithm.
Definition CD_AmrMeshImplem.H:1053
void setCoarsestGrid(const IntVect &a_nCells)
Set the coarsest grid cells.
Definition CD_AmrMesh.cpp:2534
void parseMaxSimulationDepth()
Set maximum simulation depth.
Definition CD_AmrMesh.cpp:2594
int getMaxSimulationDepth() const
Get maximum permitted simulation depth.
Definition CD_AmrMesh.cpp:3193
int m_maxSimulationDepth
Maximum allowed depth for simulation.
Definition CD_AmrMesh.H:2345
void setFinestLevel(const int a_finestLevel)
Set the finest level.
Definition CD_AmrMesh.cpp:2651
virtual ~AmrMesh()
Destructor.
const Vector< DisjointBoxLayout > & getGrids(const std::string &a_realm) const
Get the grids.
Definition CD_AmrMesh.cpp:3400
int m_multigridInterpRadius
Multigrid interpolation radius.
Definition CD_AmrMesh.H:2400
void buildDomains()
Build domains.
Definition CD_AmrMesh.cpp:1024
Real m_mirrorCreaseTolerance
Mirror deposition: largest permitted dimensionless residual of the shape-operator fit.
Definition CD_AmrMesh.H:2431
const AMRParticleGhostMask & getParticleGhostMask(const std::string &a_realm, const int a_width) const
Get the same-level particle ghost mask on a realm for a registered width.
Definition CD_AmrMesh.cpp:3600
GridGenerationMethod m_gridGenerationMethod
Grid generation method.
Definition CD_AmrMesh.H:2275
int getMinBlockSize() const
Get the minimum block size (i.e. the smallest possible box / tile size).
Definition CD_AmrMesh.cpp:3259
const EBAMRCellData & getMirrorSurfaceData(const std::string &a_realm, const phase::which_phase a_phase) const
Get the per-band-cell surface data used by mirrored deposition, for a Realm and phase.
Definition CD_AmrMesh.cpp:3814
void parseRefinementRatios()
Parse refinement ratios.
Definition CD_AmrMesh.cpp:2613
Vector< int > m_refinementRatios
AMR resolutions.
Definition CD_AmrMesh.H:2471
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getFaceIteratorNoBoundary(const std::string &a_realm, const phase::which_phase a_phase) const
Get face iterators over cut-cell faces in each valid grid box (FaceStop::SurroundingNoBoundary).
Definition CD_AmrMesh.cpp:3484
const EBAMRCellData & getNotCoveredCells(const std::string &a_realm, const phase::which_phase a_phase) const
Get the non-covered-cell mask (1 in regular/irregular cells, 0 in covered cells) for a Realm and phas...
Definition CD_AmrMesh.cpp:3780
int m_verbosity
Verbosity.
Definition CD_AmrMesh.H:2325
Real getMirrorMaxJacobian() const
Get the largest Jacobian magnitude the mirror pass will trust.
Definition CD_AmrMesh.cpp:3848
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getMultiCutVofIterator(const std::string &a_realm, const phase::which_phase a_phase) const
Get vof iterators restricted to multiply-cut cells for a Realm and phase.
Definition CD_AmrMesh.cpp:3450
void interpToCentroids(EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const noexcept
Interpolate data to centroids on realm and phase.
Definition CD_AmrMesh.cpp:2356
const EBAMRCellData & getIrregularCells(const std::string &a_realm, const phase::which_phase a_phase) const
Get the irregular-cell mask (value 1 in irregular cells, 0 elsewhere) for a Realm and phase.
Definition CD_AmrMesh.cpp:3797
bool m_hasRegridCopiers
Has regrid copiers or not.
Definition CD_AmrMesh.H:2456
int m_minBlockSize
Blocking factor.
Definition CD_AmrMesh.H:2365
int m_multigridInterpOrder
Multigrid interpolation order.
Definition CD_AmrMesh.H:2395
const AMRParticleGhostMask & getParticleGhostMaskFineToCoar(const std::string &a_realm, const int a_width) const
Get the fine-to-coarse particle ghost mask on a realm for a registered width.
Definition CD_AmrMesh.cpp:3616
std::map< std::pair< std::string, std::string >, Vector< Copier > > m_validToValidRealmCopiers
Map for copying between various Realms. First index is the "from" realm and second index is the "to" ...
Definition CD_AmrMesh.H:2252
std::map< std::pair< std::string, std::string >, Vector< Copier > > m_validGhostToValidRealmCopiers
Map for copying between various Realms. First index is the "from" realm and second index is the "to" ...
Definition CD_AmrMesh.H:2264
void parseNumGhostCells()
Parse the number of ghost cells.
Definition CD_AmrMesh.cpp:2873
const AMRParticleGhostMask & getParticleGhostMaskCoarToFine(const std::string &a_realm, const int a_width) const
Get the coarse-to-fine particle ghost mask on a realm for a registered width.
Definition CD_AmrMesh.cpp:3633
void sanityCheck() const
Do a sanity check to make sure everything is set up correctly.
Definition CD_AmrMesh.cpp:3053
const Vector< int > & getMirrorHasCutCells(const std::string &a_realm, const phase::which_phase a_phase) const
Get, per level, whether that level has any cut cell anywhere in the domain.
Definition CD_AmrMesh.cpp:3831
int m_numGhostCells
Number of ghost cells.
Definition CD_AmrMesh.H:2385
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp(const std::string &a_realm, const phase::which_phase a_phase) const
Get the redistribution operators.
Definition CD_AmrMesh.cpp:3962
void buildGrids(const Vector< IntVectSet > &a_tags, const int a_lmin, const int a_hardcap=-1)
Build new internal AMR grids.
Definition CD_AmrMesh.cpp:1189
void parseVerbosity()
Parse the verbosity for AmrMesh.
Definition CD_AmrMesh.cpp:2545
int m_maxBlockSize
Max box size.
Definition CD_AmrMesh.H:2350
GridGenerationMethod
Enum for having understandable notation for grid generation.
Definition CD_AmrMesh.H:2216
std::map< std::pair< std::string, std::string >, Vector< Copier > > m_validGhostToValidGhostRealmCopiers
Map for copying between various Realms. First index is the "from" realm and second index is the "to" ...
Definition CD_AmrMesh.H:2270
void transferCoveredParticlesDiscrete(ParticleContainer< P, Traits > &a_particlesFrom, ParticleContainer< P, Traits > &a_particlesTo, const phase::which_phase &a_phase, const Real a_tolerance) const
Transfer SoA particles inside the EB using discrete (EBISBox) information from one container to anoth...
Definition CD_AmrMeshImplem.H:738
void harmonicAverage(MFAMRCellData &a_data, const std::string &a_realm) const
Harmonic coarsening of multifluid data.
Definition CD_AmrMesh.cpp:1636
void removeCoveredParticlesVoxels(ParticleContainer< P, Traits > &a_particles, const phase::which_phase &a_phase) const
Remove SoA particles that live in covered cells (voxel test).
Definition CD_AmrMeshImplem.H:618
bool getEbCf() const
Check if mesh has an EBCF.
Definition CD_AmrMesh.cpp:4053
const AMRMask & getParticleGhostExposure(const std::string &a_realm, const int a_width) const
Get the particle boundary-exposure mask on a realm for a registered width.
Definition CD_AmrMesh.cpp:3663
void parseMinBlockSize()
Parse the B-R blocking factor. For tiled mesh refinement this parses the tile size.
Definition CD_AmrMesh.cpp:2806
Vector< Real > m_dx
Level resolutions.
Definition CD_AmrMesh.H:2476
Real m_mirrorConditionTolerance
Mirror deposition: smallest permitted eigenvalue ratio of U^T U in the shape-operator fit.
Definition CD_AmrMesh.H:2424
int m_numEbGhostsCells
Number of ghost cells to use for eb stuff.
Definition CD_AmrMesh.H:2380
void transferIrregularParticles(ParticleContainer< P, Traits > &a_dstParticles, ParticleContainer< P, Traits > &a_srcParticles, const phase::which_phase a_phase) const noexcept
Transfer SoA particles that are on the covered side of the EB to a different container.
Definition CD_AmrMeshImplem.H:1219
void parseOptions()
Parse options. Called during the constructor.
Definition CD_AmrMesh.cpp:952
void buildCopiers()
Build copiers for copying between realms.
Definition CD_AmrMesh.cpp:1380
RealVect getProbLo() const
Get lower-left corner of computational domain.
Definition CD_AmrMesh.cpp:3149
BoxSorting m_boxSort
Box sorting.
Definition CD_AmrMesh.H:2280
void setMultifluidIndexSpace(const RefCountedPtr< MultiFluidIndexSpace > &a_multiFluidIndexSpace)
Sets multifluid index space.
Definition CD_AmrMesh.cpp:928
int m_maxAmrDepth
Maximum amr depth.
Definition CD_AmrMesh.H:2340
void defineRealms()
Define Realms.
Definition CD_AmrMesh.cpp:4110
int m_finestLevel
Finest level.
Definition CD_AmrMesh.H:2330
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGridCoFi(const std::string &a_realm, const phase::which_phase a_phase) const
Get the coarsened fine EBLevelGrid for a Realm and phase.
Definition CD_AmrMesh.cpp:3696
void removeCoveredParticlesIF(ParticleContainer< P, Traits > &a_particles, const phase::which_phase &a_phase, const Real a_tolerance) const
Remove SoA particles that fall inside the EB (implicit-function test): f(x) > a_tolerance*dx.
Definition CD_AmrMeshImplem.H:479
void reallocate(EBAMRCellData &a_data, const phase::which_phase a_phase, const int a_lmin) const
Reallocate data.
Definition CD_AmrMesh.cpp:614
Real m_mirrorMaxJacobian
Mirror deposition: largest Jacobian magnitude that will be trusted.
Definition CD_AmrMesh.H:2439
std::map< std::string, Vector< Copier > > m_oldToNewEBCopiers
Storage for copiers from the old grids to the new ones.
Definition CD_AmrMesh.H:2246
const Vector< RefCountedPtr< EBLevelGrid > > & getEBLevelGrid(const std::string &a_realm, const phase::which_phase a_phase) const
Get the EBLevelGrid for a Realm and phase.
Definition CD_AmrMesh.cpp:3679
std::map< phase::which_phase, RefCountedPtr< BaseIF > > m_baseif
Implicit functions.
Definition CD_AmrMesh.H:2229
void regridRealm(const std::string &a_realm, const Vector< Vector< int > > &a_procs, const Vector< Vector< Box > > &a_boxes, const int a_lmin)
Regrid a realm. This generates the grids for the realm, but does not do the operators on the realm.
Definition CD_AmrMesh.cpp:4143
int getNumberOfGhostCells() const
Get the default number of ghost cells.
Definition CD_AmrMesh.cpp:3226
bool queryRealm(const std::string &a_realm) const
Query if a realm exists.
Definition CD_AmrMesh.cpp:4036
const EBAMRFAB & getLevelset(const std::string &a_realm, const phase::which_phase a_phase) const
Get levelset function, allocated over a grid for a Realm and phase.
Definition CD_AmrMesh.cpp:3730
int m_ebMaxBlockSize
Largest box the geometry grids are tiled with.
Definition CD_AmrMesh.H:2375
void regridAmr(const Vector< IntVectSet > &a_tags, const int a_lmin, const int a_hardcap=-1)
Regrid AMR. This versions generates the grids and Realms, but not the operator.
Definition CD_AmrMesh.cpp:1119
AmrMesh & operator=(const AmrMesh &&a_other)=delete
Disallowed move assignment.
void parseCoarsestLevelNumCells()
Parse the coarsest domain grid.
Definition CD_AmrMesh.cpp:2558
RefCountedPtr< EBIndexSpace > & getEBIndexSpace(const phase::which_phase a_phase)
Get EBIndexSpace corresponding to a particular phase.
Definition CD_AmrMesh.H:2206
void arithmeticAverage(MFAMRCellData &a_data, const std::string &a_realm) const
Arithmetic coarsening of multifluid data.
Definition CD_AmrMesh.cpp:1625
void parseRedistributionRadius()
Parse the default redistribution radius.
Definition CD_AmrMesh.cpp:2920
void intersectParticlesRaycastIF(ParticleContainer< P, Traits > &a_activeParticles, ParticleContainer< P, Traits > &a_ebParticles, ParticleContainer< P, Traits > &a_domainParticles, const phase::which_phase a_phase, const Real a_tolerance, const bool a_deleteParticles, const std::function< void(ParticleSoA< P, Traits > &, std::size_t)> &a_nonDeletionModifier) const noexcept
SoA ray-casting particle intersection algorithm.
Definition CD_AmrMeshImplem.H:885
void setGrids(const Vector< Vector< Box > > &a_boxes, const std::map< std::string, Vector< Vector< long int > > > &a_realmsAndLoads)
Set grids from boxes and computational loads.
Definition CD_AmrMesh.cpp:2664
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getFaceIteratorWithTangentialGhosts(const std::string &a_realm, 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_AmrMesh.cpp:3501
int getEbMinBlockSize() const
Get the smallest box the geometry grids are tiled with.
Definition CD_AmrMesh.cpp:3204
std::map< std::pair< std::string, std::string >, Vector< Copier > > m_validToValidGhostRealmCopiers
Map for copying between various Realms. First index is the "from" realm and second index is the "to" ...
Definition CD_AmrMesh.H:2258
void computeGradient(EBAMRCellData &a_gradient, const EBAMRCellData &a_phi, const std::string &a_realm, const phase::which_phase a_phase) const
Compute cell-centered gradient over an AMR hierarchy.
Definition CD_AmrMesh.cpp:1445
const Vector< Real > & getDx() const
Get spatial resolutions.
Definition CD_AmrMesh.cpp:3344
int getBrBuffer() const
Return buffer for B-R mesh refinement algorithm.
Definition CD_AmrMesh.cpp:3281
Real getMirrorMinDenominator() const
Get the smallest Jacobian denominator the mirror pass will trust.
Definition CD_AmrMesh.cpp:3854
Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & getMultiCutFaceIterator(const std::string &a_realm, const phase::which_phase a_phase) const
Get face iterators restricted to multiply-cut faces in each valid grid box.
Definition CD_AmrMesh.cpp:3519
EBAMRParticleMesh & getParticleMesh(const std::string &a_realm, const phase::which_phase a_phase) const
Get EBAMRParticleMesh operator.
Definition CD_AmrMesh.cpp:3860
const Vector< EBISLayout > & getEBISLayout(const std::string &a_realm, const phase::which_phase a_phase) const
Get EBISLayouts for a Realm and phase.
Definition CD_AmrMesh.cpp:3416
void defineGrids(Vector< Vector< Box > > &a_boxes, const int a_lmin)
Load balance new boxes and define m_grids from them, for levels a_lmin through m_finestLevel.
Definition CD_AmrMesh.cpp:1321
int getMaxBoxSize() const
Deprecated alias for getMaxBlockSize().
Definition CD_AmrMesh.H:1700
std::map< std::string, RefCountedPtr< Realm > > m_realms
These are all the Realms.
Definition CD_AmrMesh.H:2224
int getMaxEbisBoxSize() const
Get maximum box size for EBIS generation.
Definition CD_AmrMesh.cpp:3292
AmrMesh()
Default constructor.
Definition CD_AmrMesh.cpp:32
int getEbMaxBlockSize() const
Get the largest box the geometry grids are tiled with.
Definition CD_AmrMesh.cpp:3215
void parseEbGhostCells()
Parse number of ghost cells for eb stuff.
Definition CD_AmrMesh.cpp:2829
void parseMultigridInterpolator()
Parse settings for the multigrid interpolator.
Definition CD_AmrMesh.cpp:2895
void interpolateParticles(ParticleContainer< P, Traits > &a_particles, const std::string &a_realm, const phase::which_phase &a_phase, const EBAMRCellData &a_meshField, const DepositionType a_interpType, const bool a_forceIrregNGP) const
Interpolate a mesh field onto one or more SoA payload columns.
Definition CD_AmrMeshImplem.H:460
EBAMRCellData slice(EBAMRCellData &a_original, const Interval a_variables) const noexcept
Slice cell-centered data in order to fetch a subset of components.
Definition CD_AmrMesh.cpp:46
int getRefinementRatio(const int a_level1, const int a_level2) const
Get refinement factor between two levels.
Definition CD_AmrMesh.cpp:3303
void registerMask(const std::string &a_mask, const int a_buffer, const std::string &a_realm)
Register a boolean mask over a realm.
Definition CD_AmrMesh.cpp:4094
const EBAMRCellData & getRegularCells(const std::string &a_realm, const phase::which_phase a_phase) const
Get the regular-cell mask (value 1 in regular cells, 0 elsewhere) for a Realm and phase.
Definition CD_AmrMesh.cpp:3746
void depositParticles(EBAMRIVData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P, Traits > &a_particles) const noexcept
Deposit the weight column of an SoA particle container onto the surface (EB).
Definition CD_AmrMeshImplem.H:351
Vector< RefCountedPtr< EBMultigridInterpolator > > & getMultigridInterpolator(const std::string &a_realm, const phase::which_phase a_phase) const
Get multigrid interpolation utility.
Definition CD_AmrMesh.cpp:3911
void interpToEB(EBAMRIVData &a_centroidData, const EBAMRCellData &a_cellData, const std::string &a_realm, const phase::which_phase a_phase) const noexcept
Interpolate data to EB centroids on realm and phase.
Definition CD_AmrMesh.cpp:2465
void remapToNewGrids(ParticleContainer< P, Traits > &a_particles, const int a_lmin, const int a_newFinestLevel) const noexcept
Regrid a struct-of-arrays particle container to new grids.
Definition CD_AmrMeshImplem.H:327
void interpGhostPwl(MFAMRCellData &a_data, const std::string &a_realm) const
Interpolate ghost cells over a realm and phase. This uses piecewise linear interpolation (with limite...
Definition CD_AmrMesh.cpp:2060
int getBlockingFactor() const
Deprecated alias for getMinBlockSize().
Definition CD_AmrMesh.H:1682
void parseMaxBlockSize()
Parse the maximum permitted box size.
Definition CD_AmrMesh.cpp:2703
CellCentroidInterpolation::Type m_cellCentroidInterpolationType
Interpolation type for cell to cell centroid interpolation.
Definition CD_AmrMesh.H:2290
void parseEBCentroidInterpolation()
Parse EB interpolation (or extrapolation) stencils.
Definition CD_AmrMesh.cpp:3010
const Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrid(const std::string &a_realm) const
Get EBISLayouts for a Realm.
Definition CD_AmrMesh.cpp:3713
int m_multigridInterpWeight
Multigrid interpolation weights.
Definition CD_AmrMesh.H:2405
std::map< std::string, Vector< DisjointBoxLayout > > m_oldGrids
Old grids.
Definition CD_AmrMesh.H:2234
EBCentroidInterpolation::Type m_ebCentroidInterpolationType
Interpolation type for cell to EB centroid interpolation.
Definition CD_AmrMesh.H:2295
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getVofIterator(const std::string &a_realm, const phase::which_phase a_phase) const
Get VoF iterators covering all cut-cells (singly- and multiply-cut) for a Realm and phase.
Definition CD_AmrMesh.cpp:3433
const EBAMRCellData & getCoveredCells(const std::string &a_realm, const phase::which_phase a_phase) const
Get the covered-cell mask (value 1 in covered cells, 0 elsewhere) for a Realm and phase.
Definition CD_AmrMesh.cpp:3763
void preRegrid()
Run pre-regrid operations.
Definition CD_AmrMesh.cpp:1049
void average(MFAMRCellData &a_data, const std::string &a_realm, const Average &a_average) const
Average multifluid data over a specified realm.
Definition CD_AmrMesh.cpp:1585
Vector< RefCountedPtr< EBReflux > > & getFluxRegister(const std::string &a_realm, const phase::which_phase a_phase) const
Get flux register.
Definition CD_AmrMesh.cpp:3945
AmrMesh(const AmrMesh &a_other)=delete
Disallowed copy constructor.
void parseBrFillRatio()
Parse the Berger-Rigoutsos fill ratio.
Definition CD_AmrMesh.cpp:2635
Vector< ProblemDomain > m_domains
Problem domains.
Definition CD_AmrMesh.H:2466
void parseProbLoHiCorners()
Parse the low/high corners of the computational domain.
Definition CD_AmrMesh.cpp:1006
void parseGridGeneration()
Parse the grid generation algorithm.
Definition CD_AmrMesh.cpp:2764
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp(const std::string &a_realm, const phase::which_phase a_phase) const
Get interpolator.
Definition CD_AmrMesh.cpp:3928
void interpToNewGrids(MFAMRCellData &a_newData, const MFAMRCellData &a_oldData, const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel, const EBCoarseToFineInterp::Type a_type)
Interpolate data to new grids.
Definition CD_AmrMesh.cpp:2179
void parseMaxEbisBoxSize()
Parse the maximum permitted box size.
Definition CD_AmrMesh.cpp:2726
void alias(Vector< T * > &a_alias, const Vector< RefCountedPtr< T > > &a_data) const
Turn smart-pointer data structure into regular-pointer data structure.
Definition CD_AmrMeshImplem.H:213
Real m_mirrorMinDenominator
Mirror deposition: smallest Jacobian denominator that will be trusted.
Definition CD_AmrMesh.H:2446
bool m_hasGrids
Has grids or not.
Definition CD_AmrMesh.H:2451
void deallocate(Vector< T * > &a_data) const
Deallocate data.
Definition CD_AmrMeshImplem.H:165
int getMaxAmrDepth() const
Get maximum permitted amr depth.
Definition CD_AmrMesh.cpp:3182
void transferCoveredParticlesVoxels(ParticleContainer< P, Traits > &a_particlesFrom, ParticleContainer< P, Traits > &a_particlesTo, const phase::which_phase &a_phase) const
Transfer SoA particles that live in covered cells (voxel test) from one container to another.
Definition CD_AmrMeshImplem.H:825
void conservativeAverage(MFAMRCellData &a_data, const std::string &a_realm) const
Conservative coarsening of multifluid data.
Definition CD_AmrMesh.cpp:1647
int m_ebMinBlockSize
Smallest box the geometry grids are tiled with.
Definition CD_AmrMesh.H:2370
const Vector< int > & getRefinementRatios() const
Get refinement ratios.
Definition CD_AmrMesh.cpp:3355
void regridOperators(const int a_lmin)
Regrid AMR operators. This is done for all realms.
Definition CD_AmrMesh.cpp:1158
void interpGhost(EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
Interpolate ghost vectors over a realm, using the default ghost cell interpolation method.
Definition CD_AmrMesh.cpp:1976
int getRedistributionRadius() const
Get default redistribution radius.
Definition CD_AmrMesh.cpp:3248
BoxSorting getBoxSorting() const
Get box sorting method.
Definition CD_AmrMesh.cpp:4221
void removeCoveredParticlesDiscrete(ParticleContainer< P, Traits > &a_particles, const phase::which_phase &a_phase, const Real a_tolerance) const
Remove SoA particles inside the EB using discrete (EBISBox) information: covered cells,...
Definition CD_AmrMeshImplem.H:538
void parseEbBlockSizes()
Parse the tile and super-tile the geometry grids are built with.
Definition CD_AmrMesh.cpp:2846
void parseMirrorDeposition()
Parse the mirror-deposition band radius and fit/guard tolerances.
Definition CD_AmrMesh.cpp:2937
int m_maxEbisBoxSize
Maximum box size for EBIS generation.
Definition CD_AmrMesh.H:2355
int getNumberOfEbGhostCells() const
Get number of ghost cells used for EB grid generation.
Definition CD_AmrMesh.cpp:3237
void setBaseImplicitFunction(const phase::which_phase a_phase, const RefCountedPtr< BaseIF > &a_baseIF)
Set implicit function for a specific phase. Need e.g. for level-sets.
Definition CD_AmrMesh.cpp:941
int getFinestLevel() const
Get finest grid level.
Definition CD_AmrMesh.cpp:3171
int m_redistributionRadius
Redistribution radius.
Definition CD_AmrMesh.H:2410
const Vector< ProblemDomain > & getDomains() const
Get domains.
Definition CD_AmrMesh.cpp:3378
int m_numLsfGhostCells
Number of ghost cells to use when writing level-set to grid.
Definition CD_AmrMesh.H:2390
Type
Supported interpolation types.
Definition CD_CellCentroidInterpolation.H:44
Default class for holding LevelData<T> data across an EBAMR realm.
Definition CD_EBAMRData.H:41
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
Type
Type of interpolation methods supported. PWC = Piecewise constant, ignoring the embedded boundary....
Definition CD_EBCoarseToFineInterp.H:43
AMR-hierarchy container of computational particles, stored per patch in Struct-of-Arrays form.
Definition CD_ParticleContainer.H:123
Arena-backed Struct-of-Arrays particle container for a single grid patch.
Definition CD_ParticleSoA.H:655
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38