chombo-discharge
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
AmrMesh Class Reference

Class for handling spatial operations. More...

#include <CD_AmrMesh.H>

Public Member Functions

 AmrMesh ()
 Default constructor.
 
 AmrMesh (const AmrMesh &a_other)=delete
 Disallowed copy constructor.
 
 AmrMesh (const AmrMesh &&a_other)=delete
 Disallowed move constructor.
 
virtual ~AmrMesh ()
 Destructor.
 
AmrMeshoperator= (const AmrMesh &a_other)=delete
 Disallowed copy assignment.
 
AmrMeshoperator= (const AmrMesh &&a_other)=delete
 Disallowed move assignment.
 
template<typename T >
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 about from/to regions.
 
template<typename T >
void copyData (EBAMRData< T > &a_dst, const EBAMRData< T > &a_src, const Interval &a_dstComps, const Interval &a_srcComps, 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.
 
template<typename T >
void copyData (LevelData< T > &a_dst, const LevelData< T > &a_src, const int a_level, const std::string a_toRealm, const std::string a_fromRealm, 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 about from/to regions.
 
template<typename T >
void copyData (LevelData< T > &a_dst, const LevelData< T > &a_src, const int a_level, const std::string a_toRealm, const std::string a_fromRealm, const Interval &a_dstComps, const Interval &a_srcComps, 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 about from/to regions.
 
template<typename T >
void deallocate (Vector< T * > &a_data) const
 Deallocate data.
 
template<typename T >
void deallocate (Vector< RefCountedPtr< T > > &a_data) const
 Deallocate smart pointer data.
 
template<typename T >
void deallocate (EBAMRData< T > &a_data) const
 Deallocate data.
 
template<typename T >
void alias (Vector< T * > &a_alias, const Vector< RefCountedPtr< T > > &a_data) const
 Turn smart-pointer data structure into regular-pointer data structure.
 
template<typename T , typename S >
void alias (Vector< T * > &a_alias, const EBAMRData< S > &a_data) const
 Turn smart-pointer data structure into regular-pointer data structure.
 
template<typename P , typename Traits >
void allocate (ParticleContainer< P, Traits > &a_container, const std::string &a_realm) const
 Allocate a struct-of-arrays particle container on the given realm.
 
template<typename T >
void allocatePointer (Vector< RefCountedPtr< T > > &a_data) const
 Allocate pointer but not any memory blocks.
 
template<typename T >
void allocatePointer (Vector< RefCountedPtr< T > > &a_data, const int a_finestLevel) const
 Allocate pointer but not any memory blocks.
 
template<typename T >
void allocatePointer (EBAMRData< T > &a_data, const std::string &a_realm) const
 Allocate pointer but not any memory blocks.
 
template<typename T >
void allocatePointer (EBAMRData< T > &a_data, const std::string &a_realm, const int a_finestLevel) const
 Allocate pointer but not any memory.
 
EBAMRCellData slice (EBAMRCellData &a_original, const Interval a_variables) const noexcept
 Slice cell-centered data in order to fetch a subset of components.
 
EBAMRCellData slice (const EBAMRCellData &a_original, const Interval a_variables) const noexcept
 Slice cell-centered data in order to fetch a subset of components.
 
void parseOptions ()
 Parse options. Called during the constructor.
 
void parseRuntimeOptions ()
 Parse runtime options.
 
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.
 
void registerMask (const std::string &a_mask, const int a_buffer, const std::string &a_realm)
 Register a boolean mask over a realm.
 
void buildDomains ()
 Build domains.
 
void setFinestLevel (const int a_finestLevel)
 Set the finest level.
 
void setCoarsestGrid (const IntVect &a_nCells)
 Set the coarsest grid cells.
 
bool queryRealm (const std::string &a_realm) const
 Query if a realm exists.
 
bool getEbCf () const
 Check if mesh has an EBCF.
 
void registerRealm (const std::string &a_realm)
 Register a new realm.
 
void alias (EBAMRCellData &a_data, const phase::which_phase a_phase, const MFAMRCellData &a_mfdata, const int a_finestLevel) const
 Alias multifluid data up to a specified level.
 
void alias (EBAMRFluxData &a_data, const phase::which_phase a_phase, const MFAMRFluxData &a_mfdata, const int a_finestLevel) const
 Alias multifluid data up to a specified level.
 
void alias (EBAMRCellData &a_data, const phase::which_phase a_phase, const MFAMRCellData &a_mfdata) const
 Alias an entire hierarchy of multifluid data.
 
void alias (EBAMRFluxData &a_data, const phase::which_phase a_phase, const MFAMRFluxData &a_mfdata) const
 Alias an entire hierarchy of multifluid data.
 
void alias (EBAMRIVData &a_data, const phase::which_phase a_phase, const MFAMRIVData &a_mfdata) const
 Alias an entire hierarchy of multifluid data.
 
EBAMRCellData alias (const phase::which_phase a_phase, const MFAMRCellData &a_mfdata) const
 Alias an entire hierarchy of multifluid data.
 
EBAMRFluxData alias (const phase::which_phase a_phase, const MFAMRFluxData &a_mfdata) const
 Alias an entire hierarchy of multifluid data.
 
EBAMRIVData alias (const phase::which_phase a_phase, const MFAMRIVData &a_mfdata) const
 Alias an entire hierarchy of multifluid data.
 
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.
 
void computeGradient (EBAMRFluxData &a_gradient, const EBAMRCellData &a_phi, const std::string &a_realm, const phase::which_phase a_phase) const
 Compute face-centered gradient over an AMR hierarchy.
 
void computeGradient (MFAMRCellData &a_gradient, const MFAMRCellData &a_phi, const std::string &a_realm) const
 Compute cell-centered gradient over an AMR hierarchy.
 
void computeGradient (MFAMRFluxData &a_gradient, const MFAMRCellData &a_phi, const std::string &a_realm) const
 Compute face-centered gradient over an AMR hierarchy.
 
void allocate (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_ghost=-1) const
 Allocate a data holder over a specific realm.
 
void allocate (LevelData< EBCellFAB > &a_data, const std::string &a_realm, const phase::which_phase a_phase, const int a_level, const int a_nComp, const int a_ghost=-1) const
 Allocate data on specific level.
 
void allocate (EBAMRFluxData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_ghost=-1) const
 Allocate a data holder over a specific realm.
 
void allocate (EBAMRIVData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_ghost=-1) const
 Allocate a data holder over a specific realm.
 
void allocate (EBAMRIFData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_ghost=-1) const
 Allocate a data holder over a specific realm.
 
void allocate (EBAMRBool &a_data, const std::string &a_realm, const int a_nComp, const int a_ghost=-1) const
 Allocate Boolean data over a specific realm.
 
void allocate (EBAMRFAB &a_data, const std::string &a_realm, const int a_nComp, const int a_ghost=-1) const
 Allocate regular (non-EB) cell data over a specific realm.
 
void allocate (MFAMRCellData &a_data, const std::string &a_realm, const int a_nComp, const int a_ghost=-1) const
 Allocate a data holder over a specific realm.
 
void allocate (MFAMRFluxData &a_data, const std::string &a_realm, const int a_nComp, const int a_ghost=-1) const
 Allocate a data holder over a specific realm.
 
void allocate (MFAMRIVData &a_data, const std::string &a_realm, const int a_nComp, const int a_ghost=0) const
 Allocate a data holder over a specific realm.
 
void reallocate (EBAMRCellData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data.
 
void reallocate (EBAMRFluxData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data.
 
void reallocate (EBAMRIVData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data.
 
void reallocate (EBAMRIFData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data.
 
void reallocate (EBAMRBool &a_data, const int a_lmin) const
 Reallocate data.
 
void reallocate (MFAMRCellData &a_data, const int a_lmin) const
 Reallocate data.
 
void reallocate (MFAMRFluxData &a_data, const int a_lmin) const
 Reallocate data.
 
void reallocate (MFAMRIVData &a_data, const int a_lmin) const
 Reallocate data.
 
void average (MFAMRCellData &a_data, const std::string &a_realm, const Average &a_average) const
 Average multifluid data over a specified realm.
 
void arithmeticAverage (MFAMRCellData &a_data, const std::string &a_realm) const
 Arithmetic coarsening of multifluid data.
 
void harmonicAverage (MFAMRCellData &a_data, const std::string &a_realm) const
 Harmonic coarsening of multifluid data.
 
void conservativeAverage (MFAMRCellData &a_data, const std::string &a_realm) const
 Conservative coarsening of multifluid data.
 
void average (MFAMRFluxData &a_data, const std::string &a_realm, const Average &a_average) const
 Average multifluid data over a specified realm.
 
void arithmeticAverage (MFAMRFluxData &a_data, const std::string &a_realm) const
 Average multifluid data over a realm.
 
void harmonicAverage (MFAMRFluxData &a_data, const std::string &a_realm) const
 Average multifluid data over a realm.
 
void conservativeAverage (MFAMRFluxData &a_data, const std::string &a_realm) const
 Average down multifluid data over a realm.
 
void average (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const Average &a_average) const
 Average down on specific realm and phase.
 
void average (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const Average &a_average, const Interval &a_variables) const
 Average down on specific realm and phase.
 
void arithmeticAverage (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Arithmetic average of data. Does all components.
 
void arithmeticAverage (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const Interval &a_variables) const
 Arithmetic average of data.
 
void harmonicAverage (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Harmonic average of data. Does all components.
 
void harmonicAverage (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const Interval &a_variables) const
 Harmonic average of data. Does all components.
 
void conservativeAverage (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Conseratively average data. Does all components.
 
void conservativeAverage (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const Interval &a_variables) const
 Conseratively average data. Does all components.
 
void average (EBAMRFluxData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const Average &a_average) const
 Average down on specific realm and phase.
 
void arithmeticAverage (EBAMRFluxData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Average down on specific realm and phase.
 
void harmonicAverage (EBAMRFluxData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Average down on specific realm and phase.
 
void conservativeAverage (EBAMRFluxData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Average down on specific realm and phase.
 
void average (EBAMRIVData &a_data, const std::string &a_realm, const phase::which_phase a_phase, const Average &a_average) const
 Average down on specific realm and phase.
 
void arithmeticAverage (EBAMRIVData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Arithmetic average on specific realm and phase.
 
void harmonicAverage (EBAMRIVData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Harmonic average on specific realm and phase.
 
void conservativeAverage (EBAMRIVData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Conservative averaging on specific realm and phase.
 
template<typename P , typename Traits >
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).
 
template<typename P , typename Traits >
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).
 
template<typename P , typename Traits , typename CellGather >
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.
 
template<auto... Members, typename P , typename Traits >
void depositParticles (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 one or more SoA payload columns on the mesh (all coarse-fine strategies).
 
template<typename P , typename Traits >
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.
 
template<auto... Members, typename P , typename Traits >
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.
 
template<typename P , typename Traits >
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.
 
template<typename P , typename Traits >
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, or irregular cells on the wrong side of every VoF's EB face (to within a_tolerance*dx).
 
template<typename P , typename Traits >
void removeCoveredParticlesVoxels (ParticleContainer< P, Traits > &a_particles, const phase::which_phase &a_phase) const
 Remove SoA particles that live in covered cells (voxel test).
 
template<typename P , typename Traits >
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_tolerance*dx.
 
template<typename P , typename Traits >
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 another.
 
template<typename P , typename Traits >
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.
 
template<typename P , typename Traits >
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.
 
template<auto... OldPosition, typename P , typename Traits >
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.
 
template<auto... OldPosition, typename P , typename Traits >
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.
 
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.
 
void interpGhost (LevelData< EBCellFAB > &a_fineData, const LevelData< EBCellFAB > &a_coarData, const int a_fineLevel, const std::string &a_realm, const phase::which_phase a_phase) const
 Interpolate ghost cells over a realm, using the default ghost cell interpolation method on a specific level.
 
void interpGhost (MFAMRCellData &a_data, const std::string &a_realm) const
 Interpolate ghost cells over a realm. Calls the default ghost cell interpolation method.
 
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 limiters)
 
void interpGhostPwl (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Interpolate ghost cells over a realm and phase. This uses piecewise linear interpolation (with limiters)
 
void interpGhostMG (MFAMRCellData &a_data, const std::string &a_realm) const
 Interpolate ghost cells over a realm and phase.
 
void interpGhostMG (EBAMRCellData &a_data, const std::string &a_realm, const phase::which_phase a_phase) const
 Interpolate ghost cells over a realm and phase.
 
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.
 
void interpToNewGrids (EBAMRCellData &a_newData, const EBAMRCellData &a_oldData, const phase::which_phase a_phase, const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel, const EBCoarseToFineInterp::Type a_type)
 Interpolate data to new grids.
 
void interpToNewGrids (EBAMRIVData &a_newData, const EBAMRIVData &a_oldData, const phase::which_phase a_phase, const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel, const EBCoarseToFineInterp::Type a_type)
 Interpolate data to new grids.
 
template<typename P , typename Traits >
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.
 
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.
 
void interpToCentroids (LevelData< EBCellFAB > &a_data, const std::string &a_realm, const phase::which_phase a_phase, const int a_level) const noexcept
 Interpolate data to centroids.
 
void interpToCentroids (EBCellFAB &a_centroidData, const EBCellFAB &a_cellData, const std::string &a_realm, const phase::which_phase a_phase, const int a_level, const DataIndex &a_din) const noexcept
 Interpolate data to centroids.
 
void interpToCentroids (EBAMRIVData &a_centroidData, const EBAMRCellData &a_cellData, const std::string &a_realm, const phase::which_phase a_phase) const noexcept
 Interpolate data to centroids on realm and phase.
 
void interpToCentroids (LevelData< BaseIVFAB< Real > > &a_centroidData, const LevelData< EBCellFAB > &a_cellData, const std::string &a_realm, const phase::which_phase a_phase, const int a_level) const noexcept
 Interpolate data to centroids.
 
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.
 
void interpToEB (LevelData< BaseIVFAB< Real > > &a_centroidData, const LevelData< EBCellFAB > &a_cellData, const std::string &a_realm, const phase::which_phase a_phase, const int a_level) const noexcept
 Interpolate data to EB centroids.
 
void interpToEB (BaseIVFAB< Real > &a_centroidData, const EBCellFAB &a_cellData, const std::string &a_realm, const phase::which_phase a_phase, const int a_level, const DataIndex &a_din) const noexcept
 Interpolate data to EB centroids.
 
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.
 
void nonConservativeDivergence (LevelData< BaseIVFAB< Real > > &a_nonConsDivF, const LevelData< EBCellFAB > &a_kappaDivF, const int &a_level, const std::string &a_realm, const phase::which_phase &a_phase) const noexcept
 Compute a non-conservative divergence.
 
void setMultifluidIndexSpace (const RefCountedPtr< MultiFluidIndexSpace > &a_multiFluidIndexSpace)
 Sets multifluid index space.
 
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.
 
void preRegrid ()
 Run pre-regrid operations.
 
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.
 
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.
 
void postRegrid ()
 Run post-regrid operations.
 
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.
 
void regridOperators (const int a_lmin)
 Regrid AMR operators. This is done for all realms.
 
void regridOperators (const std::string &a_realm, const int a_lmin)
 Regrid AMR operators. This is done for a specific realm.
 
void sanityCheck () const
 Do a sanity check to make sure everything is set up correctly.
 
int getFinestLevel () const
 Get finest grid level.
 
int getMaxAmrDepth () const
 Get maximum permitted amr depth.
 
int getMaxSimulationDepth () const
 Get maximum permitted simulation depth.
 
int getMinBlockSize () const
 Get the minimum block size (i.e. the smallest possible box / tile size).
 
int getBlockingFactor () const
 Deprecated alias for getMinBlockSize().
 
int getMaxBlockSize () const
 Get maximum permitted block size.
 
int getMaxBoxSize () const
 Deprecated alias for getMaxBlockSize().
 
int getBrBuffer () const
 Return buffer for B-R mesh refinement algorithm.
 
int getMaxEbisBoxSize () const
 Get maximum box size for EBIS generation.
 
int getNumberOfGhostCells () const
 Get the default number of ghost cells.
 
int getNumberOfEbGhostCells () const
 Get number of ghost cells used for EB grid generation.
 
int getRedistributionRadius () const
 Get default redistribution radius.
 
Real getFinestDx () const
 Get resolution on the finest grid level.
 
RealVect getProbLo () const
 Get lower-left corner of computational domain.
 
RealVect getProbHi () const
 Get upper-right corner of computational domain.
 
ProblemDomain getFinestDomain () const
 Get finest domain.
 
const Vector< Real > & getDx () const
 Get spatial resolutions.
 
const Vector< int > & getRefinementRatios () const
 Get refinement ratios.
 
int getRefinementRatio (const int a_level1, const int a_level2) const
 Get refinement factor between two levels.
 
const RefCountedPtr< BaseIF > & getBaseImplicitFunction (const phase::which_phase a_phase) const
 Get implicit function for a specific phase.
 
const Vector< DisjointBoxLayout > & getProxyGrids () const
 Get the "proxy" grids in AmrMesh.
 
const Vector< DisjointBoxLayout > & getGrids (const std::string &a_realm) const
 Get the grids.
 
const Vector< ProblemDomain > & getDomains () const
 Get domains.
 
const AMRMaskgetMask (const std::string &a_mask, const int a_buffer, const std::string &a_realm) const
 Get a registered mask.
 
const AMRMaskgetValidCells (const std::string &a_realm) const
 Get a map of all valid cells on a specified realm.
 
const Vector< RefCountedPtr< LevelTiles > > & getLevelTiles (const std::string &a_realm) const
 Get the tiled space representation.
 
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.
 
const AMRParticleGhostMaskgetParticleGhostMask (const std::string &a_realm, const int a_width) const
 Get the same-level particle ghost mask on a realm for a registered width.
 
const AMRParticleGhostMaskgetParticleGhostMaskFineToCoar (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.
 
const AMRParticleGhostMaskgetParticleGhostMaskCoarToFine (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.
 
const AMRParticleGhostMaskgetTrivialParticleGhostMask () const
 Get a trivial (empty) particle ghost mask that scatters no particles.
 
const AMRMaskgetParticleGhostExposure (const std::string &a_realm, const int a_width) const
 Get the particle boundary-exposure mask on a realm for a registered width.
 
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.
 
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.
 
const Vector< EBISLayout > & getEBISLayout (const std::string &a_realm, const phase::which_phase a_phase) const
 Get EBISLayouts for a Realm and phase.
 
const Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrid (const std::string &a_realm) const
 Get EBISLayouts for a Realm.
 
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.
 
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.
 
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).
 
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).
 
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.
 
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.
 
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.
 
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.
 
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.
 
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 phase.
 
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.
 
EBAMRParticleMeshgetParticleMesh (const std::string &a_realm, const phase::which_phase a_phase) const
 Get EBAMRParticleMesh operator.
 
EBAMRSurfaceDepositiongetSurfaceDeposition (const std::string &a_realm, const phase::which_phase a_phase) const
 Get EBAMRSurfaceDeposition surface deposition operator.
 
Vector< RefCountedPtr< EBCoarAve > > & getCoarseAverage (const std::string &a_realm, const phase::which_phase a_phase) const
 Get the coarsening utility.
 
Vector< RefCountedPtr< EBMultigridInterpolator > > & getMultigridInterpolator (const std::string &a_realm, const phase::which_phase a_phase) const
 Get multigrid interpolation utility.
 
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp (const std::string &a_realm, const phase::which_phase a_phase) const
 Get interpolator.
 
Vector< RefCountedPtr< EBReflux > > & getFluxRegister (const std::string &a_realm, const phase::which_phase a_phase) const
 Get flux register.
 
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp (const std::string &a_realm, const phase::which_phase a_phase) const
 Get the redistribution operators.
 
std::vector< std::string > getRealms () const
 Get the name of all Realms.
 
BoxSorting getBoxSorting () const
 Get box sorting method.
 
RefCountedPtr< EBIndexSpace > & getEBIndexSpace (const phase::which_phase a_phase)
 Get EBIndexSpace corresponding to a particular phase.
 

Protected Types

enum class  GridGenerationMethod { BergerRigoutsous , Tiled }
 Enum for having understandable notation for grid generation.
 

Protected Member Functions

void defineRealms ()
 Define Realms.
 
void buildGrids (const Vector< IntVectSet > &a_tags, const int a_lmin, const int a_hardcap=-1)
 Build new internal AMR grids.
 
void buildCopiers ()
 Build copiers for copying between realms.
 
void parseProbLoHiCorners ()
 Parse the low/high corners of the computational domain.
 
void parseGridGeneration ()
 Parse the grid generation algorithm.
 
void parseVerbosity ()
 Parse the verbosity for AmrMesh.
 
void parseCoarsestLevelNumCells ()
 Parse the coarsest domain grid.
 
void parseMaxAmrDepth ()
 Parse the maximum permitted AMR depth.
 
void parseMaxSimulationDepth ()
 Set maximum simulation depth.
 
void parseRefinementRatios ()
 Parse refinement ratios.
 
void parseBrBufferSize ()
 Parse buffer size for Berger-Rigoutsous grid algorithm.
 
void parseBrFillRatio ()
 Parse the Berger-Rigoutsos fill ratio.
 
void parseMaxBlockSize ()
 Parse the maximum permitted box size.
 
void parseMaxEbisBoxSize ()
 Parse the maximum permitted box size.
 
void parseMinBlockSize ()
 Parse the B-R blocking factor. For tiled mesh refinement this parses the tile size.
 
void parseEbGhostCells ()
 Parse number of ghost cells for eb stuff.
 
void parseNumGhostCells ()
 Parse the number of ghost cells.
 
void parseMultigridInterpolator ()
 Parse settings for the multigrid interpolator.
 
void parseRedistributionRadius ()
 Parse the default redistribution radius.
 
void parseCellCentroidInterpolation ()
 Parse centroid interpolation stencils.
 
void parseEBCentroidInterpolation ()
 Parse EB interpolation (or extrapolation) stencils.
 
void computeGradient (LevelData< EBCellFAB > &a_gradient, const LevelData< EBCellFAB > &a_phi, const std::string &a_realm, const phase::which_phase a_phase, const int a_lvl) const
 Compute cell-centered gradient for a grid level.
 

Protected Attributes

std::map< std::string, RefCountedPtr< Realm > > m_realms
 These are all the Realms.
 
std::map< phase::which_phase, RefCountedPtr< BaseIF > > m_baseif
 Implicit functions.
 
std::map< std::string, Vector< DisjointBoxLayout > > m_oldGrids
 Old grids.
 
std::map< std::string, Vector< Copier > > m_oldToNewCellCopiers
 Storage for copiers from the old grids to the new ones.
 
std::map< std::string, Vector< Copier > > m_oldToNewEBCopiers
 Storage for copiers from the old grids to the new ones.
 
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" realm.
 
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" realm.
 
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" realm.
 
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" realm.
 
GridGenerationMethod m_gridGenerationMethod
 Grid generation method.
 
BoxSorting m_boxSort
 Box sorting.
 
RefCountedPtr< MultiFluidIndexSpacem_multifluidIndexSpace
 MultiFluidIndexSpace.
 
CellCentroidInterpolation::Type m_cellCentroidInterpolationType
 Interpolation type for cell to cell centroid interpolation.
 
EBCentroidInterpolation::Type m_ebCentroidInterpolationType
 Interpolation type for cell to EB centroid interpolation.
 
IntVect m_numCells
 Coarsest box where we compute.
 
Real m_fillRatioBR
 Fill ratio.
 
RealVect m_probLo
 Domain simulation corner.
 
RealVect m_probHi
 Domain simulation corner.
 
int m_refRatio
 Refinement ratio.
 
int m_verbosity
 Verbosity.
 
int m_finestLevel
 Finest level.
 
int m_oldFinestLevel
 Finest level before a regrid.
 
int m_maxAmrDepth
 Maximum amr depth.
 
int m_maxSimulationDepth
 Maximum allowed depth for simulation.
 
int m_maxBlockSize
 Max box size.
 
int m_maxEbisBoxSize
 Maximum box size for EBIS generation.
 
int m_bufferSizeBR
 Set buffer size.
 
int m_minBlockSize
 Blocking factor.
 
int m_numEbGhostsCells
 Number of ghost cells to use for eb stuff.
 
int m_numGhostCells
 Number of ghost cells.
 
int m_numLsfGhostCells
 Number of ghost cells to use when writing level-set to grid.
 
int m_multigridInterpOrder
 Multigrid interpolation order.
 
int m_multigridInterpRadius
 Multigrid interpolation radius.
 
int m_multigridInterpWeight
 Multigrid interpolation weights.
 
int m_redistributionRadius
 Redistribution radius.
 
bool m_hasGrids
 Has grids or not.
 
bool m_hasRegridCopiers
 Has regrid copiers or not.
 
Vector< DisjointBoxLayout > m_grids
 Grids.
 
Vector< ProblemDomain > m_domains
 Problem domains.
 
Vector< int > m_refinementRatios
 AMR resolutions.
 
Vector< Real > m_dx
 Level resolutions.
 

Detailed Description

Class for handling spatial operations.

This class handles most (if not all) spatial operations. Examples are grid generation, coarsening of data, interpolation of data, memory allocations etc.

Constructor & Destructor Documentation

◆ AmrMesh() [1/2]

AmrMesh::AmrMesh ( const AmrMesh a_other)
delete

Disallowed copy constructor.

Parameters
[in]a_otherOther AmrMesh

◆ AmrMesh() [2/2]

AmrMesh::AmrMesh ( const AmrMesh &&  a_other)
delete

Disallowed move constructor.

Parameters
[in]a_otherOther AmrMesh

Member Function Documentation

◆ alias() [1/10]

EBAMRCellData AmrMesh::alias ( const phase::which_phase  a_phase,
const MFAMRCellData &  a_mfdata 
) const

Alias an entire hierarchy of multifluid data.

Parameters
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased
Returns
A single-phase alias of the multifluid data, having the same size as the input data.

◆ alias() [2/10]

EBAMRFluxData AmrMesh::alias ( const phase::which_phase  a_phase,
const MFAMRFluxData &  a_mfdata 
) const

Alias an entire hierarchy of multifluid data.

Parameters
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased
Returns
A single-phase alias of the multifluid data, having the same size as the input data.

◆ alias() [3/10]

EBAMRIVData AmrMesh::alias ( const phase::which_phase  a_phase,
const MFAMRIVData &  a_mfdata 
) const

Alias an entire hierarchy of multifluid data.

Parameters
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased
Returns
A single-phase alias of the multifluid data, having the same size as the input data.

◆ alias() [4/10]

void AmrMesh::alias ( EBAMRCellData &  a_data,
const phase::which_phase  a_phase,
const MFAMRCellData &  a_mfdata 
) const

Alias an entire hierarchy of multifluid data.

Parameters
[out]a_dataSingle-phased data on specific phase
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased

◆ alias() [5/10]

void AmrMesh::alias ( EBAMRCellData &  a_data,
const phase::which_phase  a_phase,
const MFAMRCellData &  a_mfdata,
const int  a_finestLevel 
) const

Alias multifluid data up to a specified level.

Parameters
[out]a_dataSingle-phased data on specific phase
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased
[in]a_finestLevelMaximum grid level for aliasing operation.

◆ alias() [6/10]

void AmrMesh::alias ( EBAMRFluxData &  a_data,
const phase::which_phase  a_phase,
const MFAMRFluxData &  a_mfdata 
) const

Alias an entire hierarchy of multifluid data.

Parameters
[out]a_dataSingle-phased data on specific phase
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased

◆ alias() [7/10]

void AmrMesh::alias ( EBAMRFluxData &  a_data,
const phase::which_phase  a_phase,
const MFAMRFluxData &  a_mfdata,
const int  a_finestLevel 
) const

Alias multifluid data up to a specified level.

Parameters
[out]a_dataSingle-phased data on specific phase
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased
[in]a_finestLevelMaximum grid level for aliasing operation.

◆ alias() [8/10]

void AmrMesh::alias ( EBAMRIVData &  a_data,
const phase::which_phase  a_phase,
const MFAMRIVData &  a_mfdata 
) const

Alias an entire hierarchy of multifluid data.

Parameters
[out]a_dataSingle-phased data on specific phase
[in]a_phasePhase (gas or solid).
[in]a_mfdataMultifluid data to be aliased

◆ alias() [9/10]

template<typename T , typename S >
void AmrMesh::alias ( Vector< T * > &  a_alias,
const EBAMRData< S > &  a_data 
) const

Turn smart-pointer data structure into regular-pointer data structure.

Parameters
[out]a_aliasRaw pointer aliased
[in]a_dataSmart-pointer data

This fetches the bare pointer from a_data and sets it in a_alias.

◆ alias() [10/10]

template<typename T >
void AmrMesh::alias ( Vector< T * > &  a_alias,
const Vector< RefCountedPtr< T > > &  a_data 
) const

Turn smart-pointer data structure into regular-pointer data structure.

Parameters
[out]a_aliasRaw pointer aliased
[in]a_dataSmart-pointer data

This fetches the bare pointer from a_data and sets it in a_alias.

◆ allocate() [1/11]

void AmrMesh::allocate ( EBAMRBool &  a_data,
const std::string &  a_realm,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate Boolean data over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [2/11]

void AmrMesh::allocate ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate a data holder over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_phasePhase (gas or solid)
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [3/11]

void AmrMesh::allocate ( EBAMRFAB &  a_data,
const std::string &  a_realm,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate regular (non-EB) cell data over a specific realm.

Phase-free, unlike the EBAMRCellData overload: FArrayBox needs no EBISBox. Use this for plain per-cell scalars that do not need cut-cell representation.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [4/11]

void AmrMesh::allocate ( EBAMRFluxData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate a data holder over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_phasePhase (gas or solid)
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [5/11]

void AmrMesh::allocate ( EBAMRIFData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate a data holder over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_phasePhase (gas or solid).
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [6/11]

void AmrMesh::allocate ( EBAMRIVData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate a data holder over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_phasePhase (gas or solid)
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [7/11]

void AmrMesh::allocate ( LevelData< EBCellFAB > &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_level,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate data on specific level.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_phasePhase (gas or solid)
[in]a_levelAMR level
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [8/11]

void AmrMesh::allocate ( MFAMRCellData &  a_data,
const std::string &  a_realm,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate a data holder over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [9/11]

void AmrMesh::allocate ( MFAMRFluxData &  a_data,
const std::string &  a_realm,
const int  a_nComp,
const int  a_ghost = -1 
) const

Allocate a data holder over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [10/11]

void AmrMesh::allocate ( MFAMRIVData &  a_data,
const std::string &  a_realm,
const int  a_nComp,
const int  a_ghost = 0 
) const

Allocate a data holder over a specific realm.

Parameters
[out]a_dataData holder to be allocated
[in]a_realmRealm of the name where the data will be allocated.
[in]a_nCompNumber of components in a_data
[in]a_ghostNumber of ghost cells for a_data
Note
If a_ghost < 0, this routine will use the default number of ghost cells.

◆ allocate() [11/11]

template<typename P , typename Traits >
void AmrMesh::allocate ( ParticleContainer< P, Traits > &  a_container,
const std::string &  a_realm 
) const

Allocate a struct-of-arrays particle container on the given realm.

Parameters
[out]a_containerSoA particle container to be allocated.
[in]a_realmRealm on which the particles will be allocated.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ allocatePointer() [1/4]

template<typename T >
void AmrMesh::allocatePointer ( EBAMRData< T > &  a_data,
const std::string &  a_realm 
) const

Allocate pointer but not any memory blocks.

Parameters
[out]a_dataData structure for which pointers will be constructed.
[in]a_realmRealm associated with the data

This sets all the elements in a_data to be RefCountedPtr<T>(nullptr)

◆ allocatePointer() [2/4]

template<typename T >
void AmrMesh::allocatePointer ( EBAMRData< T > &  a_data,
const std::string &  a_realm,
const int  a_finestLevel 
) const

Allocate pointer but not any memory.

Parameters
[out]a_dataData structure for which pointers will be constructed.
[in]a_realmRealm associated with the data
[in]a_finestLevelFinest grid level on which a_data will be defined.

This sets all the elements in the vector to be RefCountedPtr<T>(nullptr)

◆ allocatePointer() [3/4]

template<typename T >
void AmrMesh::allocatePointer ( Vector< RefCountedPtr< T > > &  a_data) const

Allocate pointer but not any memory blocks.

Parameters
[out]a_dataData structure for which pointers will be constructed.

This sets all the elements in the vector to be RefCountedPtr<T>(nullptr)

◆ allocatePointer() [4/4]

template<typename T >
void AmrMesh::allocatePointer ( Vector< RefCountedPtr< T > > &  a_data,
const int  a_finestLevel 
) const

Allocate pointer but not any memory blocks.

Parameters
[out]a_dataData structure for which pointers will be constructed.
[in]a_finestLevelFinest grid level on which a_data will be defined.

This sets all the elements in the vector to be RefCountedPtr<T>(nullptr)

◆ arithmeticAverage() [1/6]

void AmrMesh::arithmeticAverage ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Arithmetic average of data. Does all components.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ arithmeticAverage() [2/6]

void AmrMesh::arithmeticAverage ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const Interval &  a_variables 
) const

Arithmetic average of data.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_variablesVariables

◆ arithmeticAverage() [3/6]

void AmrMesh::arithmeticAverage ( EBAMRFluxData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Average down on specific realm and phase.

This computes an arithmetic average of the face data. Data on coarse faces is replaced by the arithmetic average of the fine face data.

Parameters
[in,out]a_dataData to be average.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ arithmeticAverage() [4/6]

void AmrMesh::arithmeticAverage ( EBAMRIVData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Arithmetic average on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ arithmeticAverage() [5/6]

void AmrMesh::arithmeticAverage ( MFAMRCellData &  a_data,
const std::string &  a_realm 
) const

Arithmetic coarsening of multifluid data.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name

◆ arithmeticAverage() [6/6]

void AmrMesh::arithmeticAverage ( MFAMRFluxData &  a_data,
const std::string &  a_realm 
) const

Average multifluid data over a realm.

This computes an arithmetic average of the face data. Data on coarse faces is replaced by the arithmetic average of the fine face data.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name

◆ average() [1/6]

void AmrMesh::average ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const Average a_average 
) const

Average down on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_averageAveraging method

◆ average() [2/6]

void AmrMesh::average ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const Average a_average,
const Interval &  a_variables 
) const

Average down on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm
[in]a_phasePhase (gas or solid)
[in]a_variablesVariables to average
[in]a_averageAveraging method

◆ average() [3/6]

void AmrMesh::average ( EBAMRFluxData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const Average a_average 
) const

Average down on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_averageAveraging method

◆ average() [4/6]

void AmrMesh::average ( EBAMRIVData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const Average a_average 
) const

Average down on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_averageAveraging method

◆ average() [5/6]

void AmrMesh::average ( MFAMRCellData &  a_data,
const std::string &  a_realm,
const Average a_average 
) const

Average multifluid data over a specified realm.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_averageAveraging method

◆ average() [6/6]

void AmrMesh::average ( MFAMRFluxData &  a_data,
const std::string &  a_realm,
const Average a_average 
) const

Average multifluid data over a specified realm.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_averageAveraging method

◆ buildGrids()

void AmrMesh::buildGrids ( const Vector< IntVectSet > &  a_tags,
const int  a_lmin,
const int  a_hardcap = -1 
)
protected

Build new internal AMR grids.

Parameters
[in,out]a_tagsSets of cell tags used for the grid generation.
[in]a_lminThe finest grid level which changes.
[in]a_hardcapHardcap for the maximum grid level which can be generated. If a_hardcap < 0 there is no restriction beyond the AmrMesh restrictions.

This will call the specified grid generation method and fill m_grids with the new grids.

◆ computeGradient() [1/5]

void AmrMesh::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.

Parameters
[out]a_gradientCell centered gradient.
[in]a_phiThe scalar for which the gradient is computed.
[in]a_realmName of the realm where the data lives.
[in]a_phasePhase on which the data lives.
Note
This routine will reach into ghost cells and across refinement boundaries. The user must make sure that ghost cells are updated before using this routine.

◆ computeGradient() [2/5]

void AmrMesh::computeGradient ( EBAMRFluxData &  a_gradient,
const EBAMRCellData &  a_phi,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Compute face-centered gradient over an AMR hierarchy.

Parameters
[out]a_gradientFace centered gradient.
[in]a_phiThe scalar for which the gradient is computed.
[in]a_realmName of the realm where the data lives.
[in]a_phasePhase on which the data lives.
Note
This routine will reach into ghost cells and across refinement boundaries. The user must make sure that ghost cells are updated before using this routine.

◆ computeGradient() [3/5]

void AmrMesh::computeGradient ( LevelData< EBCellFAB > &  a_gradient,
const LevelData< EBCellFAB > &  a_phi,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_lvl 
) const
protected

Compute cell-centered gradient for a grid level.

Parameters
[out]a_gradientCell centered gradient.
[in]a_phiThe scalar for which the gradient is computed.
[in]a_realmName of the realm where the data lives.
[in]a_phasePhase on which the data lives.
[in]a_lvlGrid level where the data lives.
Note
This routine will reach into ghost cells and across refinement boundaries. The user must make sure that ghost cells updated before using this routine.

◆ computeGradient() [4/5]

void AmrMesh::computeGradient ( MFAMRCellData &  a_gradient,
const MFAMRCellData &  a_phi,
const std::string &  a_realm 
) const

Compute cell-centered gradient over an AMR hierarchy.

Parameters
[out]a_gradientCell centered gradient.
[in]a_phiThe scalar for which the gradient is computed.
[in]a_realmName of the Realm where the data lives.
Note
This routine will reach into ghost cells and across refinement boundaries. The user must make sure that ghost cells are updated before using this routine.

◆ computeGradient() [5/5]

void AmrMesh::computeGradient ( MFAMRFluxData &  a_gradient,
const MFAMRCellData &  a_phi,
const std::string &  a_realm 
) const

Compute face-centered gradient over an AMR hierarchy.

Parameters
[out]a_gradientFace centered gradient.
[in]a_phiThe scalar for which the gradient is computed.
[in]a_realmName of the Realm where the data lives.
Note
This routine will reach into ghost cells and across refinement boundaries. The user must make sure that ghost cells are updated before using this routine.

◆ conservativeAverage() [1/6]

void AmrMesh::conservativeAverage ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Conseratively average data. Does all components.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ conservativeAverage() [2/6]

void AmrMesh::conservativeAverage ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const Interval &  a_variables 
) const

Conseratively average data. Does all components.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_variablesVariables

◆ conservativeAverage() [3/6]

void AmrMesh::conservativeAverage ( EBAMRFluxData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Average down on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ conservativeAverage() [4/6]

void AmrMesh::conservativeAverage ( EBAMRIVData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Conservative averaging on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ conservativeAverage() [5/6]

void AmrMesh::conservativeAverage ( MFAMRCellData &  a_data,
const std::string &  a_realm 
) const

Conservative coarsening of multifluid data.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name

◆ conservativeAverage() [6/6]

void AmrMesh::conservativeAverage ( MFAMRFluxData &  a_data,
const std::string &  a_realm 
) const

Average down multifluid data over a realm.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name

◆ copyData() [1/4]

template<typename T >
void AmrMesh::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 about from/to regions.

Parameters
[in,out]a_dstDestination data
[in]a_srcSource data
[in]a_toRegionRegion we copy into
[in]a_fromRegionRegion we copy from
Note
If the user requests copying into ghosted regions, the Copiers MUST USE THE CORRECT NUMBER OF GHOST CELLS
This routine will not work if copying between grids before/after regrids.

◆ copyData() [2/4]

template<typename T >
void AmrMesh::copyData ( EBAMRData< T > &  a_dst,
const EBAMRData< T > &  a_src,
const Interval &  a_dstComps,
const Interval &  a_srcComps,
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.

Parameters
[in,out]a_dstDestination data
[in]a_srcSource data
[in]a_dstCompsDestination components
[in]a_srcCompsSource components
[in]a_toRegionRegion we copy into
[in]a_fromRegionRegion we copy from
Note
If the user requests copying into ghosted regions, the Copiers MUST USE THE CORRECT NUMBER OF GHOST CELLS
This routine will not work if copying between grids before/after regrids.

◆ copyData() [3/4]

template<typename T >
void AmrMesh::copyData ( LevelData< T > &  a_dst,
const LevelData< T > &  a_src,
const int  a_level,
const std::string  a_toRealm,
const std::string  a_fromRealm,
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 about from/to regions.

Parameters
[in,out]a_dstDestination data
[in]a_srcSource data
[in]a_levelGrid level
[in]a_toRealmDestination realm
[in]a_fromRealmSource realm
[in]a_fromRegionRegion we copy from
[in]a_toRegionRegion we copy into
Note
If the user requests copying into ghosted regions, the Copiers MUST USE THE CORRECT NUMBER OF GHOST CELLS
This routine will not work if copying between grids before/after regrids.

◆ copyData() [4/4]

template<typename T >
void AmrMesh::copyData ( LevelData< T > &  a_dst,
const LevelData< T > &  a_src,
const int  a_level,
const std::string  a_toRealm,
const std::string  a_fromRealm,
const Interval &  a_dstComps,
const Interval &  a_srcComps,
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 about from/to regions.

Parameters
[in,out]a_dstDestination data
[in]a_srcSource data
[in]a_levelGrid level
[in]a_toRealmDestination realm
[in]a_fromRealmSource realm
[in]a_dstCompsDestination components
[in]a_srcCompsSource components
[in]a_fromRegionRegion we copy from
[in]a_toRegionRegion we copy into
Note
If the user requests copying into ghosted regions, the Copiers MUST USE THE CORRECT NUMBER OF GHOST CELLS
This routine will not work if copying between grids before/after regrids.

◆ deallocate() [1/3]

template<typename T >
void AmrMesh::deallocate ( EBAMRData< T > &  a_data) const

Deallocate data.

Parameters
[in,out]a_dataData to be deallocated.

◆ deallocate() [2/3]

template<typename T >
void AmrMesh::deallocate ( Vector< RefCountedPtr< T > > &  a_data) const

Deallocate smart pointer data.

Parameters
[in,out]a_dataData to be deallocated.

◆ deallocate() [3/3]

template<typename T >
void AmrMesh::deallocate ( Vector< T * > &  a_data) const

Deallocate data.

Parameters
[in,out]a_dataData to be deleted.

◆ depositGathered()

template<typename P , typename Traits , typename CellGather >
void AmrMesh::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.

Generalizes depositWeight to a derived per-particle quantity (e.g. weight*mobility), via the EBAMRParticleMesh gatherer-based deposit. Deposits one component.

Parameters
[out]a_meshDataMesh data (one component).
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesSoA particle container.
[in]a_depositionTypeDeposition kernel (e.g. CIC).
[in]a_coarseFineDepositionCoarse-fine handling.
[in]a_forceIrregNGPForce NGP deposition in cut cells.
[in]a_cellGatherPer-particle value gatherer (leaf, index) -> Real.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.
CellGatherCallable (const ParticleSoA<P, Traits>&, std::size_t) -> Real.

◆ depositParticles() [1/2]

template<auto... Members, typename P , typename Traits >
void AmrMesh::depositParticles ( 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 one or more SoA payload columns on the mesh (all coarse-fine strategies).

Members selects either one scalar column or SpaceDim vector-component columns, mapped to consecutive mesh components.

Parameters
[out]a_meshDataMesh data.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesSoA particle container.
[in]a_depositionTypeDeposition kernel.
[in]a_coarseFineDepositionCoarse-fine handling.
[in]a_forceIrregNGPForce NGP deposition in cut cells.
Template Parameters
MembersPack of payload data-member pointers selecting the column(s).
PPayload type (deduced).
TraitsColumn descriptor (deduced).

◆ depositParticles() [2/2]

template<typename P , typename Traits >
void AmrMesh::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).

SoA overload of the surface deposit; deposits the container-owned weight column.

Parameters
[out]a_meshDataMesh data. MUST have exactly one component.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesSoA particle container.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ depositWeight()

template<typename P , typename Traits >
void AmrMesh::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).

Parameters
[out]a_meshDataMesh data. Must have exactly one component.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesSoA particle container.
[in]a_depositionTypeDeposition kernel (e.g. CIC).
[in]a_coarseFineDepositionCoarse-fine handling.
[in]a_forceIrregNGPForce NGP deposition in cut cells.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ getBaseImplicitFunction()

const RefCountedPtr< BaseIF > & AmrMesh::getBaseImplicitFunction ( const phase::which_phase  a_phase) const

Get implicit function for a specific phase.

Parameters
[in]a_phasePhase (gas or solid)
Returns
Implicit function for the specified phase

◆ getBlockingFactor()

int AmrMesh::getBlockingFactor ( ) const
inline

Deprecated alias for getMinBlockSize().

Returns
Minimum block size
Note
'blocking factor' was renamed to 'min block size'; use getMinBlockSize().

◆ getBoxSorting()

BoxSorting AmrMesh::getBoxSorting ( ) const

Get box sorting method.

Returns
Box sorting method.

◆ getBrBuffer()

int AmrMesh::getBrBuffer ( ) const

Return buffer for B-R mesh refinement algorithm.

Returns
Buffer size

◆ getCoarseAverage()

Vector< RefCountedPtr< EBCoarAve > > & AmrMesh::getCoarseAverage ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get the coarsening utility.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Coarse-averaging operators on all levels

◆ getCoveredCells()

const EBAMRCellData & AmrMesh::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.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Covered-cell mask

◆ getDomains()

const Vector< ProblemDomain > & AmrMesh::getDomains ( ) const

Get domains.

Returns
Problem domains on all AMR levels

◆ getDx()

const Vector< Real > & AmrMesh::getDx ( ) const

Get spatial resolutions.

Returns
Grid spacings on all levels

◆ getEbCf()

bool AmrMesh::getEbCf ( ) const

Check if mesh has an EBCF.

Note
Always returns true, non-EBCF cases are a thing of the past.
Returns
Always true

◆ getEBIndexSpace()

RefCountedPtr< EBIndexSpace > & AmrMesh::getEBIndexSpace ( const phase::which_phase  a_phase)
inline

Get EBIndexSpace corresponding to a particular phase.

Parameters
[in]a_phasePhase (gas/solid)
Returns
EBIndexSpace for the specified phase

◆ getEBISLayout()

const Vector< EBISLayout > & AmrMesh::getEBISLayout ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get EBISLayouts for a Realm and phase.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
EBISLayouts on all AMR levels

◆ getEBLevelGrid()

const Vector< RefCountedPtr< EBLevelGrid > > & AmrMesh::getEBLevelGrid ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get the EBLevelGrid for a Realm and phase.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
EBLevelGrids on all AMR levels

◆ getEBLevelGridCoFi()

const Vector< RefCountedPtr< EBLevelGrid > > & AmrMesh::getEBLevelGridCoFi ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get the coarsened fine EBLevelGrid for a Realm and phase.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Coarsened-fine EBLevelGrids on all AMR levels

◆ getFaceIterator()

Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & AmrMesh::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).

Each per-box entry is an array of SpaceDim FaceIterators. Domain boundary faces are included. For cell-to-face averaging that excludes domain boundary faces, use getFaceIteratorNoBoundary.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Per-level LayoutData of FaceIterator arrays

◆ getFaceIteratorNoBoundary()

Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & AmrMesh::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).

Each per-box entry is an array of SpaceDim FaceIterators. Domain boundary faces are excluded. Intended for cell-to-face averaging where boundary faces are fixed up separately.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Per-level LayoutData of FaceIterator arrays

◆ getFaceIteratorWithTangentialGhosts()

Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & AmrMesh::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.

Each per-box entry is an array of SpaceDim FaceIterators, one per coordinate direction. For the iterator in direction dir, the underlying IVS covers irregular cells in a box grown by 1 in the two directions tangential to dir; the dir extent stays at the valid box. Domain boundary faces are excluded (FaceStop::SurroundingNoBoundary). Callers require at least 1 ghost layer in cell data.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Per-level LayoutData of FaceIterator arrays

◆ getFineInterp()

Vector< RefCountedPtr< EBCoarseToFineInterp > > & AmrMesh::getFineInterp ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get interpolator.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Coarse-to-fine interpolation operators on all levels

◆ getFinestDomain()

ProblemDomain AmrMesh::getFinestDomain ( ) const

Get finest domain.

Returns
Problem domain on the finest level

◆ getFinestDx()

Real AmrMesh::getFinestDx ( ) const

Get resolution on the finest grid level.

Returns
Grid spacing on finest level

◆ getFinestLevel()

int AmrMesh::getFinestLevel ( ) const

Get finest grid level.

Returns
Finest AMR level

◆ getFluxRegister()

Vector< RefCountedPtr< EBReflux > > & AmrMesh::getFluxRegister ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get flux register.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Flux registers on all AMR levels

◆ getGrids()

const Vector< DisjointBoxLayout > & AmrMesh::getGrids ( const std::string &  a_realm) const

Get the grids.

Parameters
[in]a_realmRealm name
Returns
Grids for the specified realm

◆ getIrregularCells()

const EBAMRCellData & AmrMesh::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.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Irregular-cell mask

◆ getLevelset()

const EBAMRFAB & AmrMesh::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.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Levelset

◆ getLevelTiles()

const Vector< RefCountedPtr< LevelTiles > > & AmrMesh::getLevelTiles ( const std::string &  a_realm) const

Get the tiled space representation.

Parameters
[in]a_realmRealm name
Returns
Level tiles

◆ getMask()

const AMRMask & AmrMesh::getMask ( const std::string &  a_mask,
const int  a_buffer,
const std::string &  a_realm 
) const

Get a registered mask.

Parameters
[in]a_maskMask name
[in]a_bufferBuffer (used when registering mask)
[in]a_realmRealm name
Returns
Mask

◆ getMaxAmrDepth()

int AmrMesh::getMaxAmrDepth ( ) const

Get maximum permitted amr depth.

Returns
Maximum AMR depth

◆ getMaxBlockSize()

int AmrMesh::getMaxBlockSize ( ) const

Get maximum permitted block size.

Returns
Maximum block size

◆ getMaxBoxSize()

int AmrMesh::getMaxBoxSize ( ) const
inline

Deprecated alias for getMaxBlockSize().

Returns
Maximum block size.
Note
'max box size' was renamed to 'max block size'; use getMaxBlockSize().

◆ getMaxEbisBoxSize()

int AmrMesh::getMaxEbisBoxSize ( ) const

Get maximum box size for EBIS generation.

Returns
Maximum EBIS box size

◆ getMaxSimulationDepth()

int AmrMesh::getMaxSimulationDepth ( ) const

Get maximum permitted simulation depth.

Returns
Maximum simulation depth

◆ getMFLevelGrid()

const Vector< RefCountedPtr< MFLevelGrid > > & AmrMesh::getMFLevelGrid ( const std::string &  a_realm) const

Get EBISLayouts for a Realm.

Parameters
[in]a_realmRealm name
Returns
M f level grid

◆ getMinBlockSize()

int AmrMesh::getMinBlockSize ( ) const

Get the minimum block size (i.e. the smallest possible box / tile size).

Returns
Minimum block size

◆ getMultiCutFaceIterator()

Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & AmrMesh::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.

Only faces abutting at least one multiply-cut cell (cells with more than one VoF) are visited. Faces are enumerated with FaceStop::SurroundingNoBoundary. Used as a second pass after a box loop over getSingleValuedFAB to avoid double-processing singly-cut faces.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Per-level LayoutData of FaceIterator arrays

◆ getMultiCutVofIterator()

Vector< RefCountedPtr< LayoutData< VoFIterator > > > & AmrMesh::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.

Multiply-cut cells are those with more than one VoF per cell. This iterator is used as a second pass after BoxLoops::loop over getSingleValuedFAB, which already covers VoF 0 of all cut-cells.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Per-level LayoutData of VoFIterators restricted to multiply-cut cells

◆ getMultigridInterpolator()

Vector< RefCountedPtr< EBMultigridInterpolator > > & AmrMesh::getMultigridInterpolator ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get multigrid interpolation utility.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Multigrid interpolator

◆ getNotCoveredCells()

const EBAMRCellData & AmrMesh::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 phase.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Non-covered-cell mask

◆ getNumberOfEbGhostCells()

int AmrMesh::getNumberOfEbGhostCells ( ) const

Get number of ghost cells used for EB grid generation.

Returns
Number of EB ghost cells

◆ getNumberOfGhostCells()

int AmrMesh::getNumberOfGhostCells ( ) const

Get the default number of ghost cells.

Returns
Number of ghost cells

◆ getParticleGhostExposure()

const AMRMask & AmrMesh::getParticleGhostExposure ( const std::string &  a_realm,
const int  a_width 
) const

Get the particle boundary-exposure mask on a realm for a registered width.

True in every cell that has at least one outgoing ghost-shipment target in any direction, i.e. the OR of the three ghost masks above. Built at regrid, so a consumer can read the bit instead of re-deriving it per particle per timestep. Carries no ghost cells – only cells holding a resident particle may be queried.

Parameters
[in]a_realmRealm name
[in]a_widthRegistered ghost width.
Returns
Per-level boolean mask over the valid grids.

◆ getParticleGhostMask()

const AMRParticleGhostMask & AmrMesh::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.

Parameters
[in]a_realmRealm name
[in]a_widthRegistered ghost width.
Returns
Per-level, per-box CSR of source-cell -> same-level target boxes (grid index, rank).

◆ getParticleGhostMaskCoarToFine()

const AMRParticleGhostMask & AmrMesh::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.

Contract: the finest-level entry is allocated but left undefined (the finest level has no finer level); callers must only query levels < the finest level.

Parameters
[in]a_realmRealm name
[in]a_widthRegistered ghost width.
Returns
Per-level, per-box CSR of source-cell -> finer-level target boxes (grid index, rank).

◆ getParticleGhostMaskFineToCoar()

const AMRParticleGhostMask & AmrMesh::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.

Contract: the level-0 entry is allocated but left undefined (level 0 has no coarser level); callers must only query levels >= 1.

Parameters
[in]a_realmRealm name
[in]a_widthRegistered ghost width.
Returns
Per-level, per-box CSR of source-cell -> coarser-level target boxes (grid index, rank).

◆ getParticleMesh()

EBAMRParticleMesh & AmrMesh::getParticleMesh ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get EBAMRParticleMesh operator.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Particle mesh

◆ getProbHi()

RealVect AmrMesh::getProbHi ( ) const

Get upper-right corner of computational domain.

Returns
Upper-right corner of the domain

◆ getProbLo()

RealVect AmrMesh::getProbLo ( ) const

Get lower-left corner of computational domain.

Returns
Lower-left corner of the domain

◆ getProxyGrids()

const Vector< DisjointBoxLayout > & AmrMesh::getProxyGrids ( ) const

Get the "proxy" grids in AmrMesh.

Returns m_grids

Returns
Proxy grids

◆ getRealms()

std::vector< std::string > AmrMesh::getRealms ( ) const

Get the name of all Realms.

Returns
Names of all Realms

◆ getRedistributionOp()

Vector< RefCountedPtr< EBFluxRedistribution > > & AmrMesh::getRedistributionOp ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get the redistribution operators.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Redistribution op

◆ getRedistributionRadius()

int AmrMesh::getRedistributionRadius ( ) const

Get default redistribution radius.

Returns
Redistribution radius

◆ getRefinementRatio()

int AmrMesh::getRefinementRatio ( const int  a_level1,
const int  a_level2 
) const

Get refinement factor between two levels.

Parameters
[in]a_level1First level
[in]a_level2Second level

This will work correctly in reverse as well.

Returns
Refinement ratio

◆ getRefinementRatios()

const Vector< int > & AmrMesh::getRefinementRatios ( ) const

Get refinement ratios.

Returns
Refinement ratios between consecutive levels

◆ getRegularCells()

const EBAMRCellData & AmrMesh::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.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Regular-cell mask

◆ getSurfaceDeposition()

EBAMRSurfaceDeposition & AmrMesh::getSurfaceDeposition ( const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Get EBAMRSurfaceDeposition surface deposition operator.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Surface deposition

◆ getTrivialParticleGhostMask()

const AMRParticleGhostMask & AmrMesh::getTrivialParticleGhostMask ( ) const

Get a trivial (empty) particle ghost mask that scatters no particles.

Pass this to ParticleContainer::fillGhost for a direction that should not scatter.

Returns
A static empty mask.

◆ getValidCells()

const AMRMask & AmrMesh::getValidCells ( const std::string &  a_realm) const

Get a map of all valid cells on a specified realm.

Parameters
[in]a_realmRealm name
Returns
Valid cells

◆ getVofIterator()

Vector< RefCountedPtr< LayoutData< VoFIterator > > > & AmrMesh::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.

Not const because we need to reset the VoFIterator. For a pass covering only multiply-cut cells, use getMultiCutVofIterator instead.

Parameters
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
Returns
Per-level LayoutData of VoFIterators covering all irregular cells

◆ harmonicAverage() [1/6]

void AmrMesh::harmonicAverage ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Harmonic average of data. Does all components.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ harmonicAverage() [2/6]

void AmrMesh::harmonicAverage ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const Interval &  a_variables 
) const

Harmonic average of data. Does all components.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_variablesVariables

◆ harmonicAverage() [3/6]

void AmrMesh::harmonicAverage ( EBAMRFluxData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Average down on specific realm and phase.

This computes an arithmetic average of the face data. Data on coarse faces is replaced by the arithmetic average of the fine face data.

Parameters
[in,out]a_dataData to be average.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ harmonicAverage() [4/6]

void AmrMesh::harmonicAverage ( EBAMRIVData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Harmonic average on specific realm and phase.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ harmonicAverage() [5/6]

void AmrMesh::harmonicAverage ( MFAMRCellData &  a_data,
const std::string &  a_realm 
) const

Harmonic coarsening of multifluid data.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name

◆ harmonicAverage() [6/6]

void AmrMesh::harmonicAverage ( MFAMRFluxData &  a_data,
const std::string &  a_realm 
) const

Average multifluid data over a realm.

This computes an arithmetic average of the face data. Data on coarse faces is replaced by the arithmetic average of the fine face data.

Parameters
[in,out]a_dataData to be coarsened.
[in]a_realmRealm name

◆ interpGhost() [1/3]

void AmrMesh::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.

Parameters
[in,out]a_dataData to be interpolated.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ interpGhost() [2/3]

void AmrMesh::interpGhost ( LevelData< EBCellFAB > &  a_fineData,
const LevelData< EBCellFAB > &  a_coarData,
const int  a_fineLevel,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Interpolate ghost cells over a realm, using the default ghost cell interpolation method on a specific level.

Parameters
[in,out]a_fineDataFine grid data
[in,out]a_coarDataCoarse grid data
[in]a_fineLevelThe grid level corresponding to a_fineData
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ interpGhost() [3/3]

void AmrMesh::interpGhost ( MFAMRCellData &  a_data,
const std::string &  a_realm 
) const

Interpolate ghost cells over a realm. Calls the default ghost cell interpolation method.

Parameters
[in,out]a_dataData to be interpolated
[in]a_realmRealm name

◆ interpGhostMG() [1/2]

void AmrMesh::interpGhostMG ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Interpolate ghost cells over a realm and phase.

This routine uses the multigrid interpolator, which does not reach into invalid regions. I.e., all ghost cells are interpolated using valid data only.

Parameters
[in,out]a_dataData to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ interpGhostMG() [2/2]

void AmrMesh::interpGhostMG ( MFAMRCellData &  a_data,
const std::string &  a_realm 
) const

Interpolate ghost cells over a realm and phase.

This routine uses the multigrid interpolator, which does not reach into invalid regions. I.e., all ghost cells are interpolated using valid data only.

Parameters
[in,out]a_dataData to be interpolated
[in]a_realmRealm name

◆ interpGhostPwl() [1/2]

void AmrMesh::interpGhostPwl ( EBAMRCellData &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const

Interpolate ghost cells over a realm and phase. This uses piecewise linear interpolation (with limiters)

Parameters
[in,out]a_dataData to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ interpGhostPwl() [2/2]

void AmrMesh::interpGhostPwl ( MFAMRCellData &  a_data,
const std::string &  a_realm 
) const

Interpolate ghost cells over a realm and phase. This uses piecewise linear interpolation (with limiters)

Parameters
[in,out]a_dataData to be interpolated
[in]a_realmRealm name

◆ interpolateParticles()

template<auto... Members, typename P , typename Traits >
void AmrMesh::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.

Members selects either one scalar column or SpaceDim vector-component columns, read from consecutive mesh components.

Parameters
[in,out]a_particlesSoA particles whose target columns are overwritten.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_meshFieldField on the mesh.
[in]a_interpTypeInterpolation kernel.
[in]a_forceIrregNGPForce NGP interpolation in cut cells.
Template Parameters
MembersPack of payload data-member pointers selecting the target column(s).
PPayload type (deduced).
TraitsColumn descriptor (deduced).

◆ interpolateWeight()

template<typename P , typename Traits >
void AmrMesh::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.

Parameters
[in,out]a_particlesSoA particles whose weight column is overwritten.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_meshScalarFieldScalar field on the mesh.
[in]a_interpTypeInterpolation kernel.
[in]a_forceIrregNGPForce NGP interpolation in cut cells.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ interpToCentroids() [1/5]

void AmrMesh::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.

Parameters
[in,out]a_dataData to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

This leaves regular data intact, while the values in irregular are replaced by the corresponding interpolation to centroids.

◆ interpToCentroids() [2/5]

void AmrMesh::interpToCentroids ( EBAMRIVData &  a_centroidData,
const EBAMRCellData &  a_cellData,
const std::string &  a_realm,
const phase::which_phase  a_phase 
) const
noexcept

Interpolate data to centroids on realm and phase.

Parameters
[out]a_centroidDataCentroid-centered data
[in]a_cellDataCell-centered data to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

This leaves regular data intact, while the values in irregular are replaced by the corresponding interpolation to centroids.

◆ interpToCentroids() [3/5]

void AmrMesh::interpToCentroids ( EBCellFAB &  a_centroidData,
const EBCellFAB &  a_cellData,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_level,
const DataIndex &  a_din 
) const
noexcept

Interpolate data to centroids.

Parameters
[in,out]a_centroidDataCentroid-centered data
[in]a_cellDataCell-centered data
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_levelGrid level
[in]a_dinGrid index

◆ interpToCentroids() [4/5]

void AmrMesh::interpToCentroids ( LevelData< BaseIVFAB< Real > > &  a_centroidData,
const LevelData< EBCellFAB > &  a_cellData,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_level 
) const
noexcept

Interpolate data to centroids.

Parameters
[out]a_centroidDataCentroid-centered data
[in]a_cellDataCell-centered data to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_levelGrid level

◆ interpToCentroids() [5/5]

void AmrMesh::interpToCentroids ( LevelData< EBCellFAB > &  a_data,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_level 
) const
noexcept

Interpolate data to centroids.

Parameters
[in,out]a_dataData to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_levelGrid level

◆ interpToEB() [1/3]

void AmrMesh::interpToEB ( BaseIVFAB< Real > &  a_centroidData,
const EBCellFAB &  a_cellData,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_level,
const DataIndex &  a_din 
) const
noexcept

Interpolate data to EB centroids.

Parameters
[out]a_centroidDataEB-centered data
[in]a_cellDataCell-centered data to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_levelGrid level
[in]a_dinGrid index

◆ interpToEB() [2/3]

void AmrMesh::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.

Parameters
[out]a_centroidDataEB-centered data
[in]a_cellDataCell-centered data to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)

◆ interpToEB() [3/3]

void AmrMesh::interpToEB ( LevelData< BaseIVFAB< Real > > &  a_centroidData,
const LevelData< EBCellFAB > &  a_cellData,
const std::string &  a_realm,
const phase::which_phase  a_phase,
const int  a_level 
) const
noexcept

Interpolate data to EB centroids.

Parameters
[out]a_centroidDataEB-centered data
[in]a_cellDataCell-centered data to be interpolated
[in]a_realmRealm name
[in]a_phasePhase (gas or solid)
[in]a_levelGrid level

◆ interpToNewGrids() [1/3]

void AmrMesh::interpToNewGrids ( EBAMRCellData &  a_newData,
const EBAMRCellData &  a_oldData,
const phase::which_phase  a_phase,
const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel,
const EBCoarseToFineInterp::Type  a_type 
)

Interpolate data to new grids.

This is called when requiring data to be interpolated to new grids. Takes old data as argument and fills the new grid data with an interpolation of the old grid data.

Parameters
[out]a_newDataNew grid data.
[in]a_oldDataOld grid data.
[in]a_phasePhase on which we regrid.
[in]a_lminCoarsest level that did not change (but distribution may have changed).
[in]a_oldFinestLevelPrevious finest level.
[in]a_newFinestLevelNew finest level.
[in]a_typeInterpolation type

◆ interpToNewGrids() [2/3]

void AmrMesh::interpToNewGrids ( EBAMRIVData &  a_newData,
const EBAMRIVData &  a_oldData,
const phase::which_phase  a_phase,
const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel,
const EBCoarseToFineInterp::Type  a_type 
)

Interpolate data to new grids.

This is called when requiring data to be interpolated to new grids. Takes old data as argument and fills the new grid data with an interpolation of the old grid data.

Parameters
[out]a_newDataNew grid data.
[in]a_oldDataOld grid data.
[in]a_phasePhase on which we regrid.
[in]a_lminCoarsest level that did not change (but distribution may have changed).
[in]a_oldFinestLevelPrevious finest level.
[in]a_newFinestLevelNew finest level.
[in]a_typeInterpolation type

◆ interpToNewGrids() [3/3]

void AmrMesh::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.

This is called when requiring data to be interpolated to new grids. Takes old data as argument and fills the new grid data with an interpolation of the old grid data.

Parameters
[out]a_newDataNew grid data.
[in]a_oldDataOld grid data.
[in]a_lminCoarsest level that did not change (but distribution may have changed).
[in]a_oldFinestLevelPrevious finest level.
[in]a_newFinestLevelNew finest level.
[in]a_typeInterpolation type

◆ intersectParticlesBisectIF()

template<auto... OldPosition, typename P , typename Traits >
void AmrMesh::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.

Identical to intersectParticlesRaycastIF but the EB intersection test uses bisection rather than ray-casting. The container-owned position holds the trajectory end point; the start point is read from the payload columns selected by the OldPosition member-pointer pack.

Parameters
[in,out]a_activeParticlesParticles to be intersected with geometry.
[out]a_ebParticlesParticles that intersected the EB (cleared and remapped here).
[out]a_domainParticlesParticles that intersected the domain faces (cleared and remapped here).
[in]a_phasePhase where the input particles live.
[in]a_bisectionStepLength of the bisection step.
[in]a_deleteParticlesIf true, intersected particles are removed from a_activeParticles.
[in]a_nonDeletionModifierCallback applied to each intersected-but-not-deleted particle, given its home leaf and slot index (used e.g. to flag the original particle via a payload column).
Template Parameters
OldPositionPack of SpaceDim payload member pointers giving the particle's previous-position components.
PPayload type (deduced).
TraitsColumn descriptor (deduced).

◆ intersectParticlesRaycastIF()

template<auto... OldPosition, typename P , typename Traits >
void AmrMesh::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.

Iterates through the active particles and checks if they intersect the EB or the domain faces along their trajectory (oldPosition -> position). Particles that intersect are moved onto the intersection point and placed in a_ebParticles or a_domainParticles. The EB test uses the ray-casting method (assuming the implicit function is a signed distance function). The container-owned position holds the trajectory end point; the start point is read from the payload columns selected by the OldPosition member-pointer pack.

Parameters
[in,out]a_activeParticlesParticles to be intersected with geometry.
[out]a_ebParticlesParticles that intersected the EB (cleared and remapped here).
[out]a_domainParticlesParticles that intersected the domain faces (cleared and remapped here).
[in]a_phasePhase where the input particles live.
[in]a_toleranceTolerance.
[in]a_deleteParticlesIf true, intersected particles are removed from a_activeParticles.
[in]a_nonDeletionModifierCallback applied to each intersected-but-not-deleted particle, given its home leaf and slot index (used e.g. to flag the original particle via a payload column).
Template Parameters
OldPositionPack of SpaceDim payload member pointers giving the particle's previous-position components.
PPayload type (deduced).
TraitsColumn descriptor (deduced).

◆ nonConservativeDivergence() [1/2]

void AmrMesh::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.

This computes divNC(F) = sum(kappa*divC(F))/sum(kappa), where kappa*divC(F) is the finite-volume approximation to kappa*div(F) = int_A F*dA (and dA is in grid units, not physical units).

Parameters
[out]a_nonConsDivFThe non-conservative divergence.
[in]a_kappaDivFConservative divergence, not weighted by kappa.
[in]a_realmRealm where the data lives.
[in]a_phasePhase where the data lives.

◆ nonConservativeDivergence() [2/2]

void AmrMesh::nonConservativeDivergence ( LevelData< BaseIVFAB< Real > > &  a_nonConsDivF,
const LevelData< EBCellFAB > &  a_kappaDivF,
const int &  a_level,
const std::string &  a_realm,
const phase::which_phase a_phase 
) const
noexcept

Compute a non-conservative divergence.

This computes divNC(F) = sum(kappa*divC(F))/sum(kappa), where kappa*divC(F) is the finite-volume approximation to kappa*div(F) = int_A F*dA (and dA is in grid units, not physical units).

Parameters
[out]a_nonConsDivFThe non-conservative divergence.
[in]a_levelGrid level
[in]a_kappaDivFConservative divergence, not weighted by kappa.
[in]a_realmRealm where the data lives.
[in]a_phasePhase where the data lives.

◆ operator=() [1/2]

AmrMesh & AmrMesh::operator= ( const AmrMesh &&  a_other)
delete

Disallowed move assignment.

Parameters
[in]a_otherOther AmrMesh

◆ operator=() [2/2]

AmrMesh & AmrMesh::operator= ( const AmrMesh a_other)
delete

Disallowed copy assignment.

Parameters
[in]a_otherOther AmrMesh

◆ parseEbGhostCells()

void AmrMesh::parseEbGhostCells ( )
protected

Parse number of ghost cells for eb stuff.

Only matters for the grid generation step.

◆ parseMaxEbisBoxSize()

void AmrMesh::parseMaxEbisBoxSize ( )
protected

Parse the maximum permitted box size.

Only relevant for the grid generation step.

◆ parseRuntimeOptions()

void AmrMesh::parseRuntimeOptions ( )

Parse runtime options.

Note
Called by Driver as simulations progress.

◆ queryRealm()

bool AmrMesh::queryRealm ( const std::string &  a_realm) const

Query if a realm exists.

Parameters
[in]a_realmName of the realm.
Returns
True if the realm exists and false otherwise.

◆ reallocate() [1/8]

void AmrMesh::reallocate ( EBAMRBool &  a_data,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ reallocate() [2/8]

void AmrMesh::reallocate ( EBAMRCellData &  a_data,
const phase::which_phase  a_phase,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_phasePhase over the reallocation.
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ reallocate() [3/8]

void AmrMesh::reallocate ( EBAMRFluxData &  a_data,
const phase::which_phase  a_phase,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_phasePhase over the reallocation.
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ reallocate() [4/8]

void AmrMesh::reallocate ( EBAMRIFData &  a_data,
const phase::which_phase  a_phase,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_phasePhase over the reallocation.
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ reallocate() [5/8]

void AmrMesh::reallocate ( EBAMRIVData &  a_data,
const phase::which_phase  a_phase,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_phasePhase over the reallocation.
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ reallocate() [6/8]

void AmrMesh::reallocate ( MFAMRCellData &  a_data,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ reallocate() [7/8]

void AmrMesh::reallocate ( MFAMRFluxData &  a_data,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ reallocate() [8/8]

void AmrMesh::reallocate ( MFAMRIVData &  a_data,
const int  a_lmin 
) const

Reallocate data.

Parameters
[out]a_dataData to be reallocated
[in]a_lminThe lowest grid level that will be reallocated.

This will reallocate data for all grid levels lvl >= a_lmin.

◆ registerMask()

void AmrMesh::registerMask ( const std::string &  a_mask,
const int  a_buffer,
const std::string &  a_realm 
)

Register a boolean mask over a realm.

Parameters
[in]a_maskMask name to be registered.
[in]a_bufferRelevant buffer for the mask.
Note
The meaning of a_buffer differs for different masks.
Run-time errors will occur if the mask or realm do not exist.
Parameters
[in]a_realmRealm

◆ registerOperator()

void AmrMesh::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.

Parameters
[in]a_operatorOperator to be registered.
[in]a_realmRealm name
[in]a_phasePhase (gas or solid).
Note
Run-time errors will occur if the operator or realm do not exist.

◆ registerParticleGhostMask()

void AmrMesh::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.

Parameters
[in]a_realmRealm name
[in]a_widthGhost width (cells). Must be > 0.

◆ registerRealm()

void AmrMesh::registerRealm ( const std::string &  a_realm)

Register a new realm.

Parameters
[in]a_realmRealm name
Note
It is safe to re-register a realm.

◆ regridAmr()

void AmrMesh::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.

Parameters
[in]a_tagsCell tags which will generate the grid.
[in]a_lminCoarsest grid level allowed to change.
[in]a_hardcapGrid generation hardcap. If < 0 there are no limitations to grid depth.

◆ regridOperators() [1/2]

void AmrMesh::regridOperators ( const int  a_lmin)

Regrid AMR operators. This is done for all realms.

Parameters
[in]a_lminCoarsest grid level that changes.

◆ regridOperators() [2/2]

void AmrMesh::regridOperators ( const std::string &  a_realm,
const int  a_lmin 
)

Regrid AMR operators. This is done for a specific realm.

Parameters
[in]a_realmRealm
[in]a_lminCoarsest grid level that changes.

◆ regridRealm()

void AmrMesh::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.

Parameters
[in]a_realmRealm name
[in]a_procsProcessor IDs
[in]a_boxesGrid boxes
[in]a_lminCoarsest level that changes.

◆ remapToNewGrids()

template<typename P , typename Traits >
void AmrMesh::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.

Note
User needs to call ParticleContainer::preRegrid prior to this.
Parameters
[in,out]a_particlesSoA particle container to regrid.
[in]a_lminCoarsest level that did not change.
[in]a_newFinestLevelNew finest level.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ removeCoveredParticlesDiscrete()

template<typename P , typename Traits >
void AmrMesh::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, or irregular cells on the wrong side of every VoF's EB face (to within a_tolerance*dx).

Parameters
[in,out]a_particlesSoA particle data.
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance (multiplied by dx).
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ removeCoveredParticlesIF()

template<typename P , typename Traits >
void AmrMesh::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.

Parameters
[in,out]a_particlesSoA particle data.
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance (multiplied by dx).
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ removeCoveredParticlesVoxels()

template<typename P , typename Traits >
void AmrMesh::removeCoveredParticlesVoxels ( ParticleContainer< P, Traits > &  a_particles,
const phase::which_phase a_phase 
) const

Remove SoA particles that live in covered cells (voxel test).

Parameters
[in,out]a_particlesSoA particle data.
[in]a_phasePhase where the particles live.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ setBaseImplicitFunction()

void AmrMesh::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.

Parameters
[in]a_phasePhase
[in]a_baseIFThe level-set function describing the phase.

◆ setCoarsestGrid()

void AmrMesh::setCoarsestGrid ( const IntVect &  a_nCells)

Set the coarsest grid cells.

Parameters
[in]a_nCellsNumber of cells on the coarsest grid level

◆ setFinestLevel()

void AmrMesh::setFinestLevel ( const int  a_finestLevel)

Set the finest level.

Parameters
[in]a_finestLevel
Note
This is dangerous routine, but it's needed because Driver reads checkpoint files and needs to set the finest level from those.

◆ setGrids()

void AmrMesh::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.

Parameters
[in]a_boxesGrid boxes
[in]a_realmsAndLoadsRealm names and computational loads for realms

This will set the grids for AmrMesh and realms, load balancing the various realms with the provided loads.

◆ setMultifluidIndexSpace()

void AmrMesh::setMultifluidIndexSpace ( const RefCountedPtr< MultiFluidIndexSpace > &  a_multiFluidIndexSpace)

Sets multifluid index space.

Parameters
[in]a_multiFluidIndexSpaceMultifluid index space wrapper.

◆ slice() [1/2]

EBAMRCellData AmrMesh::slice ( const EBAMRCellData &  a_original,
const Interval  a_variables 
) const
noexcept

Slice cell-centered data in order to fetch a subset of components.

Parameters
[in]a_variablesVariables
Returns
Subset of variables. The first component in the returned data holder corresponds to a_variables.begin(), the last to a_variables.end()
Parameters
[in]a_originalOriginal

◆ slice() [2/2]

EBAMRCellData AmrMesh::slice ( EBAMRCellData &  a_original,
const Interval  a_variables 
) const
noexcept

Slice cell-centered data in order to fetch a subset of components.

Parameters
[in]a_variablesVariables
Returns
Subset of variables. The first component in the returned data holder corresponds to a_variables.begin(), the last to a_variables.end()
Parameters
[in]a_originalOriginal

◆ transferCoveredParticlesDiscrete()

template<typename P , typename Traits >
void AmrMesh::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 another.

Transfers particles in covered cells, or in irregular cells on the wrong side of every VoF's EB face (to within a_tolerance*dx).

Parameters
[in,out]a_particlesFromSource SoA container (transferred particles are removed from it).
[in,out]a_particlesToDestination SoA container.
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance (multiplied by dx).
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ transferCoveredParticlesIF()

template<typename P , typename Traits >
void AmrMesh::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_tolerance*dx.

Parameters
[in,out]a_particlesFromSource SoA container (transferred particles are removed from it).
[in,out]a_particlesToDestination SoA container.
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance (multiplied by dx).
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.
Note
Because the implicit functions are global, this works even if the particles aren't mapped to the correct boxes (remapping will be necessary afterwards).

◆ transferCoveredParticlesVoxels()

template<typename P , typename Traits >
void AmrMesh::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.

Parameters
[in,out]a_particlesFromSource SoA container (transferred particles are removed from it).
[in,out]a_particlesToDestination SoA container.
[in]a_phasePhase where the particles live.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

◆ transferIrregularParticles()

template<typename P , typename Traits >
void AmrMesh::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.

Per patch, a particle in an irregular cell is moved to a_dstParticles (placed on the EB) when it lies outside every VoF half-space of its cell. Uses swap-and-pop on the SoA leaves.

Parameters
[in,out]a_dstParticlesDestination SoA container.
[in,out]a_srcParticlesSource SoA container (transferred particles are removed from it).
[in]a_phasePhase where the particles live.
Template Parameters
PPayload type of the container.
TraitsColumn descriptor for the payload.

Member Data Documentation

◆ m_oldToNewCellCopiers

std::map<std::string, Vector<Copier> > AmrMesh::m_oldToNewCellCopiers
protected

Storage for copiers from the old grids to the new ones.

Note
Defined in the realm regrid routine. Cleared in the postRegrid routine.

◆ m_oldToNewEBCopiers

std::map<std::string, Vector<Copier> > AmrMesh::m_oldToNewEBCopiers
protected

Storage for copiers from the old grids to the new ones.

Note
Defined in the realm regrid routine. Cleared in the postRegrid routine.

◆ m_validGhostToValidGhostRealmCopiers

std::map<std::pair<std::string, std::string>, Vector<Copier> > AmrMesh::m_validGhostToValidGhostRealmCopiers
protected

Map for copying between various Realms. First index is the "from" realm and second index is the "to" realm.

Note
This is important at scale when you have > 1M boxes since Copier definitions become costly.

◆ m_validGhostToValidRealmCopiers

std::map<std::pair<std::string, std::string>, Vector<Copier> > AmrMesh::m_validGhostToValidRealmCopiers
protected

Map for copying between various Realms. First index is the "from" realm and second index is the "to" realm.

Note
This is important at scale when you have > 1M boxes since Copier definitions become costly.

◆ m_validToValidGhostRealmCopiers

std::map<std::pair<std::string, std::string>, Vector<Copier> > AmrMesh::m_validToValidGhostRealmCopiers
protected

Map for copying between various Realms. First index is the "from" realm and second index is the "to" realm.

Note
This is important at scale when you have > 1M boxes since Copier definitions become costly.

◆ m_validToValidRealmCopiers

std::map<std::pair<std::string, std::string>, Vector<Copier> > AmrMesh::m_validToValidRealmCopiers
protected

Map for copying between various Realms. First index is the "from" realm and second index is the "to" realm.

Note
This is important at scale when you have > 1M boxes since Copier definitions become costly.

The documentation for this class was generated from the following files: