19#include <DisjointBoxLayout.H>
20#include <ProblemDomain.H>
37#include <CD_NamespaceHeader.H>
98 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
111 template <
typename T>
115 const Interval& a_dstComps,
116 const Interval& a_srcComps,
118 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
133 template <
typename T>
136 const LevelData<T>& a_src,
138 const std::string a_toRealm,
139 const std::string a_fromRealm,
141 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
158 template <
typename T>
161 const LevelData<T>& a_src,
163 const std::string a_toRealm,
164 const std::string a_fromRealm,
165 const Interval& a_dstComps,
166 const Interval& a_srcComps,
168 const CopyStrategy& a_fromRegion = CopyStrategy::Valid)
const noexcept;
174 template <
typename T>
182 template <
typename T>
184 deallocate(Vector<RefCountedPtr<T>>& a_data)
const;
190 template <
typename T>
200 template <
typename T>
202 alias(Vector<T*>& a_alias,
const Vector<RefCountedPtr<T>>& a_data)
const;
210 template <
typename T,
typename S>
221 template <
typename P,
typename Traits>
230 template <
typename T>
240 template <
typename T>
242 allocatePointer(Vector<RefCountedPtr<T>>& a_data,
const int a_finestLevel)
const;
250 template <
typename T>
261 template <
typename T>
273 slice(EBAMRCellData& a_original,
const Interval a_variables)
const noexcept;
283 slice(
const EBAMRCellData& a_original,
const Interval a_variables)
const noexcept;
317 registerMask(
const std::string& a_mask,
const int a_buffer,
const std::string& a_realm);
373 alias(EBAMRCellData& a_data,
375 const MFAMRCellData& a_mfdata,
376 const int a_finestLevel)
const;
386 alias(EBAMRFluxData& a_data,
388 const MFAMRFluxData& a_mfdata,
389 const int a_finestLevel)
const;
456 const EBAMRCellData& a_phi,
457 const std::string& a_realm,
471 const EBAMRCellData& a_phi,
472 const std::string& a_realm,
484 computeGradient(MFAMRCellData& a_gradient,
const MFAMRCellData& a_phi,
const std::string& a_realm)
const;
495 computeGradient(MFAMRFluxData& a_gradient,
const MFAMRCellData& a_phi,
const std::string& a_realm)
const;
508 const std::string& a_realm,
511 const int a_ghost = -1)
const;
524 allocate(LevelData<EBCellFAB>& a_data,
525 const std::string& a_realm,
529 const int a_ghost = -1)
const;
542 const std::string& a_realm,
545 const int a_ghost = -1)
const;
558 const std::string& a_realm,
561 const int a_ghost = -1)
const;
574 const std::string& a_realm,
577 const int a_ghost = -1)
const;
588 allocate(EBAMRBool& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
601 allocate(EBAMRFAB& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
612 allocate(MFAMRCellData& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
623 allocate(MFAMRFluxData& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = -1)
const;
634 allocate(MFAMRIVData& a_data,
const std::string& a_realm,
const int a_nComp,
const int a_ghost = 0)
const;
683 reallocate(EBAMRBool& a_data,
const int a_lmin)
const;
692 reallocate(MFAMRCellData& a_data,
const int a_lmin)
const;
701 reallocate(MFAMRFluxData& a_data,
const int a_lmin)
const;
710 reallocate(MFAMRIVData& a_data,
const int a_lmin)
const;
719 average(MFAMRCellData& a_data,
const std::string& a_realm,
const Average& a_average)
const;
735 harmonicAverage(MFAMRCellData& a_data,
const std::string& a_realm)
const;
752 average(MFAMRFluxData& a_data,
const std::string& a_realm,
const Average& a_average)
const;
772 harmonicAverage(MFAMRFluxData& a_data,
const std::string& a_realm)
const;
791 const std::string& a_realm,
793 const Average& a_average)
const;
805 const std::string& a_realm,
808 const Interval& a_variables)
const;
828 const std::string& a_realm,
830 const Interval& a_variables)
const;
850 const std::string& a_realm,
852 const Interval& a_variables)
const;
872 const std::string& a_realm,
874 const Interval& a_variables)
const;
885 const std::string& a_realm,
887 const Average& a_average)
const;
929 const std::string& a_realm,
931 const Average& a_average)
const;
970 template <
typename P,
typename Traits>
973 const std::string& a_realm,
989 template <
typename P,
typename Traits>
992 const std::string& a_realm,
997 const bool a_forceIrregNGP);
1015 template <
typename P,
typename Traits,
typename CellGather>
1018 const std::string& a_realm,
1023 const bool a_forceIrregNGP,
1024 CellGather a_cellGather);
1041 template <
auto... Members,
typename P,
typename Traits>
1044 const std::string& a_realm,
1049 const bool a_forceIrregNGP);
1062 template <
typename P,
typename Traits>
1065 const std::string& a_realm,
1067 const EBAMRCellData& a_meshScalarField,
1069 const bool a_forceIrregNGP)
const;
1085 template <
auto... Members,
typename P,
typename Traits>
1088 const std::string& a_realm,
1090 const EBAMRCellData& a_meshField,
1092 const bool a_forceIrregNGP)
const;
1102 template <
typename P,
typename Traits>
1106 const Real a_tolerance)
const;
1117 template <
typename P,
typename Traits>
1121 const Real a_tolerance)
const;
1130 template <
typename P,
typename Traits>
1146 template <
typename P,
typename Traits>
1151 const Real a_tolerance)
const;
1164 template <
typename P,
typename Traits>
1169 const Real a_tolerance)
const;
1179 template <
typename P,
typename Traits>
1195 template <
typename P,
typename Traits>
1220 template <
auto... OldPosition,
typename P,
typename Traits>
1227 const Real a_tolerance,
1228 const bool a_deleteParticles,
1248 template <
auto... OldPosition,
typename P,
typename Traits>
1255 const Real a_bisectionStep,
1256 const bool a_deleteParticles,
1278 const LevelData<EBCellFAB>& a_coarData,
1279 const int a_fineLevel,
1280 const std::string& a_realm,
1289 interpGhost(MFAMRCellData& a_data,
const std::string& a_realm)
const;
1297 interpGhostPwl(MFAMRCellData& a_data,
const std::string& a_realm)
const;
1316 interpGhostMG(MFAMRCellData& a_data,
const std::string& a_realm)
const;
1342 const MFAMRCellData& a_oldData,
1344 const int a_oldFinestLevel,
1345 const int a_newFinestLevel,
1362 const EBAMRCellData& a_oldData,
1365 const int a_oldFinestLevel,
1366 const int a_newFinestLevel,
1383 const EBAMRIVData& a_oldData,
1386 const int a_oldFinestLevel,
1387 const int a_newFinestLevel,
1399 template <
typename P,
typename Traits>
1403 const int a_newFinestLevel)
const noexcept;
1425 const std::string& a_realm,
1427 const int a_level)
const noexcept;
1440 const EBCellFAB& a_cellData,
1441 const std::string& a_realm,
1444 const DataIndex& a_din)
const noexcept;
1457 const EBAMRCellData& a_cellData,
1458 const std::string& a_realm,
1471 const LevelData<EBCellFAB>& a_cellData,
1472 const std::string& a_realm,
1474 const int a_level)
const noexcept;
1485 const EBAMRCellData& a_cellData,
1486 const std::string& a_realm,
1498 interpToEB(LevelData<BaseIVFAB<Real>>& a_centroidData,
1499 const LevelData<EBCellFAB>& a_cellData,
1500 const std::string& a_realm,
1502 const int a_level)
const noexcept;
1515 const EBCellFAB& a_cellData,
1516 const std::string& a_realm,
1519 const DataIndex& a_din)
const noexcept;
1532 const EBAMRCellData& a_kappaDivF,
1533 const std::string& a_realm,
1548 const LevelData<EBCellFAB>& a_kappaDivF,
1550 const std::string& a_realm,
1581 regridAmr(
const Vector<IntVectSet>& a_tags,
const int a_lmin,
const int a_hardcap = -1);
1592 const Vector<Vector<int>>& a_procs,
1593 const Vector<Vector<Box>>& a_boxes,
1609 setGrids(
const Vector<Vector<Box>>& a_boxes,
const std::map<std::string, Vector<Vector<long int>>>& a_realmsAndLoads);
1781 const RefCountedPtr<BaseIF>&
1789 const Vector<DisjointBoxLayout>&
1797 const Vector<DisjointBoxLayout>&
1798 getGrids(
const std::string& a_realm)
const;
1804 const Vector<ProblemDomain>&
1815 getMask(
const std::string& a_mask,
const int a_buffer,
const std::string& a_realm)
const;
1830 const Vector<RefCountedPtr<LevelTiles>>&
1899 const Vector<RefCountedPtr<EBLevelGrid>>&
1908 const Vector<RefCountedPtr<EBLevelGrid>>&
1917 const Vector<EBISLayout>&
1925 const Vector<RefCountedPtr<MFLevelGrid>>&
1936 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
1948 Vector<RefCountedPtr<LayoutData<VoFIterator>>>&
1959 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
1970 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
1984 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
1997 Vector<RefCountedPtr<LayoutData<std::array<FaceIterator, SpaceDim>>>>&
2015 const EBAMRCellData&
2024 const EBAMRCellData&
2033 const EBAMRCellData&
2042 const EBAMRCellData&
2069 Vector<RefCountedPtr<EBCoarAve>>&
2078 Vector<RefCountedPtr<EBMultigridInterpolator>>&
2087 Vector<RefCountedPtr<EBCoarseToFineInterp>>&
2096 Vector<RefCountedPtr<EBReflux>>&
2105 Vector<RefCountedPtr<EBFluxRedistribution>>&
2113 const RefCountedPtr<PetscGrid>&
2114 getPetscGrid(
const std::string& a_realm)
const noexcept;
2121 std::vector<std::string>
2136 RefCountedPtr<EBIndexSpace>&
2155 mutable std::map<std::string, RefCountedPtr<Realm>>
m_realms;
2160 std::map<phase::which_phase, RefCountedPtr<BaseIF>>
m_baseif;
2378 buildGrids(
const Vector<IntVectSet>& a_tags,
const int a_lmin,
const int a_hardcap = -1);
2508 const LevelData<EBCellFAB>& a_phi,
2509 const std::string& a_realm,
2511 const int a_lvl)
const;
2514#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 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:45
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:3521
int m_refRatio
Refinement ratio.
Definition CD_AmrMesh.H:2251
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:3338
void parseRuntimeOptions()
Parse runtime options.
Definition CD_AmrMesh.cpp:986
std::map< std::string, Vector< Copier > > m_oldToNewCellCopiers
Storage for copiers from the old grids to the new ones.
Definition CD_AmrMesh.H:2171
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:3902
void allocatePointer(Vector< RefCountedPtr< T > > &a_data) const
Allocate pointer but not any memory blocks.
Definition CD_AmrMeshImplem.H:265
EBAMRSurfaceDeposition & getSurfaceDeposition(const std::string &a_realm, const phase::which_phase a_phase) const
Get EBAMRSurfaceDeposition surface deposition operator.
Definition CD_AmrMesh.cpp:3702
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:3407
std::vector< std::string > getRealms() const
Get the name of all Realms.
Definition CD_AmrMesh.cpp:4022
RealVect getProbHi() const
Get upper-right corner of computational domain.
Definition CD_AmrMesh.cpp:3053
void parseBrBufferSize()
Parse buffer size for Berger-Rigoutsous grid algorithm.
Definition CD_AmrMesh.cpp:2695
Real getFinestDx() const
Get resolution on the finest grid level.
Definition CD_AmrMesh.cpp:3204
int getMaxBlockSize() const
Get maximum permitted block size.
Definition CD_AmrMesh.cpp:3141
void registerRealm(const std::string &a_realm)
Register a new realm.
Definition CD_AmrMesh.cpp:3889
const RefCountedPtr< BaseIF > & getBaseImplicitFunction(const phase::which_phase a_phase) const
Get implicit function for a specific phase.
Definition CD_AmrMesh.cpp:3237
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:666
Real m_fillRatioBR
Fill ratio.
Definition CD_AmrMesh.H:2236
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:238
ProblemDomain getFinestDomain() const
Get finest domain.
Definition CD_AmrMesh.cpp:3193
void parseCellCentroidInterpolation()
Parse centroid interpolation stencils.
Definition CD_AmrMesh.cpp:2860
Vector< RefCountedPtr< EBCoarAve > > & getCoarseAverage(const std::string &a_realm, const phase::which_phase a_phase) const
Get the coarsening utility.
Definition CD_AmrMesh.cpp:3719
const Vector< RefCountedPtr< LevelTiles > > & getLevelTiles(const std::string &a_realm) const
Get the tiled space representation.
Definition CD_AmrMesh.cpp:3439
int m_oldFinestLevel
Finest level before a regrid.
Definition CD_AmrMesh.H:2266
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:3260
void interpGhostMG(MFAMRCellData &a_data, const std::string &a_realm) const
Interpolate ghost cells over a realm and phase.
Definition CD_AmrMesh.cpp:2065
IntVect m_numCells
Coarsest box where we compute.
Definition CD_AmrMesh.H:2231
void postRegrid()
Run post-regrid operations.
Definition CD_AmrMesh.cpp:1079
void parseMaxAmrDepth()
Parse the maximum permitted AMR depth.
Definition CD_AmrMesh.cpp:2525
RealVect m_probHi
Domain simulation corner.
Definition CD_AmrMesh.H:2246
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:3455
const AMRMask & getValidCells(const std::string &a_realm) const
Get a map of all valid cells on a specified realm.
Definition CD_AmrMesh.cpp:3423
Vector< DisjointBoxLayout > m_grids
Grids.
Definition CD_AmrMesh.H:2346
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
MultiFluidIndexSpace.
Definition CD_AmrMesh.H:2216
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:434
RealVect m_probLo
Domain simulation corner.
Definition CD_AmrMesh.H:2241
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:3822
int m_bufferSizeBR
Set buffer size.
Definition CD_AmrMesh.H:2291
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:1041
void setCoarsestGrid(const IntVect &a_nCells)
Set the coarsest grid cells.
Definition CD_AmrMesh.cpp:2484
void parseMaxSimulationDepth()
Set maximum simulation depth.
Definition CD_AmrMesh.cpp:2544
int getMaxSimulationDepth() const
Get maximum permitted simulation depth.
Definition CD_AmrMesh.cpp:3086
int m_maxSimulationDepth
Maximum allowed depth for simulation.
Definition CD_AmrMesh.H:2276
void setFinestLevel(const int a_finestLevel)
Set the finest level.
Definition CD_AmrMesh.cpp:2601
virtual ~AmrMesh()
Destructor.
const Vector< DisjointBoxLayout > & getGrids(const std::string &a_realm) const
Get the grids.
Definition CD_AmrMesh.cpp:3271
int m_multigridInterpRadius
Multigrid interpolation radius.
Definition CD_AmrMesh.H:2321
void buildDomains()
Build domains.
Definition CD_AmrMesh.cpp:1022
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:3471
GridGenerationMethod m_gridGenerationMethod
Grid generation method.
Definition CD_AmrMesh.H:2206
int getMinBlockSize() const
Get the minimum block size (i.e. the smallest possible box / tile size).
Definition CD_AmrMesh.cpp:3130
void parseRefinementRatios()
Parse refinement ratios.
Definition CD_AmrMesh.cpp:2563
Vector< int > m_refinementRatios
AMR resolutions.
Definition CD_AmrMesh.H:2356
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:3355
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:3651
int m_verbosity
Verbosity.
Definition CD_AmrMesh.H:2256
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 bool a_forceIrregNGP, CellGather a_cellGather)
Deposit a custom per-particle scalar (a_cellGather) of an SoA container on the mesh.
Definition CD_AmrMeshImplem.H:388
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:3321
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:2306
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:3668
bool m_hasRegridCopiers
Has regrid copiers or not.
Definition CD_AmrMesh.H:2341
int m_minBlockSize
Blocking factor.
Definition CD_AmrMesh.H:2296
int m_multigridInterpOrder
Multigrid interpolation order.
Definition CD_AmrMesh.H:2316
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:3487
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:2183
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:2195
void parseNumGhostCells()
Parse the number of ghost cells.
Definition CD_AmrMesh.cpp:2796
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 bool a_forceIrregNGP)
Deposit the SoA container's weight column on the mesh (all coarse-fine strategies).
Definition CD_AmrMeshImplem.H:368
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:3504
void sanityCheck() const
Do a sanity check to make sure everything is set up correctly.
Definition CD_AmrMesh.cpp:2946
int m_numGhostCells
Number of ghost cells.
Definition CD_AmrMesh.H:2306
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp(const std::string &a_realm, const phase::which_phase a_phase) const
Get the redistribution operators.
Definition CD_AmrMesh.cpp:3787
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:1169
void parseVerbosity()
Parse the verbosity for AmrMesh.
Definition CD_AmrMesh.cpp:2495
int m_maxBlockSize
Max box size.
Definition CD_AmrMesh.H:2281
GridGenerationMethod
Enum for having understandable notation for grid generation.
Definition CD_AmrMesh.H:2147
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:2201
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:731
void harmonicAverage(MFAMRCellData &a_data, const std::string &a_realm) const
Harmonic coarsening of multifluid data.
Definition CD_AmrMesh.cpp:1570
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:611
bool getEbCf() const
Check if mesh has an EBCF.
Definition CD_AmrMesh.cpp:3878
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:3534
void parseMinBlockSize()
Parse the B-R blocking factor. For tiled mesh refinement this parses the tile size.
Definition CD_AmrMesh.cpp:2756
Vector< Real > m_dx
Level resolutions.
Definition CD_AmrMesh.H:2361
int m_numEbGhostsCells
Number of ghost cells to use for eb stuff.
Definition CD_AmrMesh.H:2301
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:1207
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:1314
RealVect getProbLo() const
Get lower-left corner of computational domain.
Definition CD_AmrMesh.cpp:3042
BoxSorting m_boxSort
Box sorting.
Definition CD_AmrMesh.H:2211
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:2271
void defineRealms()
Define Realms.
Definition CD_AmrMesh.cpp:3935
int m_finestLevel
Finest level.
Definition CD_AmrMesh.H:2261
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:3567
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:472
void reallocate(EBAMRCellData &a_data, const phase::which_phase a_phase, const int a_lmin) const
Reallocate data.
Definition CD_AmrMesh.cpp:614
std::map< std::string, Vector< Copier > > m_oldToNewEBCopiers
Storage for copiers from the old grids to the new ones.
Definition CD_AmrMesh.H:2177
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:3550
std::map< phase::which_phase, RefCountedPtr< BaseIF > > m_baseif
Implicit functions.
Definition CD_AmrMesh.H:2160
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:3965
int getNumberOfGhostCells() const
Get the default number of ghost cells.
Definition CD_AmrMesh.cpp:3097
bool queryRealm(const std::string &a_realm) const
Query if a realm exists.
Definition CD_AmrMesh.cpp:3861
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:3601
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:1117
AmrMesh & operator=(const AmrMesh &&a_other)=delete
Disallowed move assignment.
void parseCoarsestLevelNumCells()
Parse the coarsest domain grid.
Definition CD_AmrMesh.cpp:2508
RefCountedPtr< EBIndexSpace > & getEBIndexSpace(const phase::which_phase a_phase)
Get EBIndexSpace corresponding to a particular phase.
Definition CD_AmrMesh.H:2137
void arithmeticAverage(MFAMRCellData &a_data, const std::string &a_realm) const
Arithmetic coarsening of multifluid data.
Definition CD_AmrMesh.cpp:1559
void parseRedistributionRadius()
Parse the default redistribution radius.
Definition CD_AmrMesh.cpp:2843
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:878
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:2614
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:3372
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:2189
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:1379
const Vector< Real > & getDx() const
Get spatial resolutions.
Definition CD_AmrMesh.cpp:3215
int getBrBuffer() const
Return buffer for B-R mesh refinement algorithm.
Definition CD_AmrMesh.cpp:3152
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:3390
EBAMRParticleMesh & getParticleMesh(const std::string &a_realm, const phase::which_phase a_phase) const
Get EBAMRParticleMesh operator.
Definition CD_AmrMesh.cpp:3685
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:3287
int getMaxBoxSize() const
Deprecated alias for getMaxBlockSize().
Definition CD_AmrMesh.H:1684
std::map< std::string, RefCountedPtr< Realm > > m_realms
These are all the Realms.
Definition CD_AmrMesh.H:2155
int getMaxEbisBoxSize() const
Get maximum box size for EBIS generation.
Definition CD_AmrMesh.cpp:3163
AmrMesh()
Default constructor.
Definition CD_AmrMesh.cpp:32
void parseEbGhostCells()
Parse number of ghost cells for eb stuff.
Definition CD_AmrMesh.cpp:2779
void parseMultigridInterpolator()
Parse settings for the multigrid interpolator.
Definition CD_AmrMesh.cpp:2818
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:453
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:3174
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:3919
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:3617
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:348
Vector< RefCountedPtr< EBMultigridInterpolator > > & getMultigridInterpolator(const std::string &a_realm, const phase::which_phase a_phase) const
Get multigrid interpolation utility.
Definition CD_AmrMesh.cpp:3736
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:2415
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:324
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:2000
int getBlockingFactor() const
Deprecated alias for getMinBlockSize().
Definition CD_AmrMesh.H:1666
void parseMaxBlockSize()
Parse the maximum permitted box size.
Definition CD_AmrMesh.cpp:2653
CellCentroidInterpolation::Type m_cellCentroidInterpolationType
Interpolation type for cell to cell centroid interpolation.
Definition CD_AmrMesh.H:2221
void parseEBCentroidInterpolation()
Parse EB interpolation (or extrapolation) stencils.
Definition CD_AmrMesh.cpp:2903
const Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrid(const std::string &a_realm) const
Get EBISLayouts for a Realm.
Definition CD_AmrMesh.cpp:3584
int m_multigridInterpWeight
Multigrid interpolation weights.
Definition CD_AmrMesh.H:2326
std::map< std::string, Vector< DisjointBoxLayout > > m_oldGrids
Old grids.
Definition CD_AmrMesh.H:2165
EBCentroidInterpolation::Type m_ebCentroidInterpolationType
Interpolation type for cell to EB centroid interpolation.
Definition CD_AmrMesh.H:2226
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:3304
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:3634
void preRegrid()
Run pre-regrid operations.
Definition CD_AmrMesh.cpp:1047
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:1519
Vector< RefCountedPtr< EBReflux > > & getFluxRegister(const std::string &a_realm, const phase::which_phase a_phase) const
Get flux register.
Definition CD_AmrMesh.cpp:3770
AmrMesh(const AmrMesh &a_other)=delete
Disallowed copy constructor.
void parseBrFillRatio()
Parse the Berger-Rigoutsos fill ratio.
Definition CD_AmrMesh.cpp:2585
Vector< ProblemDomain > m_domains
Problem domains.
Definition CD_AmrMesh.H:2351
void parseProbLoHiCorners()
Parse the low/high corners of the computational domain.
Definition CD_AmrMesh.cpp:1004
void parseGridGeneration()
Parse the grid generation algorithm.
Definition CD_AmrMesh.cpp:2714
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp(const std::string &a_realm, const phase::which_phase a_phase) const
Get interpolator.
Definition CD_AmrMesh.cpp:3753
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:2129
void parseMaxEbisBoxSize()
Parse the maximum permitted box size.
Definition CD_AmrMesh.cpp:2676
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:210
bool m_hasGrids
Has grids or not.
Definition CD_AmrMesh.H:2336
void deallocate(Vector< T * > &a_data) const
Deallocate data.
Definition CD_AmrMeshImplem.H:162
int getMaxAmrDepth() const
Get maximum permitted amr depth.
Definition CD_AmrMesh.cpp:3075
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:818
void conservativeAverage(MFAMRCellData &a_data, const std::string &a_realm) const
Conservative coarsening of multifluid data.
Definition CD_AmrMesh.cpp:1581
const Vector< int > & getRefinementRatios() const
Get refinement ratios.
Definition CD_AmrMesh.cpp:3226
void regridOperators(const int a_lmin)
Regrid AMR operators. This is done for all realms.
Definition CD_AmrMesh.cpp:1138
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:1910
int getRedistributionRadius() const
Get default redistribution radius.
Definition CD_AmrMesh.cpp:3119
BoxSorting getBoxSorting() const
Get box sorting method.
Definition CD_AmrMesh.cpp:4040
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:531
int m_maxEbisBoxSize
Maximum box size for EBIS generation.
Definition CD_AmrMesh.H:2286
int getNumberOfEbGhostCells() const
Get number of ghost cells used for EB grid generation.
Definition CD_AmrMesh.cpp:3108
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:3064
int m_redistributionRadius
Redistribution radius.
Definition CD_AmrMesh.H:2331
const Vector< ProblemDomain > & getDomains() const
Get domains.
Definition CD_AmrMesh.cpp:3249
int m_numLsfGhostCells
Number of ghost cells to use when writing level-set to grid.
Definition CD_AmrMesh.H:2311
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: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
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