chombo-discharge
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. More...
 
 AmrMesh (const AmrMesh &&a_other)=delete
 Disallowed move constructor. More...
 
virtual ~AmrMesh ()
 Destructor.
 
AmrMeshoperator= (const AmrMesh &a_other)=delete
 Disallowed copy assignment. More...
 
AmrMeshoperator= (const AmrMesh &&a_other)=delete
 Disallowed move assignment. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<typename T >
void deallocate (Vector< T * > &a_data) const
 Deallocate data. More...
 
template<typename T >
void deallocate (Vector< RefCountedPtr< T >> &a_data) const
 Deallocate smart pointer data. More...
 
template<typename T >
void deallocate (EBAMRData< T > &a_data) const
 Deallocate data. More...
 
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. More...
 
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. More...
 
template<typename T >
void allocate (Vector< RefCountedPtr< ParticleData< T >>> &a_particles, const std::string a_realm) const
 Template class for generic allocation of particle data. More...
 
template<typename T >
void allocate (ParticleContainer< T > &a_container, const std::string a_realm) const
 Template class for generic allocation of particle containers. More...
 
template<typename T >
void allocatePointer (Vector< RefCountedPtr< T >> &a_data) const
 Allocate pointer but not any memory blocks. More...
 
template<typename T >
void allocatePointer (Vector< RefCountedPtr< T >> &a_data, const int a_finestLevel) const
 Allocate pointer but not any memory blocks. More...
 
template<typename T >
void allocatePointer (EBAMRData< T > &a_data, const std::string a_realm) const
 Allocate pointer but not any memory blocks. More...
 
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. More...
 
EBAMRCellData slice (EBAMRCellData &a_original, const Interval a_variables) const noexcept
 Slice cell-centered data in order to fetch a subset of components. More...
 
const EBAMRCellData slice (const EBAMRCellData &a_original, const Interval a_variables) const noexcept
 Slice cell-centered data in order to fetch a subset of components. More...
 
void parseOptions ()
 Parse options. Called during the constructor.
 
void parseRuntimeOptions ()
 Parse runtime options. More...
 
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. More...
 
void registerMask (const std::string a_mask, const int a_buffer, const std::string a_realm)
 Register a boolean mask over a realm. More...
 
void buildDomains ()
 Build domains.
 
void setFinestLevel (const int a_finestLevel)
 Set the finest level. More...
 
void setCoarsestGrid (const IntVect &a_nCells)
 Set the coarsest grid cells.
 
bool queryRealm (const std::string a_realm) const
 Query if a realm exists. More...
 
bool getEbCf () const
 Check if mesh has an EBCF. More...
 
void registerRealm (const std::string a_realm)
 Register a new realm. More...
 
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. More...
 
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. More...
 
void alias (EBAMRCellData &a_data, const phase::which_phase a_phase, const MFAMRCellData &a_mfdata) const
 Alias an entire hiearchy of multifluid data. More...
 
void alias (EBAMRFluxData &a_data, const phase::which_phase a_phase, const MFAMRFluxData &a_mfdata) const
 Alias an entire hiearchy of multifluid data. More...
 
void alias (EBAMRIVData &a_data, const phase::which_phase a_phase, const MFAMRIVData &a_mfdata) const
 Alias an entire hiearchy of multifluid data. More...
 
EBAMRCellData alias (const phase::which_phase a_phase, const MFAMRCellData &a_mfdata) const
 Alias an entire hiearchy of multifluid data. More...
 
EBAMRFluxData alias (const phase::which_phase a_phase, const MFAMRFluxData &a_mfdata) const
 Alias an entire hiearchy of multifluid data. More...
 
EBAMRIVData alias (const phase::which_phase a_phase, const MFAMRIVData &a_mfdata) const
 Alias an entire hiearchy of multifluid data. More...
 
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. More...
 
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. More...
 
void computeGradient (MFAMRCellData &a_gradient, const MFAMRCellData &a_phi, const std::string a_realm) const
 Compute cell-centered gradient over an AMR hierarchy. More...
 
void computeGradient (MFAMRFluxData &a_gradient, const MFAMRCellData &a_phi, const std::string a_realm) const
 Compute face-centered gradient over an AMR hierarchy. More...
 
void allocate (EBAMRCellData &a_data, const std::string a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_nGhost=-1) const
 Allocate a data holder over a specific realm. More...
 
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_nGhost=-1) const
 Allocate data on specific level. More...
 
void allocate (EBAMRFluxData &a_data, const std::string a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_nGhost=-1) const
 Allocate a data holder over a specific realm. More...
 
void allocate (EBAMRIVData &a_data, const std::string a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_nGhost=-1) const
 Allocate a data holder over a specific realm. More...
 
void allocate (EBAMRIFData &a_data, const std::string a_realm, const phase::which_phase a_phase, const int a_nComp, const int a_nGhost=-1) const
 Allocate a data holder over a specific realm. More...
 
void allocate (EBAMRBool &a_data, const std::string a_realm, const int a_nComp, const int a_nGhost=-1) const
 Allocate Boolean data over a specific realm. More...
 
void allocate (MFAMRCellData &a_data, const std::string a_realm, const int a_nComp, const int a_nGhost=-1) const
 Allocate a data holder over a specific realm. More...
 
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. More...
 
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. More...
 
void reallocate (EBAMRCellData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data. More...
 
void reallocate (EBAMRFluxData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data. More...
 
void reallocate (EBAMRIVData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data. More...
 
void reallocate (EBAMRIFData &a_data, const phase::which_phase a_phase, const int a_lmin) const
 Reallocate data. More...
 
void reallocate (EBAMRBool &a_data, const int a_lmin) const
 Reallocate data. More...
 
void reallocate (MFAMRCellData &a_data, const int a_lmin) const
 Reallocate data. More...
 
void reallocate (MFAMRFluxData &a_data, const int a_lmin) const
 Reallocate data. More...
 
void reallocate (MFAMRIVData &a_data, const int a_lmin) const
 Reallocate data. More...
 
void average (MFAMRCellData &a_data, const std::string a_realm, const Average &a_average) const
 Average multifluid data over a specified realm. More...
 
void arithmeticAverage (MFAMRCellData &a_data, const std::string a_realm) const
 Arithmetic coarsening of multifluid data. More...
 
void harmonicAverage (MFAMRCellData &a_data, const std::string a_realm) const
 Harmonic coarsening of multifluid data. More...
 
void conservativeAverage (MFAMRCellData &a_data, const std::string a_realm) const
 Conservative coarsening of multifluid data. More...
 
void average (MFAMRFluxData &a_data, const std::string a_realm, const Average &a_average) const
 Average multifluid data over a specified realm. More...
 
void arithmeticAverage (MFAMRFluxData &a_data, const std::string a_realm) const
 Average multifluid data over a realm. More...
 
void harmonicAverage (MFAMRFluxData &a_data, const std::string a_realm) const
 Average multifluid data over a realm. More...
 
void conservativeAverage (MFAMRFluxData &a_data, const std::string a_realm) const
 Average down multifluid data over a realm. More...
 
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. More...
 
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. More...
 
void arithmeticAverage (EBAMRCellData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Arithmetic average of data. Does all components. More...
 
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. More...
 
void harmonicAverage (EBAMRCellData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Harmonic average of data. Does all components. More...
 
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. More...
 
void conservativeAverage (EBAMRCellData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Conseratively average data. Does all components. More...
 
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. More...
 
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. More...
 
void arithmeticAverage (EBAMRFluxData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Average down on specific realm and phase. More...
 
void harmonicAverage (EBAMRFluxData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Average down on specific realm and phase. More...
 
void conservativeAverage (EBAMRFluxData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Average down on specific realm and phase. More...
 
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. More...
 
void arithmeticAverage (EBAMRIVData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Arithmetic average on specific realm and phase. More...
 
void harmonicAverage (EBAMRIVData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Harmonic average on specific realm and phase. More...
 
void conservativeAverage (EBAMRIVData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Conservative averaging on specific realm and phase. More...
 
template<class P , const Real &(P::*)() const particleScalarField>
void depositParticles (EBAMRCellData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const bool a_forceIrregNGP=false)
 Deposit scalar particle quantities on the mesh. More...
 
template<class P , Real(P::*)() const particleScalarField>
void depositParticles (EBAMRCellData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const bool a_forceIrregNGP=false)
 Deposit scalar particle quantities on the mesh. More...
 
template<class P , const RealVect &(P::*)() const particleVectorField>
void depositParticles (EBAMRCellData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const bool a_forceIrregNGP=false)
 Deposit vector particle quantities on the mesh. More...
 
template<class P , RealVect(P::*)() const particleVectorField>
void depositParticles (EBAMRCellData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const bool a_forceIrregNGP=false)
 Deposit vector particle quantities on the mesh. More...
 
template<class P , const Real &(P::*)() const particleScalarField>
void depositParticles (EBAMRIVData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P > &a_particles) const noexcept
 Deposit scalar particle quantities on the mesh. More...
 
template<class P , Real(P::*)() const particleScalarField>
void depositParticles (EBAMRIVData &a_meshData, const std::string &a_realm, const phase::which_phase &a_phase, const ParticleContainer< P > &a_particles) const noexcept
 Deposit scalar particle quantities on the mesh. More...
 
template<class P , Real &(P::*)() particleScalarField>
void interpolateParticles (ParticleContainer< P > &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=false) const
 Interpolate a scalar field onto the particle position. More...
 
template<class P , RealVect &(P::*)() particleVectorField>
void interpolateParticles (ParticleContainer< P > &a_particles, const std::string &a_realm, const phase::which_phase &a_phase, const EBAMRCellData &a_meshVectorField, const DepositionType a_interpType, const bool a_forceIrregNGP=false) const
 Interpolate a vector field onto the particle position. More...
 
template<class P >
void removeCoveredParticlesIF (ParticleContainer< P > &a_particles, const phase::which_phase &a_phase, const Real a_tolerance=0.0) const
 Function which removes particles from the domain if they fall inside the EB. More...
 
template<class P >
void removeCoveredParticlesDiscrete (ParticleContainer< P > &a_particles, const phase::which_phase &a_phase, const Real a_tolerance=0.0) const
 Function which removes particles from the domain if they fall inside the EB. More...
 
template<class P >
void removeCoveredParticlesVoxels (ParticleContainer< P > &a_particles, const phase::which_phase &a_phase) const
 Function which removes particles from the domain if they fall inside the EB. More...
 
template<class P >
void transferCoveredParticlesIF (ParticleContainer< P > &a_particlesFrom, ParticleContainer< P > &a_particlesTo, const phase::which_phase &a_phase, const Real a_tolerance=0.0) const
 Function which transferse particles from one particle container to another if they fall inside the EB. More...
 
template<class P >
void transferCoveredParticlesDiscrete (ParticleContainer< P > &a_particlesFrom, ParticleContainer< P > &a_particlesTo, const phase::which_phase &a_phase, const Real a_tolerance=0.0) const
 Function which transferse particles from one particle container to another if they fall inside the EB. More...
 
template<class P >
void transferCoveredParticlesVoxels (ParticleContainer< P > &a_particlesFrom, ParticleContainer< P > &a_particlesTo, const phase::which_phase &a_phase) const
 Function which transferse particles from one particle container to another if they fall inside the EB. More...
 
template<class P >
void transferIrregularParticles (ParticleContainer< P > &a_dstParticles, ParticleContainer< P > &a_srcParticles, const phase::which_phase a_phase, const std::function< void(P &)> a_transferModifier=[](P &) -> void { return;}) const noexcept
 Transfer particles that are on the wrong side of the EB to a different container. More...
 
template<class P >
void intersectParticlesRaycastIF (ParticleContainer< P > &a_activeParticles, ParticleContainer< P > &a_ebParticles, ParticleContainer< P > &a_domainParticles, const phase::which_phase a_phase, const Real a_tolerance, const bool a_deleteParticles, const std::function< void(P &)> a_nonDeletionModifier=[](P &) -> void { return;}) const noexcept
 Particle intersection algorithm based on ray-casting. More...
 
template<class P >
void intersectParticlesBisectIF (ParticleContainer< P > &a_activeParticles, ParticleContainer< P > &a_ebParticles, ParticleContainer< P > &a_domainParticles, const phase::which_phase a_phase, const Real a_bisectionStep, const bool a_deleteParticles, const std::function< void(P &)> a_nonDeletionModifier=[](P &) -> void { return;}) const noexcept
 Particle intersection algorithm based on bisection. More...
 
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. More...
 
void interpGhost (LevelData< EBCellFAB > &a_fineData, const LevelData< EBCellFAB > &a_coarData, const int a_level, 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. More...
 
void interpGhost (MFAMRCellData &a_data, const std::string a_realm) const
 Interpolate ghost cells over a realm. Calls the default ghost cell interpolation method. More...
 
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) More...
 
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) More...
 
void interpGhostMG (MFAMRCellData &a_data, const std::string a_realm) const
 Interpolate ghost cells over a realm and phase. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<class P >
void remapToNewGrids (ParticleContainer< P > &a_particles, const int a_lmin, const int a_newFinestLevel) const noexcept
 Regrid particle to new grids. More...
 
void interpToCentroids (EBAMRCellData &a_data, const std::string a_realm, const phase::which_phase a_phase) const
 Interpolate data to centroids on realm and phase. More...
 
void interpToCentroids (LevelData< EBCellFAB > &a_data, const std::string a_realm, const phase::which_phase a_phase, const int a_level) const
 Interpolate data to centroids. More...
 
void setMultifluidIndexSpace (const RefCountedPtr< MultiFluidIndexSpace > &a_multiFluidIndexSpace)
 Sets multifluid index space. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void regridOperators (const int a_lmin)
 Regrid AMR operators. This is done for all realms. More...
 
void regridOperators (const std::string a_realm, const int a_lmin)
 Regrid AMR operators. This is done for a specific realm. More...
 
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 getBlockingFactor () const
 Get blocking factor (i.e. the smallest possible box).
 
int getMaxBoxSize () const
 Get maximum permitted box size.
 
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-left 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. More...
 
const RefCountedPtr< BaseIF > & getBaseImplicitFunction (const phase::which_phase a_phase) const
 Get implicit function for a specific phase. More...
 
const Vector< DisjointBoxLayout > & getProxyGrids () const
 Get the "proxy" grids in AmrMesh. More...
 
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. More...
 
const AMRMaskgetValidCells (const std::string a_realm) const
 Get a map of all valid cells on a specified realm. More...
 
const Vector< RefCountedPtr< LevelTiles > > & getLevelTiles (const std::string a_realm) const
 Get the tiled space representation. More...
 
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. More...
 
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. More...
 
const Vector< EBISLayout > & getEBISLayout (const std::string a_realm, const phase::which_phase a_phase) const
 Get EBISLayouts for a Realm and phase. More...
 
const Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrid (const std::string a_realm) const
 Get EBISLayouts for a Realm. More...
 
Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getVofIterator (const std::string a_realm, const phase::which_phase a_phase) const
 Get vof iterators for a Realm and phase. This has the capability of iterating through cut-cells. More...
 
const EBAMRFABgetLevelset (const std::string a_realm, const phase::which_phase a_phase) const
 Get levelset function, allocated over a grid for a Realm and phase. More...
 
EBAMRParticleMeshgetParticleMesh (const std::string a_realm, const phase::which_phase a_phase) const
 Get EBAMRParticleMesh operator. More...
 
EBAMRSurfaceDepositiongetSurfaceDeposition (const std::string a_realm, const phase::which_phase a_phase) const
 Get EBAMRSurfaceDeposition surface deposition operator. More...
 
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. More...
 
Vector< RefCountedPtr< EBCoarseToFineInterp > > & getFineInterp (const std::string a_realm, const phase::which_phase a_phase) const
 Get interpolator. More...
 
Vector< RefCountedPtr< EBReflux > > & getFluxRegister (const std::string a_realm, const phase::which_phase a_phase) const
 Get flux register. More...
 
Vector< RefCountedPtr< EBFluxRedistribution > > & getRedistributionOp (const std::string a_realm, const phase::which_phase a_phase) const
 Get the redistribution operators. More...
 
const IrregAmrStencil< CentroidInterpolationStencil > & getCentroidInterpolationStencils (const std::string a_realm, const phase::which_phase a_phase) const
 Get interpolation stencils for going from cell center to cell centroid. More...
 
const IrregAmrStencil< EbCentroidInterpolationStencil > & getEbCentroidInterpolationStencils (const std::string a_realm, const phase::which_phase a_phase) const
 Get interpolation stencils for going from cell center to cell boundary centroid. More...
 
const IrregAmrStencil< NonConservativeDivergenceStencil > & getNonConservativeDivergenceStencils (const std::string a_realm, const phase::which_phase a_phase) const
 Get the nonconservative divergence stencils. More...
 
std::vector< std::string > getRealms () const
 Get the name of all Realms. More...
 
BoxSorting getBoxSorting () const
 Get box sorting method. More...
 
RefCountedPtr< EBIndexSpace > & getEBIndexSpace (const phase::which_phase a_phase)
 Get EBIndexSpace corresponding to a particular phase. More...
 

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. More...
 
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 parseMaxBoxSize ()
 Parse the maximum permitted box size.
 
void parseMaxEbisBoxSize ()
 Parse the maximum permitted box size. More...
 
void parseBlockingFactor ()
 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. More...
 
void parseNumGhostCells ()
 Parse the number of ghost cells.
 
void parseMultigridInterpolator ()
 Parse settings for the multigrid interpolator.
 
void parseRedistributionRadius ()
 Parse the default redistribution radius.
 
void parseCentroidStencils ()
 Parse centroid interpolation stencils.
 
void parseEbCentroidStencils ()
 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. More...
 

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. More...
 
std::map< std::string, Vector< Copier > > m_oldToNewEBCopiers
 Storage for copiers from the old grids to the new ones. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
GridGenerationMethod m_gridGenerationMethod
 Grid generation method.
 
BoxSorting m_boxSort
 Box sorting.
 
RefCountedPtr< MultiFluidIndexSpacem_multifluidIndexSpace
 MultiFluidIndexSpace.
 
IrregStencil::StencilType m_stencilType
 Stencil type.
 
IrregStencil::StencilType m_centroidStencilType
 Stencil type for centroid interpolation.
 
IrregStencil::StencilType m_ebCentroidStencilType
 Stencil type for EB 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_maxBoxSize
 Max box size.
 
int m_maxEbisBoxSize
 Maximum box size for EBIS generation.
 
int m_bufferSizeBR
 Set buffer size.
 
int m_blockingFactor
 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.
 
int m_centroidStencilOrder
 Order for interpolation stencils to centroids.
 
int m_centroidStencilRadius
 Radius for centroid interpolation stencil.
 
int m_ebCentroidStencilOrder
 Order for interpolation stencilst to EB.
 
int m_ebCentroidStencilRadius
 Radius for EB interpolation stencil.
 
int m_irregStenOrder
 Stencil order for irregular stencils.
 
int m_irregStenRadius
 radius for irregular stencils
 
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 hiearchy 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 hiearchy 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 hiearchy 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 hiearchy 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 hiearchy 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 hiearchy 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_nGhost = -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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 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_nGhost = -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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [3/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_nGhost = -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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [4/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_nGhost = -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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [5/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_nGhost = -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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [6/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_nGhost = -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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [7/11]

void AmrMesh::allocate ( MFAMRCellData a_data,
const std::string  a_realm,
const int  a_nComp,
const int  a_nGhost = -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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [8/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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [9/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_nGhostNumber of ghost cells for a_data
Note
If a_nGhost < 0, this routine will use the default number of ghost cells.

◆ allocate() [10/11]

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

Template class for generic allocation of particle containers.

Parameters
[out]a_containerParticle container to be allocated
[out]a_realmRealm on which the particles will be allocated.

◆ allocate() [11/11]

template<typename T >
void AmrMesh::allocate ( Vector< RefCountedPtr< ParticleData< T >>> &  a_particles,
const std::string  a_realm 
) const

Template class for generic allocation of particle data.

Parameters
[out]a_particlesParticle data holder.
[out]a_realmRealm on which the particles will be allocated.

◆ 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.

◆ depositParticles() [1/6]

template<class P , const RealVect &(P::*)() const particleVectorField>
void AmrMesh::depositParticles ( EBAMRCellData a_meshData,
const std::string &  a_realm,
const phase::which_phase &  a_phase,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const CoarseFineDeposition  a_coarseFineDeposition,
const bool  a_forceIrregNGP = false 
)

Deposit scalar particle quantities on the mesh.

This routine will switch between various algorithms depending on the user input. If the user chooses to deposit with "halos" near the refinement boundaries then this function requires the "halo" particles to be filled before entering this routine. Thus, if depositing with halos (which requires kernels with 2x or 4x the particle width), the user must first call ParticleContainer::copyMaskParticles(AMRMask). If the user does not do this, he will lose mass near the refinement boundaries. Other than that, this function is just like regular particle-mesh deposition. The mesh field should have exactly one component and the quantity to be deposited is fetched from the specified template parameter 'a_particleScalarField'. This should be a pointer to a member function with signature const Real& P::function() const. E.g. if we are depositing mass through a function const Real& P::mass() const we will specifiy

interpolate<P, &P::mass> (...)

To deposit a different quantity, simply change the function pointer in the input parameter.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositParticles() [2/6]

template<class P , Real(P::*)() const particleScalarField>
void AmrMesh::depositParticles ( EBAMRCellData a_meshData,
const std::string &  a_realm,
const phase::which_phase &  a_phase,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const CoarseFineDeposition  a_coarseFineDeposition,
const bool  a_forceIrregNGP = false 
)

Deposit scalar particle quantities on the mesh.

Precisely like the above function, except that the function signature is Real P::particleScalarField() const (C++ is not too smart about these things)

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositParticles() [3/6]

template<class P , const RealVect &(P::*)() const particleVectorField>
void AmrMesh::depositParticles ( EBAMRCellData a_meshData,
const std::string &  a_realm,
const phase::which_phase &  a_phase,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const CoarseFineDeposition  a_coarseFineDeposition,
const bool  a_forceIrregNGP = false 
)

Deposit vector particle quantities on the mesh.

This routine will switch between various algorithms depending on the user input. If the user chooses to deposit with "halos" near the refinement boundaries then this function requires the "halo" particles to be filled before entering this routine. Thus, if depositing with halos (which requires kernels with 2x or 4x the particle width), the user must first call ParticleContainer::copyMaskParticles(AMRMask). If the user does not do this, he will lose mass near the refinement boundaries. Other than that, this function is just like regular particle-mesh deposition. The mesh field should have exactly SpaceDim components and the quantity to be deposited is fetched from the specified template parameter 'a_particleVectorField'. This should be a pointer to a member function with signature const RealVect& P::function() const. E.g. if we are depositing current through a function const RealVect& P::current() const we will specifiy

interpolate<P, &P::current> (...)

To deposit a different quantity, simply change the function pointer in the input parameter.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositParticles() [4/6]

template<class P , RealVect(P::*)() const particleVectorField>
void AmrMesh::depositParticles ( EBAMRCellData a_meshData,
const std::string &  a_realm,
const phase::which_phase &  a_phase,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const CoarseFineDeposition  a_coarseFineDeposition,
const bool  a_forceIrregNGP = false 
)

Deposit vector particle quantities on the mesh.

Precisely like the above function, except that the function signature is RealVect P::particleVectorField() const (C++ is not too smart about these things)

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositParticles() [5/6]

template<class P , Real(P::*)() const particleScalarField>
void AmrMesh::depositParticles ( EBAMRIVData a_meshData,
const std::string &  a_realm,
const phase::which_phase &  a_phase,
const ParticleContainer< P > &  a_particles 
) const
noexcept

Deposit scalar particle quantities on the mesh.

Usage has signature depositParticles<P, &P::mass> (...)

To deposit a different quantity, simply change the function pointer in the input parameter.

Parameters
[out]a_meshDataMesh data. MUST have exactly one compnent.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesParticle container. Must be in "usable state" for deposition.

◆ depositParticles() [6/6]

template<class P , Real(P::*)() const particleScalarField>
void AmrMesh::depositParticles ( EBAMRIVData a_meshData,
const std::string &  a_realm,
const phase::which_phase &  a_phase,
const ParticleContainer< P > &  a_particles 
) const
noexcept

Deposit scalar particle quantities on the mesh.

Usage has signature depositParticles<P, &P::mass> (...)

To deposit a different quantity, simply change the function pointer in the input parameter.

Parameters
[out]a_meshDataMesh data. MUST have exactly one compnent.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_particlesParticle container. Must be in "usable state" for deposition.

◆ getBaseImplicitFunction()

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

Get implicit function for a specific phase.

Parameters
[in]a_phasePhase 8gas or solid)

◆ getBoxSorting()

BoxSorting AmrMesh::getBoxSorting ( ) const

Get box sorting method.

Returns
Box sorting method.

◆ getCentroidInterpolationStencils()

const IrregAmrStencil< CentroidInterpolationStencil > & AmrMesh::getCentroidInterpolationStencils ( const std::string  a_realm,
const phase::which_phase  a_phase 
) const

Get interpolation stencils for going from cell center to cell centroid.

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

◆ getEbCentroidInterpolationStencils()

const IrregAmrStencil< EbCentroidInterpolationStencil > & AmrMesh::getEbCentroidInterpolationStencils ( const std::string  a_realm,
const phase::which_phase  a_phase 
) const

Get interpolation stencils for going from cell center to cell boundary centroid.

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

◆ getEbCf()

bool AmrMesh::getEbCf ( ) const

Check if mesh has an EBCF.

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

◆ 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)

◆ 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)

◆ 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)

◆ 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)

◆ 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)

◆ 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)

◆ 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)

◆ getLevelTiles()

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

Get the tiled space representation.

Parameters
[in]a_realmRealm name

◆ 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

◆ getMFLevelGrid()

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

Get EBISLayouts for a Realm.

Parameters
[in]a_realmRealm name

◆ 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)

◆ getNonConservativeDivergenceStencils()

const IrregAmrStencil< NonConservativeDivergenceStencil > & AmrMesh::getNonConservativeDivergenceStencils ( const std::string  a_realm,
const phase::which_phase  a_phase 
) const

Get the nonconservative divergence stencils.

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

◆ 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)

◆ getProxyGrids()

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

Get the "proxy" grids in AmrMesh.

Returns m_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)

◆ 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.

◆ 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)

◆ 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

◆ getVofIterator()

Vector< RefCountedPtr< LayoutData< VoFIterator > > > & AmrMesh::getVofIterator ( const std::string  a_realm,
const phase::which_phase  a_phase 
) const

Get vof iterators for a Realm and phase. This has the capability of iterating through cut-cells.

Not const because we need to reset the vofiterator

◆ 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_level,
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_levelThe 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
[in]a_phasePhase (gas or solid)

◆ 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
[in]a_phasePhase (gas or solid)

◆ interpolateParticles() [1/2]

template<class P , RealVect &(P::*)() particleVectorField>
void AmrMesh::interpolateParticles ( ParticleContainer< P > &  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 = false 
) const

Interpolate a scalar field onto the particle position.

This is just like regular particle-mesh interpolation. The input field should have exactly one component and the the field will be interpolated onto the template parameter's input field. The template parameter 'particleScalarField' should be a pointer to a member function which will set the particle field. E.g. the function must have a signature Real& P::particleScalarField(). A valid expression is e.g.

interpolate<P, &P::mass> (...)

To interpolate onto a different field, replace ::mass by the other scalar field.

Parameters
[in,out]a_particlesParticles to be interpolated.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_meshScalarFieldScalar field on the mesh
[in]a_interpTypeInterpolation type.
[in]a_forceIrregNGPForce NGP interpolation in cut-cells.

◆ interpolateParticles() [2/2]

template<class P , RealVect &(P::*)() particleVectorField>
void AmrMesh::interpolateParticles ( ParticleContainer< P > &  a_particles,
const std::string &  a_realm,
const phase::which_phase &  a_phase,
const EBAMRCellData a_meshVectorField,
const DepositionType  a_interpType,
const bool  a_forceIrregNGP = false 
) const

Interpolate a vector field onto the particle position.

This is just like regular particle-mesh interpolation. The input field should have exactly SpaceDim components and the the field will be interpolated onto the template parameter's input field. The template parameter 'particleVectorField' should be a pointer to a member function which will set the particle field. E.g. the function must have a signature RealVect& P::particleVectorField(). A valid expression is e.g.

interpolate<P, &P::velocity> (...)

To interpolate onto a different field, replace ::velocity by another vector field.

Parameters
[in,out]a_particlesParticles to be interpolated.
[in]a_realmRealm where data is registered.
[in]a_phasePhase where data is registered.
[in]a_meshScalarFieldScalar field on the mesh
[in]a_interpTypeInterpolation type.
[in]a_forceIrregNGPForce NGP interpolation in cut-cells.

◆ interpToCentroids() [1/2]

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

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/2]

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

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

◆ 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<class P >
void AmrMesh::intersectParticlesBisectIF ( ParticleContainer< P > &  a_activeParticles,
ParticleContainer< P > &  a_ebParticles,
ParticleContainer< P > &  a_domainParticles,
const phase::which_phase  a_phase,
const Real  a_bisectionStep,
const bool  a_deleteParticles,
const std::function< void(P &)>  a_nonDeletionModifier = [](P&) -> void { return; } 
) const
noexcept

Particle intersection algorithm based on bisection.

This routine will iterate through all the particles and check if they intersect the geometry. The template parameter indicates the particle type – it MUST have const RealVec& position() const and const RealVect& oldPosition() const functions that determine the start and stop position of the particle trajectory. This routine uses a bisection method to check for intersections with the EB (the domain side is much easier). Their position are updated and they are placed in the a_ebParticles argument.

Parameters
[in,out]a_activeParticlesParticles to be intersected with geometry
[out]a_ebParticlesParticles that intersected with the EB
[out]a_domainParticlesParticles that intersected with the domain faces
[in]a_phasePhase where the input particles live
[in]a_bisectionStepLength of the bisection step
[in]a_deleteParticlesIf true, particles will be removed from a_activeParticles if they intersect the geometry.
[in]a_nonDeletionModifierOptional input argument for letting the user manipulate particles that were intersected but not deleted

◆ intersectParticlesRaycastIF()

template<class P >
void AmrMesh::intersectParticlesRaycastIF ( ParticleContainer< P > &  a_activeParticles,
ParticleContainer< P > &  a_ebParticles,
ParticleContainer< P > &  a_domainParticles,
const phase::which_phase  a_phase,
const Real  a_tolerance,
const bool  a_deleteParticles,
const std::function< void(P &)>  a_nonDeletionModifier = [](P&) -> void { return; } 
) const
noexcept

Particle intersection algorithm based on ray-casting.

This routine will iterate through all the particles and check if they intersect the geometry. The template parameter indicates the particle type – it MUST have const RealVec& position() const and const RealVect& oldPosition() const functions that determine the start and stop position of the particle trajectory. This routine uses a ray-casting method to check for intersections with the EB (the domain side is much easier). If the particles are closer to the EB than a_tolerance, they are absorbed and placed on the EB. Their position are updated and they are placed in the a_ebParticles argument. This routine uses a ray-casting method where it computes the distance from the EB (assuming that the implicit function is a signed distance function). Particles are then moved that distance along their trajectory and we then update the new distance to the EB. This is done recursively until the particles have either moved the entire length or been absorbed by the EB or domain side.

Parameters
[in,out]a_activeParticlesParticles to be intersected with geometry
[out]a_ebParticlesParticles that intersected with the EB
[out]a_domainParticlesParticles that intersected with the domain faces
[in]a_phasePhase where the input particles live
[in]a_bisectionStepLength of the bisection step
[in]a_deleteParticlesIf true, particles will be removed from a_activeParticles if they intersect the geometry.
[in]a_nonDeletionModifierOptional input argument for letting the user manipulate particles that were intersected but not deleted

◆ 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_phasePhase (gas or solid).
[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.

◆ 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.

◆ 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<class P >
void AmrMesh::remapToNewGrids ( ParticleContainer< P > &  a_particles,
const int  a_lmin,
const int  a_newFinestLevel 
) const
noexcept

Regrid particle to new grids.

Note
User needs to call ParticleContainer<P>::preRegrid prior to this.
Parameters
[in]a_lminCoarsest level that did not change (but distribution may have changed).
[in]a_newFinestLevelNew finest level.

◆ removeCoveredParticlesDiscrete()

template<class P >
void AmrMesh::removeCoveredParticlesDiscrete ( ParticleContainer< P > &  a_particles,
const phase::which_phase &  a_phase,
const Real  a_tolerance = 0.0 
) const

Function which removes particles from the domain if they fall inside the EB.

The template parameter indicate the particle type – it MUST have a const RealVect& P::position() const function.

This version uses the discrete information to evaluate whether or not the particles are inside the EB. The particles will be removed from the container if they lie within a covered cell OR if they lie in an irregular cell but on the "wrong" side of the EB face (to within precision tolerance*dx)

Parameters
[in,out]a_particlesParticle data
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance when to remove particles
Note
This function will only work if the particles are mapped to the correct EBISBox.

◆ removeCoveredParticlesIF()

template<class P >
void AmrMesh::removeCoveredParticlesIF ( ParticleContainer< P > &  a_particles,
const phase::which_phase &  a_phase,
const Real  a_tolerance = 0.0 
) const

Function which removes particles from the domain if they fall inside the EB.

The template parameter indicate the particle type – it MUST have a const RealVect& P::position() const function.

This version uses the implicit function to evaluate whether or not the particles are inside the EB. The particles will be removed from the container if f(x) > a_tolerance*dx.

Parameters
[in,out]a_particlesParticle data
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance.
Note
Because the implicit functions are global, this function will work even if the particles aren't mapped to the correct EBISBox.

◆ removeCoveredParticlesVoxels()

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

Function which removes particles from the domain if they fall inside the EB.

The template parameter indicate the particle type – it must have a const RealVect& P::position() function.

This version removes all particles that live in covered cells.

Parameters
[in,out]a_particlesParticle data
[in]a_phasePhase where the particles live.
Note
This function will only work if the particles are mapped to the correct EBISBox.

◆ 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.

◆ 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]

const 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_otherOriginal data
[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()

◆ 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_otherOriginal data
[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()

◆ transferCoveredParticlesDiscrete()

template<class P >
void AmrMesh::transferCoveredParticlesDiscrete ( ParticleContainer< P > &  a_particlesFrom,
ParticleContainer< P > &  a_particlesTo,
const phase::which_phase &  a_phase,
const Real  a_tolerance = 0.0 
) const

Function which transferse particles from one particle container to another if they fall inside the EB.

The template parameter indicate the particle type – it MUST have a const RealVect& P::position() const function.

This version uses the discrete information to evaluate whether or not the particles are inside the EB. The particles will be transferred from the container if they lie within a covered cell OR if they lie in an irregular cell but on the "wrong" side of the EB face (to within precision tolerance*dx)

Parameters
[in,out]a_particlesFromContainer to transfer from
[in,out]a_particlesToContainer to transfer to
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance.
Note
This function will only work if the particles are mapped to the correct EBISBox.

◆ transferCoveredParticlesIF()

template<class P >
void AmrMesh::transferCoveredParticlesIF ( ParticleContainer< P > &  a_particlesFrom,
ParticleContainer< P > &  a_particlesTo,
const phase::which_phase &  a_phase,
const Real  a_tolerance = 0.0 
) const

Function which transferse particles from one particle container to another if they fall inside the EB.

The template parameter indicate the particle type – it MUST have a const RealVect& P::position() const function.

This version uses the implicit function to evaluate whether or not the particles are inside the EB. The particles will be transferred from the container if f(x) > a_tolerance*dx.

Parameters
[in,out]a_particlesFromContainer to transfer from
[in,out]a_particlesToContainer to transfer to
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance (Note: relative to grid resolution)
Note
Because the implicit functions are global, this function will work even if the particles aren't mapped to the correct boxes (but remapping will be necessary)

◆ transferCoveredParticlesVoxels()

template<class P >
void AmrMesh::transferCoveredParticlesVoxels ( ParticleContainer< P > &  a_particlesFrom,
ParticleContainer< P > &  a_particlesTo,
const phase::which_phase &  a_phase 
) const

Function which transferse particles from one particle container to another if they fall inside the EB.

The template parameter indicate the particle type – it MUST have a const RealVect& P::position() const function.

This version transfers all particles that live in covered cells.

Parameters
[in,out]a_particlesFromContainer to transfer from
[in,out]a_particlesToContainer to transfer to
[in]a_phasePhase where the particles live.
[in]a_toleranceTolerance.
Note
This function will only work if the particles are mapped to the correct EBISBox.

◆ transferIrregularParticles()

template<class P >
void AmrMesh::transferIrregularParticles ( ParticleContainer< P > &  a_dstParticles,
ParticleContainer< P > &  a_srcParticles,
const phase::which_phase  a_phase,
const std::function< void(P &)>  a_transferModifier = [](P&) -> void { return; } 
) const
noexcept

Transfer particles that are on the wrong side of the EB to a different container.

Parameters
[in,out]a_dstParticlesDestination particle container
[in,out]a_srcParticlesSource particle container
[in]a_phasePhase where the particles should live
[in]a_transferModifierOptional input argument for letting the user manipulate particles that were transferred

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: