Chombo + EB  3.2
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
EBGraph Class Reference

Geometric description within a box. More...

#include <EBGraph.H>

Public Types

enum  TAG { AllRegular = 0, AllCovered, HasIrregular }
 

Public Member Functions

 EBGraph ()
 
 ~EBGraph ()
 
const BaseFab< char > & getMask (int &a_regIrregCovered) const
 
Vector< VolIndexgetVoFs (const IntVect &a_iv) const
 
long long numVoFs (const IntVect &a_iv) const
 
long long numVoFs (const Box &a_box) const
 
bool isAllRegular () const
 
bool hasIrregular () const
 
bool isAllCovered () const
 
bool isIrregular (const IntVect &a_iv) const
 
bool isCovered (const Box &a_box) const
 
bool isRegular (const Box &a_box) const
 
bool isRegular (const IntVect &a_iv) const
 
bool isCovered (const IntVect &a_iv) const
 
bool isMultiValued (const IntVect &a_iv) const
 
bool isConnected (const VolIndex &a_vof1, const VolIndex &a_vof2) const
 
Vector< FaceIndexgetFaces (const VolIndex &a_vof, const int &a_idir, const Side::LoHiSide &a_sd) const
 
Vector< Vector< VolIndex > > getVoFSets (const Box &a_region) const
 
Vector< VolIndexrefine (const VolIndex &a_coarVoF) const
 
Vector< FaceIndexrefine (const FaceIndex &a_coarFace, const EBGraph &a_fineGraph) const
 
FaceIndex coarsen (const FaceIndex &a_coarFace) const
 
VolIndex coarsen (const VolIndex &a_fineVoF) const
 
 EBGraph (const Box &a_box, int a_comps)
 
void buildGraph (const BaseFab< int > &a_regIrregCovered, const Vector< IrregNode > &a_irregGraph, const Box &a_validRegion, const ProblemDomain &a_domain)
 
void setToAllRegular ()
 
void setToAllCovered ()
 
void define (const Box &box)
 
void copy (const Box &a_regionFrom, const Interval &Cd, const Box &a_regionto, const EBGraph &a_source, const Interval &Cs)
 
const BoxgetRegion () const
 
const ProblemDomaingetDomain () const
 
bool isDefined () const
 
bool isDomainSet () const
 
void coarsenVoFs (const EBGraph &a_fineGraph, const Box &a_coarRegion)
 
void coarsenFaces (const EBGraph &a_coarGhostGraph, const EBGraph &a_fineEBIS)
 
void fixFineToCoarse (EBGraph &a_fineEBIS) const
 
Vector< int > coarsenFaces (const VolIndex &a_coarVoF, const EBGraph &a_coarGhostGraph, const EBGraph &a_fineGraph, const int &a_idir, const Side::LoHiSide &a_sd)
 
void setDomain (const ProblemDomain &a_domain)
 
IntVectSet getIrregCells (const Box &a_subbox) const
 
IntVectSet getMultiCells (const Box &a_subbox) const
 
EBGraphoperator= (const EBGraph &ebiin)
 
 EBGraph (const EBGraph &a_ebiin)
 
Vector< FaceIndexgetAllFaces (const IntVect &a_iv, const int &a_idir, const Side::LoHiSide &a_sd) const
 
Vector< FaceIndexgetIrregFaces (const Box &a_box, int a_dir) const
 
void fillMask (BaseFab< char > &a_mask) const
 
void fillCellTypeMask (BaseFab< char > &a_mask) const
 
 EBGraph (const Box &box)
 
bool operator== (const EBGraph &a_ebiin)
 pointer comparison More...
 
bool operator< (const EBGraph &a_ebiin) const
 pointer comparison More...
 
int size (const Box &R, const Interval &comps) const
 
void linearOut (void *buf, const Box &R, const Interval &comps) const
 
void linearIn (void *buf, const Box &R, const Interval &comps)
 
void addFullIrregularVoFs (const IntVectSet &a_vofsToChange, const EBGraph &a_ghostGraph)
 
void addEmptyIrregularVoFs (const IntVectSet &a_vofsToChange)
 
void getRegNextToMultiValued (IntVectSet &a_vofsToChange, const EBGraph &a_ghostGraph) const
 
Vector< FaceIndexgetMultiValuedFaces (const int &a_idir, const Box &a_box) const
 
long long numFaces (const Box &a_box, int a_dir) const
 
const FaceIteratorFaceIteratorCache (const IntVectSet &ivs, int a_direction, FaceStop::WhichFaces a_loc) const
 
const FaceIteratorFaceIteratorCache (const Box &a_region, int a_direction, FaceStop::WhichFaces a_loc) const
 
const VoFIteratorVoFIteratorCache (const IntVectSet &ivs) const
 

Static Public Member Functions

static int preAllocatable ()
 

Private Attributes

RefCountedPtr< EBGraphImplemm_implem
 

Friends

class EBIndexSpace
 
class EBISLevel
 

Detailed Description

Geometric description within a box.

EBGraph represents the geometric information of the domain at a given refinement within the boundaries of a particular box. This is a refcounted object with all that implies.

Member Enumeration Documentation

◆ TAG

The EBGraph can be all regular or all covered or contain irregular cells.

Enumerator
AllRegular 
AllCovered 
HasIrregular 

Constructor & Destructor Documentation

◆ EBGraph() [1/4]

EBGraph::EBGraph ( )

Makes an EBGraph whose contents are undefined.

◆ ~EBGraph()

EBGraph::~EBGraph ( )

◆ EBGraph() [2/4]

EBGraph::EBGraph ( const Box a_box,
int  a_comps 
)

Define an all-regular EBGraph with the input box as its region. The component argument is ignored. This function is required by LevelData.

◆ EBGraph() [3/4]

EBGraph::EBGraph ( const EBGraph a_ebiin)

◆ EBGraph() [4/4]

EBGraph::EBGraph ( const Box box)

1 = regular 0 = irregular -1 = covered

Member Function Documentation

◆ getMask()

const BaseFab< char > & EBGraph::getMask ( int &  a_regIrregCovered) const
inline

If the graph has irregular cells get a mask over the size of the graph. -1 for covered cells or multivalued cells, 0 for singlevalued irregular, and 1 for regular. If the graph is all regular, regIrregCovered returns 1 and the mask is undefined. If the graph is all regular, regIrregCovered returns -1 and the mask is undefined.

◆ getVoFs()

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

Return the VoFs in the cell.

Referenced by EBISBox::getVoFs().

◆ numVoFs() [1/2]

long long EBGraph::numVoFs ( const IntVect a_iv) const
inline

◆ numVoFs() [2/2]

long long EBGraph::numVoFs ( const Box a_box) const
inline

◆ isAllRegular()

bool EBGraph::isAllRegular ( ) const
inline

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

Referenced by EBISBox::isAllRegular().

◆ hasIrregular()

bool EBGraph::hasIrregular ( ) const

Return true neither all regular nor all covered

◆ isAllCovered()

bool EBGraph::isAllCovered ( ) const
inline

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

Referenced by EBISBox::isAllCovered().

◆ isIrregular()

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

Return true if a_iv is an irregular cell.

Referenced by EBISBox::isIrregular().

◆ isCovered() [1/2]

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

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

Referenced by EBISBox::isCovered().

◆ isRegular() [1/2]

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

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

Referenced by EBISBox::isRegular().

◆ isRegular() [2/2]

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

◆ isCovered() [2/2]

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

◆ isMultiValued()

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

Referenced by EBISBox::isMultiValued().

◆ isConnected()

bool EBGraph::isConnected ( const VolIndex a_vof1,
const VolIndex a_vof2 
) const
inline

◆ getFaces()

Vector< FaceIndex > EBGraph::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.

Referenced by EBISBox::getFaces().

◆ getVoFSets()

Vector<Vector<VolIndex> > EBGraph::getVoFSets ( const Box a_region) const

◆ refine() [1/2]

Vector< VolIndex > EBGraph::refine ( const VolIndex a_coarVoF) const
inline

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

◆ refine() [2/2]

Vector< FaceIndex > EBGraph::refine ( const FaceIndex a_coarFace,
const EBGraph a_fineGraph 
) const
inline

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

References m_implem.

◆ coarsen() [1/2]

FaceIndex EBGraph::coarsen ( const FaceIndex a_coarFace) const
inline

Returns the corresponding face from the next coarser EBGraph (factor of two refinement). This only makes sense if there is a coarser level.

◆ coarsen() [2/2]

VolIndex EBGraph::coarsen ( const VolIndex a_fineVoF) const
inline

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

◆ buildGraph()

void EBGraph::buildGraph ( const BaseFab< int > &  a_regIrregCovered,
const Vector< IrregNode > &  a_irregGraph,
const Box a_validRegion,
const ProblemDomain a_domain 
)
inline

Completely construct the graph from IrregNodes. This makes a DENSE representation of the graph. To make sparse representations of all regular or all covered graphs, use setToAllRegular or setToAllCovered.\ irregGraph contains a complete list of irregular vofs. \ validRegion is the the region of the graph \ domain is the domain of compuation \ regIrregCovered = 1 for regular, 0 for irregular, -1 for covered. regIrregCovered must contain the valid region grown by 1. \ In chombospeak, \ regIrregCovered.box().contains(grow(validRegion, 1) & domain); \ otherwise an error will result

◆ setToAllRegular()

void EBGraph::setToAllRegular ( )
inline

Set the graph to all regular cells (sparse);

◆ setToAllCovered()

void EBGraph::setToAllCovered ( )
inline

Set the graph to all covered cells (sparse);

References coarsenVoFs().

◆ define()

void EBGraph::define ( const Box box)

Define an all-regular EBGraph with the input box as its region.

◆ copy()

void EBGraph::copy ( const Box a_regionFrom,
const Interval Cd,
const Box a_regionto,
const EBGraph a_source,
const Interval Cs 
)
inline

Copy the information from a_source to the over the intersection of the box a_region, the box of the current EBGraph and the box of a_source. The Interval arguments are ignored. This function is required by LevelData.

References m_implem.

◆ getRegion()

const Box & EBGraph::getRegion ( ) const
inline

Referenced by MiniIFFAB< Real >::size().

◆ getDomain()

const ProblemDomain & EBGraph::getDomain ( ) const
inline

◆ isDefined()

bool EBGraph::isDefined ( ) const
inline

◆ isDomainSet()

bool EBGraph::isDomainSet ( ) const

◆ coarsenVoFs()

void EBGraph::coarsenVoFs ( const EBGraph a_fineGraph,
const Box a_coarRegion 
)
inline

References coarsenFaces(), and m_implem.

Referenced by setToAllCovered().

◆ coarsenFaces() [1/2]

void EBGraph::coarsenFaces ( const EBGraph a_coarGhostGraph,
const EBGraph a_fineEBIS 
)
inline

References fixFineToCoarse(), and m_implem.

Referenced by coarsenVoFs().

◆ fixFineToCoarse()

void EBGraph::fixFineToCoarse ( EBGraph a_fineEBIS) const
inline

References m_implem.

Referenced by coarsenFaces().

◆ coarsenFaces() [2/2]

Vector<int> EBGraph::coarsenFaces ( const VolIndex a_coarVoF,
const EBGraph a_coarGhostGraph,
const EBGraph a_fineGraph,
const int &  a_idir,
const Side::LoHiSide a_sd 
)

◆ setDomain()

void EBGraph::setDomain ( const ProblemDomain a_domain)
inline

◆ getIrregCells()

IntVectSet EBGraph::getIrregCells ( const Box a_subbox) const
inline

◆ getMultiCells()

IntVectSet EBGraph::getMultiCells ( const Box a_subbox) const
inline

◆ operator=()

EBGraph & EBGraph::operator= ( const EBGraph ebiin)
inline

References m_implem.

◆ getAllFaces()

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

Referenced by EBISBox::getAllFaces().

◆ getIrregFaces()

Vector<FaceIndex> EBGraph::getIrregFaces ( const Box a_box,
int  a_dir 
) const

◆ fillMask()

void EBGraph::fillMask ( BaseFab< char > &  a_mask) const

◆ fillCellTypeMask()

void EBGraph::fillCellTypeMask ( BaseFab< char > &  a_mask) const

0 outside priblem domain 1 covered 2 regular 3 irregular

◆ operator==()

bool EBGraph::operator== ( const EBGraph a_ebiin)
inline

pointer comparison

References m_implem.

◆ operator<()

bool EBGraph::operator< ( const EBGraph a_ebiin) const
inline

pointer comparison

References m_implem.

◆ size()

int EBGraph::size ( const Box R,
const Interval comps 
) const

This stuff required by LevelData in parallel:

◆ linearOut()

void EBGraph::linearOut ( void *  buf,
const Box R,
const Interval comps 
) const

◆ linearIn()

void EBGraph::linearIn ( void *  buf,
const Box R,
const Interval comps 
)

◆ preAllocatable()

static int EBGraph::preAllocatable ( )
inlinestatic

◆ addFullIrregularVoFs()

void EBGraph::addFullIrregularVoFs ( const IntVectSet a_vofsToChange,
const EBGraph a_ghostGraph 
)

◆ addEmptyIrregularVoFs()

void EBGraph::addEmptyIrregularVoFs ( const IntVectSet a_vofsToChange)

◆ getRegNextToMultiValued()

void EBGraph::getRegNextToMultiValued ( IntVectSet a_vofsToChange,
const EBGraph a_ghostGraph 
) const

◆ getMultiValuedFaces()

Vector<FaceIndex> EBGraph::getMultiValuedFaces ( const int &  a_idir,
const Box a_box 
) const

◆ numFaces()

long long EBGraph::numFaces ( const Box a_box,
int  a_dir 
) const

◆ FaceIteratorCache() [1/2]

const FaceIterator & EBGraph::FaceIteratorCache ( const IntVectSet ivs,
int  a_direction,
FaceStop::WhichFaces  a_loc 
) const
inline

◆ FaceIteratorCache() [2/2]

const FaceIterator & EBGraph::FaceIteratorCache ( const Box a_region,
int  a_direction,
FaceStop::WhichFaces  a_loc 
) const
inline

◆ VoFIteratorCache()

const VoFIterator & EBGraph::VoFIteratorCache ( const IntVectSet ivs) const
inline

Friends And Related Function Documentation

◆ EBIndexSpace

friend class EBIndexSpace
friend

◆ EBISLevel

friend class EBISLevel
friend

Member Data Documentation

◆ m_implem

RefCountedPtr<EBGraphImplem> EBGraph::m_implem
private

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