Chombo + EB + MF  3.2
Public Member Functions | Private Attributes | List of all members
EBISBox Class Reference

#include <EBISBox.H>

Public Member Functions

 EBISBox ()
 
 ~EBISBox ()
 
IntVectSet getMultiCells (const Box &a_subbox) const
 
IntVectSet getIrregIVS (const Box &a_subbox) const
 
IntVectSet boundaryIVS (const Box &a_subbox) const
 
int numVoFs (const IntVect &a_iv) const
 
Vector< VolIndexgetVoFs (const IntVect &a_iv) const
 
Vector< VolIndexgetVoFs (const VolIndex &a_vof, const int &a_dir, const Side::LoHiSide &a_sd, const int &a_steps) const
 
bool isAllRegular () const
 
bool isAllCovered () const
 
bool isRegular (const IntVect &a_iv) const
 
bool isIrregular (const IntVect &a_iv) const
 
bool isCovered (const IntVect &a_iv) const
 
bool isMultiValued (const IntVect &a_iv) const
 
bool isCovered (const Box &a_box) const
 
bool isRegular (const Box &a_box) const
 
Vector< FaceIndexgetFaces (const VolIndex &a_vof, const int &a_idir, const Side::LoHiSide &a_sd) const
 
Vector< FaceIndexgetAllFaces (const IntVect &a_iv, const int &a_idir, const Side::LoHiSide &a_sd) const
 
RealVect centroid (const FaceIndex &facein) const
 
int numFaces (const VolIndex &a_vof, const int &a_idir, const Side::LoHiSide &a_sd) const
 
Real volFrac (const VolIndex &a_vof) const
 
Real areaFracScaling (const VolIndex &a_vof) const
 
bool isConnected (const VolIndex &a_vof1, const VolIndex &a_vof2) const
 
Real areaFrac (const FaceIndex &a_face1) const
 
Real sumArea (const VolIndex &a_vof, const int &a_idir, const Side::LoHiSide &a_sd) const
 
RealVect centroid (const VolIndex &a_vof) const
 
Vector< VolIndexrefine (const VolIndex &a_coarVoF) const
 
VolIndex coarsen (const VolIndex &a_fineVoF) const
 
RealVect bndryCentroid (const VolIndex &a_vof) const
 
RealVect bndryCentroid (const VolIndex &a_vof, int face) const
 
Real bndryArea (const VolIndex &a_vof) const
 
Real bndryArea (const VolIndex &a_vof, int face) const
 
int numFacePhase (const VolIndex &a_vof) const
 
int facePhase (const VolIndex &a_vof, int face) const
 used by multi-fluid code More...
 
const VolIndexfaceIndex (const VolIndex &a_vof, int face) const
 used by multi-fluid code More...
 
RealVect normal (const VolIndex &a_vof) const
 
RealVect normal (const VolIndex &a_vof, int face) const
 
const BoxgetRegion () const
 
const ProblemDomaingetDomain () const
 
void setDomain (const ProblemDomain &a_domain)
 
Vector< FaceIndexrefine (const FaceIndex &a_coarFace, const EBISBox &a_fineEBISBox) const
 
FaceIndex coarsen (const FaceIndex &a_fineFace) const
 
void setToAllRegular ()
 
void setToAllCovered ()
 
const EBGraphgetEBGraph () const
 
const EBDatagetEBData () const
 
void define (const EBGraph &a_graph, const EBData &a_data, const DataIndex &a_dit)
 define from scratch using a graph and an ebdata More...
 
EBISBoxoperator= (const EBISBox &ebiin)
 pointer copy More...
 
 EBISBox (const EBISBox &ebiin)
 pointer copy More...
 
bool operator== (const EBISBox &ebiin)
 pointer comparison More...
 
DataIndex dataIndex () const
 

Private Attributes

EBGraph m_graph
 this is already a ref-counted object More...
 
EBData m_data
 this is already a ref-counted objecto More...
 
DataIndex m_dit
 

Detailed Description

Geometric description within a box EBISBox represents the geometric information of the domain at a given refinement within the boundaries of a particular box. It is implemented as a reference-counted pointer to an EBISBox object. This means that assignment and copying are computationally inexpensive but it also means that these functions have the reference-counted pointer semantic. If one copies an EBISBox and changes the copy, the original one changes too.

Constructor & Destructor Documentation

◆ EBISBox() [1/2]

EBISBox::EBISBox ( )

Makes an EBISBox whose contents are undefined.

◆ ~EBISBox()

EBISBox::~EBISBox ( )

◆ EBISBox() [2/2]

EBISBox::EBISBox ( const EBISBox ebiin)

pointer copy

Member Function Documentation

◆ getMultiCells()

IntVectSet EBISBox::getMultiCells ( const Box a_subbox) const

Returns all the multi-valued cells within the input Box a_subbox.

Referenced by BaseEBCellFAB< Real >::define().

◆ getIrregIVS()

IntVectSet EBISBox::getIrregIVS ( const Box a_subbox) const

Returns the irregular cells of the EBISBox that are within the input subbox.

◆ boundaryIVS()

IntVectSet EBISBox::boundaryIVS ( const Box a_subbox) const

Returns the irregular cells that have non-zero boundary area

◆ numVoFs()

int EBISBox::numVoFs ( const IntVect a_iv) const
inline

Returns the number of VoFs in the cell

References m_graph, and EBGraph::numVoFs().

◆ getVoFs() [1/2]

Vector< VolIndex > EBISBox::getVoFs ( const IntVect a_iv) const
inline

Return the VoFs in the cell.

References EBGraph::getVoFs(), and m_graph.

◆ getVoFs() [2/2]

Vector<VolIndex> EBISBox::getVoFs ( const VolIndex a_vof,
const int &  a_dir,
const Side::LoHiSide a_sd,
const int &  a_steps 
) const

Return the VoFs in the direction and distance given. Chases the connectivity the number of steps given. a_steps = 0 just returns the vof input. a_steps < 0 is an error. Stops at the domain boundary without error. Will be an error if the number of steps steps out of the EBISBox region without stepping out of the domain. If this happens, you probably need to define your EBISLayout with more ghost cells.

◆ isAllRegular()

bool EBISBox::isAllRegular ( ) const
inline

Return true if every cell in the EBISBox is a regular cell.

References EBGraph::isAllRegular(), and m_graph.

Referenced by BaseEBFaceFAB< Real >::setCoveredFaceVal().

◆ isAllCovered()

bool EBISBox::isAllCovered ( ) const
inline

Return true if every cell in the EBISBox is a covered cell.

References EBGraph::isAllCovered(), and m_graph.

Referenced by BaseEBFaceFAB< Real >::setCoveredFaceVal().

◆ isRegular() [1/2]

bool EBISBox::isRegular ( const IntVect a_iv) const
inline

Return true if a_iv is a regular cell.

References EBGraph::isRegular(), and m_graph.

◆ isIrregular()

bool EBISBox::isIrregular ( const IntVect a_iv) const
inline

Return true if a_iv is an irregular cell.

References EBGraph::isIrregular(), and m_graph.

◆ isCovered() [1/2]

bool EBISBox::isCovered ( const IntVect a_iv) const
inline

Return true if a_iv is a covered cell.

References EBGraph::isCovered(), and m_graph.

Referenced by BaseEBCellFAB< Real >::assign(), BaseEBCellFAB< Real >::fill(), and BaseEBCellFAB< Real >::operator()().

◆ isMultiValued()

bool EBISBox::isMultiValued ( const IntVect a_iv) const
inline

◆ isCovered() [2/2]

bool EBISBox::isCovered ( const Box a_box) const
inline

Return true if every cell in a_box is a covered cell.

References EBGraph::isCovered(), and m_graph.

◆ isRegular() [2/2]

bool EBISBox::isRegular ( const Box a_box) const
inline

Return true if every cell in a_box is a regular cell.

References EBGraph::isRegular(), and m_graph.

◆ getFaces()

Vector< FaceIndex > EBISBox::getFaces ( const VolIndex a_vof,
const int &  a_idir,
const Side::LoHiSide a_sd 
) const
inline

Return the faces on the side and direction of the input VoF.

References EBGraph::getFaces(), and m_graph.

◆ getAllFaces()

Vector< FaceIndex > EBISBox::getAllFaces ( const IntVect a_iv,
const int &  a_idir,
const Side::LoHiSide a_sd 
) const
inline

◆ centroid() [1/2]

RealVect EBISBox::centroid ( const FaceIndex facein) const

Returns a RealVect whose component in the uninteresting direction normal to the face is undefined. Returns the centroid of input face in the (one or two) interesting directions. Return the zero vector if the face is covered or regular. The answer is given as a normalized (by grid spacing) offset from the center of the cell face (all numbers range from -0.5 to 0.5).

◆ numFaces()

int EBISBox::numFaces ( const VolIndex a_vof,
const int &  a_idir,
const Side::LoHiSide a_sd 
) const

Return the number of faces on the side and direction of the input VoF.

◆ volFrac()

Real EBISBox::volFrac ( const VolIndex a_vof) const

Return the volume fraction of teh input VoF.

◆ areaFracScaling()

Real EBISBox::areaFracScaling ( const VolIndex a_vof) const

Return the area fraction scaling of the input VoF. Currently, this is 1/Max_faces(areaFrac).

◆ isConnected()

bool EBISBox::isConnected ( const VolIndex a_vof1,
const VolIndex a_vof2 
) const

Return true if the two VoFs are connected.

◆ areaFrac()

Real EBISBox::areaFrac ( const FaceIndex a_face1) const

Return the area fraction of the face. Returns zero if the two vofs in the face are not actually connected.

◆ sumArea()

Real EBISBox::sumArea ( const VolIndex a_vof,
const int &  a_idir,
const Side::LoHiSide a_sd 
) const

Return the sum of area fractions of the high side of the vof in the given direction.

◆ centroid() [2/2]

RealVect EBISBox::centroid ( const VolIndex a_vof) const

Returns the centroid of the input VoF. Return the zero vector if the VoF is regular or covered. The answer is given as a normalized (by grid spacing) offset from the center of the cell (all numbers range from -0.5 to 0.5).

◆ refine() [1/2]

Vector<VolIndex> EBISBox::refine ( const VolIndex a_coarVoF) const

Returns the corresponding set of VoFs from the next finer EBISBox (factor of two refinement). The result is only defined if this { EBISBox} was defined by coarsening.

◆ coarsen() [1/2]

VolIndex EBISBox::coarsen ( const VolIndex a_fineVoF) const

Returns the corresponding VoF from the next coarser EBISBox (same solution location, different index space, factor of two refinement ratio).

◆ bndryCentroid() [1/2]

RealVect EBISBox::bndryCentroid ( const VolIndex a_vof) const

◆ bndryCentroid() [2/2]

RealVect EBISBox::bndryCentroid ( const VolIndex a_vof,
int  face 
) const

◆ bndryArea() [1/2]

Real EBISBox::bndryArea ( const VolIndex a_vof) const

◆ bndryArea() [2/2]

Real EBISBox::bndryArea ( const VolIndex a_vof,
int  face 
) const

◆ numFacePhase()

int EBISBox::numFacePhase ( const VolIndex a_vof) const

◆ facePhase()

int EBISBox::facePhase ( const VolIndex a_vof,
int  face 
) const

used by multi-fluid code

◆ faceIndex()

const VolIndex& EBISBox::faceIndex ( const VolIndex a_vof,
int  face 
) const

used by multi-fluid code

◆ normal() [1/2]

RealVect EBISBox::normal ( const VolIndex a_vof) const

Return the normal to the boundary at the input VoF. If said normal is undefined, returns the zero vector.

Referenced by ViscousBaseEBBC::getChangeInSolution().

◆ normal() [2/2]

RealVect EBISBox::normal ( const VolIndex a_vof,
int  face 
) const

◆ getRegion()

const Box& EBISBox::getRegion ( ) const

◆ getDomain()

const ProblemDomain& EBISBox::getDomain ( ) const

◆ setDomain()

void EBISBox::setDomain ( const ProblemDomain a_domain)

◆ refine() [2/2]

Vector<FaceIndex> EBISBox::refine ( const FaceIndex a_coarFace,
const EBISBox a_fineEBISBox 
) const

Returns the corresponding set of faces from the next finer EBISBox (factor of two refinement). The result is only defined if this EBISBox was defined by coarsening.

◆ coarsen() [2/2]

FaceIndex EBISBox::coarsen ( const FaceIndex a_fineFace) const

Returns the corresponding face from the next coarser { EBISLevel} (same solution location, different index space, factor of two refinement ratio).

◆ setToAllRegular()

void EBISBox::setToAllRegular ( )

Set the graph to all regular cells (sparse);

◆ setToAllCovered()

void EBISBox::setToAllCovered ( )

Set the graph to all covered cells (sparse);

◆ getEBGraph()

const EBGraph& EBISBox::getEBGraph ( ) const

◆ getEBData()

const EBData& EBISBox::getEBData ( ) const

◆ define()

void EBISBox::define ( const EBGraph a_graph,
const EBData a_data,
const DataIndex a_dit 
)

define from scratch using a graph and an ebdata

◆ operator=()

EBISBox& EBISBox::operator= ( const EBISBox ebiin)

pointer copy

◆ operator==()

bool EBISBox::operator== ( const EBISBox ebiin)

pointer comparison

◆ dataIndex()

DataIndex EBISBox::dataIndex ( ) const
inline

References m_dit.

Member Data Documentation

◆ m_graph

EBGraph EBISBox::m_graph
private

◆ m_data

EBData EBISBox::m_data
private

this is already a ref-counted objecto

◆ m_dit

DataIndex EBISBox::m_dit
private

Referenced by dataIndex().


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