Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::EB2::Level Class Reference

#include <AMReX_EB2_Level.H>

Inheritance diagram for amrex::EB2::Level:
amrex::EB2::GShopLevel< ChkptFile > amrex::EB2::GShopLevel< STLtools > amrex::EB2::GShopLevel< G > amrex::EB2::ChkptFileLevel amrex::EB2::STLLevel

Classes

struct  FCData
 Face-centered EB data storage structure. More...

Public Member Functions

bool isAllRegular () const noexcept
bool isOK () const noexcept
void fillEBCellFlag (FabArray< EBCellFlagFab > &cellflag, const Geometry &geom) const
 Fill cellflag with EBCellFlag data using geometry geom.
void fillVolFrac (MultiFab &vfrac, const Geometry &geom) const
 Populate volume fractions into vfrac using geom.
void fillCentroid (MultiCutFab &centroid, const Geometry &geom) const
 Populate cut-cell centroids into a MultiCutFab.
void fillCentroid (MultiFab &centroid, const Geometry &geom) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void fillBndryArea (MultiCutFab &bndryarea, const Geometry &geom) const
 Populate boundary-face areas into bndryarea.
void fillBndryArea (MultiFab &bndryarea, const Geometry &geom) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void fillBndryCent (MultiCutFab &bndrycent, const Geometry &geom) const
 Populate boundary centroids into bndrycent.
void fillBndryCent (MultiFab &bndrycent, const Geometry &geom) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void fillBndryNorm (MultiCutFab &bndrynorm, const Geometry &geom) const
 Populate boundary normals into bndrynorm.
void fillBndryNorm (MultiFab &bndrynorm, const Geometry &geom) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void fillAreaFrac (Array< MultiCutFab *, 3 > const &areafrac, const Geometry &geom) const
 Populate face area fractions for each direction.
void fillAreaFrac (Array< MultiFab *, 3 > const &areafrac, const Geometry &geom) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void fillFaceCent (Array< MultiCutFab *, 3 > const &facecent, const Geometry &geom) const
 Populate face centroids for each direction.
void fillFaceCent (Array< MultiFab *, 3 > const &facecent, const Geometry &geom) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void fillEdgeCent (Array< MultiCutFab *, 3 > const &edgecent, const Geometry &geom) const
 Populate edge centroids for each direction.
void fillEdgeCent (Array< MultiFab *, 3 > const &edgecent, const Geometry &geom) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void fillLevelSet (MultiFab &levelset, const Geometry &geom) const
 Write the implicit function values into levelset.
const BoxArray & boxArray () const noexcept
const DistributionMapping & DistributionMap () const noexcept
 Level (IndexSpace const *is, const Geometry &geom)
 Construct a Level bound to EB index space is and Geometry geom.
void prepareForCoarsening (const Level &rhs, int max_grid_size, IntVect const &ngrow)
 Prepare for coarsening by copying from rhs, respecting max grid size and grow vector.
const Geometry & Geom () const noexcept
IndexSpace const * getEBIndexSpace () const noexcept
IntVect const & nGrowVect () const noexcept
void write_to_chkpt_file (const std::string &fname, bool extend_domain_face, int max_grid_size) const
 Write this level’s EB data to a checkpoint file fname.
bool hasEBInfo () const noexcept
void fillCutCellMask (iMultiFab &cutcellmask, const Geometry &geom) const
 Populate the cut-cell mask into cutcellmask.
void setShift (int direction, int ncells)
 Shift this level by ncells cells along direction direction (for periodic tiling).
bool hasFCData (int face_dir) const noexcept
 Check if face-centered data is available for face_dir (0=x, 1=y, 2=z).
const FCData & getFCData (int face_dir) const
 Get reference to face-centered data for face_dir (0=x, 1=y, 2=z).
void fillVolFracFC (MultiFab &vfrac, int face_dir, const Geometry &geom) const
 Fill face-centered volume fractions for face_dir.
void fillAreaFracFC (Array< MultiFab *, 3 > const &areafrac, int face_dir, const Geometry &geom) const
 Fill face-centered area fractions for face_dir.
void fillAreaFracFC (Array< MultiCutFab *, 3 > const &areafrac, int face_dir, const Geometry &geom) const
void fillCentroidFC (MultiFab &centroid, int face_dir, const Geometry &geom) const
 Fill face-centered centroids for face_dir.
void fillCentroidFC (MultiCutFab &centroid, int face_dir, const Geometry &geom) const
void fillBndryAreaFC (MultiFab &bndryarea, int face_dir, const Geometry &geom) const
 Fill face-centered boundary areas for face_dir.
void fillBndryAreaFC (MultiCutFab &bndryarea, int face_dir, const Geometry &geom) const
void fillBndryCentFC (MultiFab &bndrycent, int face_dir, const Geometry &geom) const
 Fill face-centered boundary centroids for face_dir.
void fillBndryCentFC (MultiCutFab &bndrycent, int face_dir, const Geometry &geom) const
void fillBndryNormFC (MultiFab &bndrynorm, int face_dir, const Geometry &geom) const
 Fill face-centered boundary normals for face_dir.
void fillBndryNormFC (MultiCutFab &bndrynorm, int face_dir, const Geometry &geom) const
void fillEBCellFlagFC (FabArray< EBCellFlagFab > &cellflag, int face_dir, const Geometry &geom) const
 Fill face-centered EBCellFlags for face_dir.
void fillFaceCentFC (Array< MultiFab *, 3 > const &facecent, int face_dir, const Geometry &geom) const
 Fill face-centered face centroids for face_dir.
void fillFaceCentFC (Array< MultiCutFab *, 3 > const &facecent, int face_dir, const Geometry &geom) const
void fillEdgeCentFC (Array< MultiFab *, 3 > const &edgecent, int face_dir, const Geometry &geom) const
 Fill face-centered edge centroids for face_dir.
void fillEdgeCentFC (Array< MultiCutFab *, 3 > const &edgecent, int face_dir, const Geometry &geom) const
int coarsenFromFine (Level &fineLevel, bool fill_boundary)
 Coarsen EB data from fineLevel into this level.
void buildCellFlag ()
 Build EBCellFlag data from the current implicit function field.
void buildCellFlagFC (int face_dir)
 Build the face-centered EBCellFlag connectivity for face_dir from its area fractions.
void buildCutCellMask (Level const &fine_level)
 Build the cut-cell mask by coarsening from fine_level.

Static Public Member Functions

static IntVect fcEdgeType (int idim, int face_dir) noexcept
 Index type of the face-centered edge centroids for edge direction idim.

Protected Attributes

Geometry m_geom
IntVect m_ngrow
BoxArray m_grids
BoxArray m_covered_grids
DistributionMapping m_dmap
MultiFab m_sdf
std::map< int, std::unique_ptr< MC::MCFab > > m_marching_cubes
MultiGFab m_mgf
MultiFab m_levelset
FabArray< EBCellFlagFab > m_cellflag
MultiFab m_volfrac
MultiFab m_centroid
MultiFab m_bndryarea
MultiFab m_bndrycent
MultiFab m_bndrynorm
Array< MultiFab, 3 > m_areafrac
Array< MultiFab, 3 > m_facecent
Array< MultiFab, 3 > m_edgecent
iMultiFab m_cutcellmask
bool m_allregular = false
bool m_ok = false
bool m_has_eb_info = true
IntVect m_shift {0}
IndexSpace const * m_parent
Array< std::unique_ptr< FCData >, 3 > m_fc_data
 Face-centered data storage: [0]=x-face, [1]=y-face, [2]=z-face.

Friends

template<typename G>
class GShopLevel
template<typename G>
class IndexSpaceImp

Constructor & Destructor Documentation

◆ Level()

amrex::EB2::Level::Level ( IndexSpace const * is,
const Geometry & geom )
inline

Construct a Level bound to EB index space is and Geometry geom.

Member Function Documentation

◆ boxArray()

const BoxArray & amrex::EB2::Level::boxArray ( ) const
inlinenoexcept
Returns
Grid layout associated with this level.

◆ buildCellFlag()

void amrex::EB2::Level::buildCellFlag ( )

Build EBCellFlag data from the current implicit function field.

◆ buildCellFlagFC()

void amrex::EB2::Level::buildCellFlagFC ( int face_dir)

Build the face-centered EBCellFlag connectivity for face_dir from its area fractions.

◆ buildCutCellMask()

void amrex::EB2::Level::buildCutCellMask ( Level const & fine_level)

Build the cut-cell mask by coarsening from fine_level.

◆ coarsenFromFine()

int amrex::EB2::Level::coarsenFromFine ( Level & fineLevel,
bool fill_boundary )

Coarsen EB data from fineLevel into this level.

Parameters
fineLevelSource level.
fill_boundaryWhether to fill boundary data after coarsening.
Returns
0 on success.

◆ DistributionMap()

const DistributionMapping & amrex::EB2::Level::DistributionMap ( ) const
inlinenoexcept
Returns
Distribution mapping describing how grids are assigned to ranks.

◆ fcEdgeType()

IntVect amrex::EB2::Level::fcEdgeType ( int idim,
int face_dir )
inlinestaticnodiscardnoexcept

Index type of the face-centered edge centroids for edge direction idim.

The edge is cell-typed in the direction it runs along and nodal in the others, as in the cell-centered path, except that face_dir is always nodal: that is how a box spans the staggered cells it owns. Used for both the level's data and the factory's, which have to agree - fillEdgeCentFC copies one into the other.

◆ fillAreaFrac() [1/2]

void amrex::EB2::Level::fillAreaFrac ( Array< MultiCutFab *, 3 > const & areafrac,
const Geometry & geom ) const

Populate face area fractions for each direction.

◆ fillAreaFrac() [2/2]

void amrex::EB2::Level::fillAreaFrac ( Array< MultiFab *, 3 > const & areafrac,
const Geometry & geom ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ fillAreaFracFC() [1/2]

void amrex::EB2::Level::fillAreaFracFC ( Array< MultiCutFab *, 3 > const & areafrac,
int face_dir,
const Geometry & geom ) const

◆ fillAreaFracFC() [2/2]

void amrex::EB2::Level::fillAreaFracFC ( Array< MultiFab *, 3 > const & areafrac,
int face_dir,
const Geometry & geom ) const

Fill face-centered area fractions for face_dir.

◆ fillBndryArea() [1/2]

void amrex::EB2::Level::fillBndryArea ( MultiCutFab & bndryarea,
const Geometry & geom ) const

Populate boundary-face areas into bndryarea.

◆ fillBndryArea() [2/2]

void amrex::EB2::Level::fillBndryArea ( MultiFab & bndryarea,
const Geometry & geom ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ fillBndryAreaFC() [1/2]

void amrex::EB2::Level::fillBndryAreaFC ( MultiCutFab & bndryarea,
int face_dir,
const Geometry & geom ) const

◆ fillBndryAreaFC() [2/2]

void amrex::EB2::Level::fillBndryAreaFC ( MultiFab & bndryarea,
int face_dir,
const Geometry & geom ) const

Fill face-centered boundary areas for face_dir.

◆ fillBndryCent() [1/2]

void amrex::EB2::Level::fillBndryCent ( MultiCutFab & bndrycent,
const Geometry & geom ) const

Populate boundary centroids into bndrycent.

◆ fillBndryCent() [2/2]

void amrex::EB2::Level::fillBndryCent ( MultiFab & bndrycent,
const Geometry & geom ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ fillBndryCentFC() [1/2]

void amrex::EB2::Level::fillBndryCentFC ( MultiCutFab & bndrycent,
int face_dir,
const Geometry & geom ) const

◆ fillBndryCentFC() [2/2]

void amrex::EB2::Level::fillBndryCentFC ( MultiFab & bndrycent,
int face_dir,
const Geometry & geom ) const

Fill face-centered boundary centroids for face_dir.

◆ fillBndryNorm() [1/2]

void amrex::EB2::Level::fillBndryNorm ( MultiCutFab & bndrynorm,
const Geometry & geom ) const

Populate boundary normals into bndrynorm.

◆ fillBndryNorm() [2/2]

void amrex::EB2::Level::fillBndryNorm ( MultiFab & bndrynorm,
const Geometry & geom ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ fillBndryNormFC() [1/2]

void amrex::EB2::Level::fillBndryNormFC ( MultiCutFab & bndrynorm,
int face_dir,
const Geometry & geom ) const

◆ fillBndryNormFC() [2/2]

void amrex::EB2::Level::fillBndryNormFC ( MultiFab & bndrynorm,
int face_dir,
const Geometry & geom ) const

Fill face-centered boundary normals for face_dir.

◆ fillCentroid() [1/2]

void amrex::EB2::Level::fillCentroid ( MultiCutFab & centroid,
const Geometry & geom ) const

Populate cut-cell centroids into a MultiCutFab.

◆ fillCentroid() [2/2]

void amrex::EB2::Level::fillCentroid ( MultiFab & centroid,
const Geometry & geom ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ fillCentroidFC() [1/2]

void amrex::EB2::Level::fillCentroidFC ( MultiCutFab & centroid,
int face_dir,
const Geometry & geom ) const

◆ fillCentroidFC() [2/2]

void amrex::EB2::Level::fillCentroidFC ( MultiFab & centroid,
int face_dir,
const Geometry & geom ) const

Fill face-centered centroids for face_dir.

◆ fillCutCellMask()

void amrex::EB2::Level::fillCutCellMask ( iMultiFab & cutcellmask,
const Geometry & geom ) const

Populate the cut-cell mask into cutcellmask.

◆ fillEBCellFlag()

void amrex::EB2::Level::fillEBCellFlag ( FabArray< EBCellFlagFab > & cellflag,
const Geometry & geom ) const

Fill cellflag with EBCellFlag data using geometry geom.

Parameters
cellflagDestination flag array.
geomGeometry describing the sampling box.

◆ fillEBCellFlagFC()

void amrex::EB2::Level::fillEBCellFlagFC ( FabArray< EBCellFlagFab > & cellflag,
int face_dir,
const Geometry & geom ) const

Fill face-centered EBCellFlags for face_dir.

◆ fillEdgeCent() [1/2]

void amrex::EB2::Level::fillEdgeCent ( Array< MultiCutFab *, 3 > const & edgecent,
const Geometry & geom ) const

Populate edge centroids for each direction.

◆ fillEdgeCent() [2/2]

void amrex::EB2::Level::fillEdgeCent ( Array< MultiFab *, 3 > const & edgecent,
const Geometry & geom ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ fillEdgeCentFC() [1/2]

void amrex::EB2::Level::fillEdgeCentFC ( Array< MultiCutFab *, 3 > const & edgecent,
int face_dir,
const Geometry & geom ) const

◆ fillEdgeCentFC() [2/2]

void amrex::EB2::Level::fillEdgeCentFC ( Array< MultiFab *, 3 > const & edgecent,
int face_dir,
const Geometry & geom ) const

Fill face-centered edge centroids for face_dir.

◆ fillFaceCent() [1/2]

void amrex::EB2::Level::fillFaceCent ( Array< MultiCutFab *, 3 > const & facecent,
const Geometry & geom ) const

Populate face centroids for each direction.

◆ fillFaceCent() [2/2]

void amrex::EB2::Level::fillFaceCent ( Array< MultiFab *, 3 > const & facecent,
const Geometry & geom ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ fillFaceCentFC() [1/2]

void amrex::EB2::Level::fillFaceCentFC ( Array< MultiCutFab *, 3 > const & facecent,
int face_dir,
const Geometry & geom ) const

◆ fillFaceCentFC() [2/2]

void amrex::EB2::Level::fillFaceCentFC ( Array< MultiFab *, 3 > const & facecent,
int face_dir,
const Geometry & geom ) const

Fill face-centered face centroids for face_dir.

◆ fillLevelSet()

void amrex::EB2::Level::fillLevelSet ( MultiFab & levelset,
const Geometry & geom ) const

Write the implicit function values into levelset.

◆ fillVolFrac()

void amrex::EB2::Level::fillVolFrac ( MultiFab & vfrac,
const Geometry & geom ) const

Populate volume fractions into vfrac using geom.

◆ fillVolFracFC()

void amrex::EB2::Level::fillVolFracFC ( MultiFab & vfrac,
int face_dir,
const Geometry & geom ) const

Fill face-centered volume fractions for face_dir.

◆ Geom()

const Geometry & amrex::EB2::Level::Geom ( ) const
inlinenoexcept
Returns
Reference to the level Geometry.

◆ getEBIndexSpace()

IndexSpace const * amrex::EB2::Level::getEBIndexSpace ( ) const
inlinenoexcept
Returns
Pointer to the EB IndexSpace.

◆ getFCData()

const FCData & amrex::EB2::Level::getFCData ( int face_dir) const
inlinenodiscard

Get reference to face-centered data for face_dir (0=x, 1=y, 2=z).

◆ hasEBInfo()

bool amrex::EB2::Level::hasEBInfo ( ) const
inlinenoexcept
Returns
True if EB data (flags, area fractions, etc.) are available.

◆ hasFCData()

bool amrex::EB2::Level::hasFCData ( int face_dir) const
inlinenodiscardnoexcept

Check if face-centered data is available for face_dir (0=x, 1=y, 2=z).

◆ isAllRegular()

bool amrex::EB2::Level::isAllRegular ( ) const
inlinenoexcept
Returns
True if every cell in this level is regular (no cut cells).

◆ isOK()

bool amrex::EB2::Level::isOK ( ) const
inlinenoexcept
Returns
True if the level successfully built its EB description.

◆ nGrowVect()

IntVect const & amrex::EB2::Level::nGrowVect ( ) const
inlinenoexcept
Returns
EB grow-vector.

◆ prepareForCoarsening()

void amrex::EB2::Level::prepareForCoarsening ( const Level & rhs,
int max_grid_size,
IntVect const & ngrow )

Prepare for coarsening by copying from rhs, respecting max grid size and grow vector.

◆ setShift()

void amrex::EB2::Level::setShift ( int direction,
int ncells )

Shift this level by ncells cells along direction direction (for periodic tiling).

◆ write_to_chkpt_file()

void amrex::EB2::Level::write_to_chkpt_file ( const std::string & fname,
bool extend_domain_face,
int max_grid_size ) const

Write this level’s EB data to a checkpoint file fname.

Parameters
fnameTarget checkpoint file name.
extend_domain_faceWhether domain faces were extended.
max_grid_sizeGrid blocking factor used during build.

◆ GShopLevel

template<typename G>
friend class GShopLevel
friend

◆ IndexSpaceImp

template<typename G>
friend class IndexSpaceImp
friend

Member Data Documentation

◆ m_allregular

bool amrex::EB2::Level::m_allregular = false
protected

◆ m_areafrac

Array<MultiFab,3> amrex::EB2::Level::m_areafrac
protected

◆ m_bndryarea

MultiFab amrex::EB2::Level::m_bndryarea
protected

◆ m_bndrycent

MultiFab amrex::EB2::Level::m_bndrycent
protected

◆ m_bndrynorm

MultiFab amrex::EB2::Level::m_bndrynorm
protected

◆ m_cellflag

FabArray<EBCellFlagFab> amrex::EB2::Level::m_cellflag
protected

◆ m_centroid

MultiFab amrex::EB2::Level::m_centroid
protected

◆ m_covered_grids

BoxArray amrex::EB2::Level::m_covered_grids
protected

◆ m_cutcellmask

iMultiFab amrex::EB2::Level::m_cutcellmask
protected

◆ m_dmap

DistributionMapping amrex::EB2::Level::m_dmap
protected

◆ m_edgecent

Array<MultiFab,3> amrex::EB2::Level::m_edgecent
protected

◆ m_facecent

Array<MultiFab,3> amrex::EB2::Level::m_facecent
protected

◆ m_fc_data

Array<std::unique_ptr<FCData>, 3> amrex::EB2::Level::m_fc_data
protected

Face-centered data storage: [0]=x-face, [1]=y-face, [2]=z-face.

◆ m_geom

Geometry amrex::EB2::Level::m_geom
protected

◆ m_grids

BoxArray amrex::EB2::Level::m_grids
protected

◆ m_has_eb_info

bool amrex::EB2::Level::m_has_eb_info = true
protected

◆ m_levelset

MultiFab amrex::EB2::Level::m_levelset
protected

◆ m_marching_cubes

std::map<int,std::unique_ptr<MC::MCFab> > amrex::EB2::Level::m_marching_cubes
protected

◆ m_mgf

MultiGFab amrex::EB2::Level::m_mgf
protected

◆ m_ngrow

IntVect amrex::EB2::Level::m_ngrow
protected

◆ m_ok

bool amrex::EB2::Level::m_ok = false
protected

◆ m_parent

IndexSpace const* amrex::EB2::Level::m_parent
protected

◆ m_sdf

MultiFab amrex::EB2::Level::m_sdf
protected

◆ m_shift

IntVect amrex::EB2::Level::m_shift {0}
protected

◆ m_volfrac

MultiFab amrex::EB2::Level::m_volfrac
protected

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