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

Geometric description within a box. More...

#include <EBGraph.H>

Public Types

enum  TAG { AllRegular = 0, AllCovered, HasIrregular }
 

Public Member Functions

 EBGraphImplem ()
 
 ~EBGraphImplem ()
 
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
 
long long numFaces (const Box &a_box, int a_dir) 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 EBGraphImplem &a_fineGraph) const
 
FaceIndex coarsen (const FaceIndex &a_coarFace) const
 
VolIndex coarsen (const VolIndex &a_fineVoF) const
 
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)
 
 EBGraphImplem (const Box &box)
 
void copy (const Box &a_regionFrom, const Interval &Cd, const Box &a_regionto, const EBGraphImplem &a_source, const Interval &Cs)
 
const BoxgetRegion () const
 
const ProblemDomaingetDomain () const
 
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)
 
bool isDefined () const
 
bool isDomainSet () const
 
void coarsenVoFs (const EBGraphImplem &a_fineGraph, const Box &a_coarRegion)
 
void coarsenFaces (const EBGraphImplem &a_coarGhostGraph, const EBGraphImplem &a_fineEBIS)
 
void fixFineToCoarse (EBGraphImplem &a_fineEBIS) const
 
Vector< int > coarsenFaces (const VolIndex &a_coarVoF, const EBGraphImplem &a_coarGhostGraph, const EBGraphImplem &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
 
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
 
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 EBGraph &a_ebgraph) const
 
const FaceIteratorFaceIteratorCache (const Box &a_region, int a_direction, FaceStop::WhichFaces a_loc, const EBGraph &parent) const
 
const FaceIteratorFaceIteratorCache (const IntVectSet &ivs, int a_direction, FaceStop::WhichFaces a_loc, const EBGraph &parent) const
 
const VoFIteratorVoFIteratorCache (const IntVectSet &ivs, const EBGraph &parent) const
 

Static Public Member Functions

static void checkGraph (const BaseFab< int > &a_regIrregCovered, const Vector< IrregNode > &a_irregGraph, const Box &a_validRegion, const ProblemDomain &a_domain)
 check if a box worth of graph is self consistent More...
 
static int preAllocatable ()
 

Static Public Attributes

static IntVect s_ivDebug
 
static Box s_doDebug
 

Private Member Functions

void operator= (const EBGraphImplem &ebiin)
 
 EBGraphImplem (const EBGraphImplem &ebiin)
 

Private Attributes

Box m_region
 box over which this graph is defined More...
 
ProblemDomain m_domain
 computational domain at this level of refinement More...
 
TAG m_tag
 
BaseFab< GraphNodem_graph
 
bool m_isDefined
 
bool m_isDomainSet
 
IntVectSetm_irregIVS
 
IntVectSetm_multiIVS
 
BaseFab< char > m_mask
 
bool m_isMaskBuilt
 

Static Private Attributes

static bool s_verbose
 

Friends

class EBIndexSpace
 
class EBISLevel
 

Detailed Description

Geometric description within a box.

EBGraphImplem represents the geometric information of the domain at a given refinement within the boundaries of a particular box.

Member Enumeration Documentation

◆ TAG

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

Enumerator
AllRegular 
AllCovered 
HasIrregular 

Constructor & Destructor Documentation

◆ EBGraphImplem() [1/3]

EBGraphImplem::EBGraphImplem ( )

Makes an EBGraphImplem whose contents are undefined.

◆ ~EBGraphImplem()

EBGraphImplem::~EBGraphImplem ( )

◆ EBGraphImplem() [2/3]

EBGraphImplem::EBGraphImplem ( const Box box)

◆ EBGraphImplem() [3/3]

EBGraphImplem::EBGraphImplem ( const EBGraphImplem ebiin)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ getMask()

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

changing this definition to make things run faster/better

◆ getVoFs()

Vector<VolIndex> EBGraphImplem::getVoFs ( const IntVect a_iv) const

Return the VoFs in the cell.

◆ numVoFs() [1/2]

long long EBGraphImplem::numVoFs ( const IntVect a_iv) const

◆ numVoFs() [2/2]

long long EBGraphImplem::numVoFs ( const Box a_box) const

◆ numFaces()

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

Referenced by EBGraph::preAllocatable().

◆ isAllRegular()

bool EBGraphImplem::isAllRegular ( ) const

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

◆ hasIrregular()

bool EBGraphImplem::hasIrregular ( ) const

Return true neither all regular nor all covered

◆ isAllCovered()

bool EBGraphImplem::isAllCovered ( ) const

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

◆ isIrregular()

bool EBGraphImplem::isIrregular ( const IntVect a_iv) const

Return true if a_iv is an irregular cell.

◆ isCovered() [1/2]

bool EBGraphImplem::isCovered ( const Box a_box) const

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

◆ isRegular() [1/2]

bool EBGraphImplem::isRegular ( const Box a_box) const

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

◆ isRegular() [2/2]

bool EBGraphImplem::isRegular ( const IntVect a_iv) const

◆ isCovered() [2/2]

bool EBGraphImplem::isCovered ( const IntVect a_iv) const

◆ isMultiValued()

bool EBGraphImplem::isMultiValued ( const IntVect a_iv) const

◆ isConnected()

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

◆ getFaces()

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

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

◆ getVoFSets()

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

◆ refine() [1/2]

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

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

◆ refine() [2/2]

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

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

◆ coarsen() [1/2]

FaceIndex EBGraphImplem::coarsen ( const FaceIndex a_coarFace) const

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

◆ coarsen() [2/2]

VolIndex EBGraphImplem::coarsen ( const VolIndex a_fineVoF) const

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

◆ buildGraph()

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

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

◆ checkGraph()

static void EBGraphImplem::checkGraph ( const BaseFab< int > &  a_regIrregCovered,
const Vector< IrregNode > &  a_irregGraph,
const Box a_validRegion,
const ProblemDomain a_domain 
)
static

check if a box worth of graph is self consistent

◆ setToAllRegular()

void EBGraphImplem::setToAllRegular ( )

Set the graph to all regular cells (sparse);

◆ setToAllCovered()

void EBGraphImplem::setToAllCovered ( )

Set the graph to all covered cells (sparse);

◆ define()

void EBGraphImplem::define ( const Box box)

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

◆ copy()

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

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

◆ getRegion()

const Box& EBGraphImplem::getRegion ( ) const

◆ getDomain()

const ProblemDomain& EBGraphImplem::getDomain ( ) const

◆ size()

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

This stuff required by LevelData in parallel:

◆ linearOut()

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

◆ linearIn()

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

◆ preAllocatable()

static int EBGraphImplem::preAllocatable ( )
inlinestatic

◆ isDefined()

bool EBGraphImplem::isDefined ( ) const

Referenced by preAllocatable().

◆ isDomainSet()

bool EBGraphImplem::isDomainSet ( ) const

Referenced by preAllocatable().

◆ coarsenVoFs()

void EBGraphImplem::coarsenVoFs ( const EBGraphImplem a_fineGraph,
const Box a_coarRegion 
)

Referenced by preAllocatable().

◆ coarsenFaces() [1/2]

void EBGraphImplem::coarsenFaces ( const EBGraphImplem a_coarGhostGraph,
const EBGraphImplem a_fineEBIS 
)

Referenced by preAllocatable().

◆ fixFineToCoarse()

void EBGraphImplem::fixFineToCoarse ( EBGraphImplem a_fineEBIS) const

Referenced by preAllocatable().

◆ coarsenFaces() [2/2]

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

◆ setDomain()

void EBGraphImplem::setDomain ( const ProblemDomain a_domain)

Referenced by preAllocatable().

◆ getIrregCells()

IntVectSet EBGraphImplem::getIrregCells ( const Box a_subbox) const

Referenced by preAllocatable().

◆ getMultiCells()

IntVectSet EBGraphImplem::getMultiCells ( const Box a_subbox) const

Referenced by preAllocatable().

◆ getAllFaces()

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

Referenced by preAllocatable().

◆ getIrregFaces()

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

Referenced by preAllocatable().

◆ fillMask()

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

0 outside problem domain, multi-valued, covered 1 regular

Referenced by preAllocatable().

◆ fillCellTypeMask()

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

0 outside problem domain 1 covered 2 regular 3 irregular handy for debugging, can write out to hdf5 files.

Referenced by preAllocatable().

◆ addFullIrregularVoFs()

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

◆ addEmptyIrregularVoFs()

void EBGraphImplem::addEmptyIrregularVoFs ( const IntVectSet a_vofsToChange)

◆ getRegNextToMultiValued()

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

◆ getMultiValuedFaces()

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

◆ FaceIteratorCache() [1/2]

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

◆ FaceIteratorCache() [2/2]

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

◆ VoFIteratorCache()

const VoFIterator& EBGraphImplem::VoFIteratorCache ( const IntVectSet ivs,
const EBGraph parent 
) const

◆ operator=()

void EBGraphImplem::operator= ( const EBGraphImplem ebiin)
inlineprivate

References MayDay::Error().

Friends And Related Function Documentation

◆ EBIndexSpace

friend class EBIndexSpace
friend

◆ EBISLevel

friend class EBISLevel
friend

Member Data Documentation

◆ s_ivDebug

IntVect EBGraphImplem::s_ivDebug
static

◆ s_doDebug

Box EBGraphImplem::s_doDebug
static

◆ m_region

Box EBGraphImplem::m_region
private

box over which this graph is defined

◆ m_domain

ProblemDomain EBGraphImplem::m_domain
private

computational domain at this level of refinement

◆ m_tag

TAG EBGraphImplem::m_tag
private

If this is allregular or allcovered, the BaseFab below is undefined.

◆ m_graph

BaseFab<GraphNode> EBGraphImplem::m_graph
private

the graph description of the box. If the pointer GraphNode.m_thisNode == 0, the cell is covered. If the pointer GraphNode.m_thisNode == 1, the cell is regular. Otherwise, the pointer goes to the node of the graph.

◆ m_isDefined

bool EBGraphImplem::m_isDefined
private

◆ m_isDomainSet

bool EBGraphImplem::m_isDomainSet
private

◆ m_irregIVS

IntVectSet* EBGraphImplem::m_irregIVS
private

◆ m_multiIVS

IntVectSet* EBGraphImplem::m_multiIVS
private

◆ s_verbose

bool EBGraphImplem::s_verbose
staticprivate

◆ m_mask

BaseFab<char> EBGraphImplem::m_mask
mutableprivate

◆ m_isMaskBuilt

bool EBGraphImplem::m_isMaskBuilt
mutableprivate

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