Chombo + EB  3.0
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
EBIndexSpace Class Reference

#include <EBIndexSpace.H>

Public Member Functions

 EBIndexSpace ()
 
void define (const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx, const GeometryService &a_geoserver, int a_nCellMax=-1, int a_maxCoarsenings=-1)
 
void define (HDF5Handle &a_handle, int a_maxCoarsenings=-1)
 
void define (EBISLevel *a_level0, int a_nCellMax=-1, int a_maxCoarsenings=-1)
 
void define (const ProblemDomain &a_entireDomain, const RealVect &a_origin, const Real &a_dx, const Vector< RefCountedPtr< EBIndexSpace > > &a_patches, const Vector< IntVect > &a_offsets, int a_maxCoarsenings=-1)
 
EBISLevelbuildFirstLevel (const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx, const GeometryService &a_geoserver, int a_nCellMax, int a_maxCoarsenings, bool a_fixRegularNextToMultiValued=true)
 
EBISLevelbuildNextLevel (const GeometryService &a_geoserver, bool a_fixRegularNextToMultiValued=true)
 
 ~EBIndexSpace ()
 
bool setDistributedData ()
 
int numLevels () const
 
int numVoFs (const ProblemDomain &a_domain) const
 
int getLevel (const ProblemDomain &a_domain) const
 
RealVect getOrigin () const
 
const ProblemDomaingetBox (int level) const
 
void fillEBISLayout (EBISLayout &a_ebis, const DisjointBoxLayout &a_grids, const ProblemDomain &a_domain, const int &a_nghost) const
 
bool isDefined () const
 
void clear ()
 
int getNCellMax () const
 
void write (HDF5Handle &a_handle, ProblemDomain a_outputLevel=ProblemDomain()) const
 
void writeInfo (HDF5Handle &handle) const
 
DisjointBoxLayout getIrregGrids (int level) const
 
DisjointBoxLayout getFlowGrids (int level) const
 
DisjointBoxLayout levelGrids (int level) const
 
Real dx (int level) const
 
IntVectSet irregCells (int depth=0) const
 
void setCellMax (int max)
 
void resetLevels (int nLevel)
 
Vector< RefCountedPtr
< EBIndexSpace > > 
connectedComponents ()
 
RefCountedPtr< EBIndexSpacebiggestConnectedComponent (int &a_numComponents)
 

Static Public Attributes

static bool s_MFSingleBox
 

Private Member Functions

Vector< RefCountedPtr
< EBIndexSpace > > 
findConnectedComponents (int &a_numComponents, const bool &a_onlyBiggest)
 
bool setAllConnectedVoFs (Real &a_totalVolFrac, EBCellFAB &a_curEBCellFAB, const EBGraph &a_curEBGraph, const EBISBox &a_curEBISBox, const VolIndex &a_curVoF, const VolIndex &a_lastVoF, const unsigned int &a_curNum)
 
void resetAllConnectedVoFs (EBCellFAB &a_curEBCellFAB, const EBGraph &a_curEBGraph, const EBISBox &a_curEBISBox, const VolIndex &a_curVoF, const VolIndex &a_lastVoF)
 
void operator= (const EBIndexSpace &ebiin)
 
 EBIndexSpace (const EBIndexSpace &ebiin)
 

Private Attributes

int m_nCellMax
 
bool m_isDefined
 
bool m_distributedData
 
Vector< EBISLevel * > m_ebisLevel
 
Vector< ProblemDomainm_domainLevel
 
int m_nlevels
 

Static Private Attributes

static Real s_tolerance
 
static bool s_verbose
 

Friends

class Chombo_EBIS
 

Detailed Description

EBIndexSpace represents the geometric information of the domain. It should be generated through the Chombo_EBIS class. This follows the singleton pattern.

Constructor & Destructor Documentation

EBIndexSpace::EBIndexSpace ( )
EBIndexSpace::~EBIndexSpace ( )
EBIndexSpace::EBIndexSpace ( const EBIndexSpace ebiin)
inlineprivate

References MayDay::Error().

Member Function Documentation

void EBIndexSpace::define ( const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx,
const GeometryService a_geoserver,
int  a_nCellMax = -1,
int  a_maxCoarsenings = -1 
)

If a_ncellMax is set, that is the max width of an internal grid. Otherwise use defaults of (16 in 3D, 64 in 2d)

void EBIndexSpace::define ( HDF5Handle a_handle,
int  a_maxCoarsenings = -1 
)
void EBIndexSpace::define ( EBISLevel a_level0,
int  a_nCellMax = -1,
int  a_maxCoarsenings = -1 
)
void EBIndexSpace::define ( const ProblemDomain a_entireDomain,
const RealVect a_origin,
const Real a_dx,
const Vector< RefCountedPtr< EBIndexSpace > > &  a_patches,
const Vector< IntVect > &  a_offsets,
int  a_maxCoarsenings = -1 
)
EBISLevel* EBIndexSpace::buildFirstLevel ( const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx,
const GeometryService a_geoserver,
int  a_nCellMax,
int  a_maxCoarsenings,
bool  a_fixRegularNextToMultiValued = true 
)
EBISLevel* EBIndexSpace::buildNextLevel ( const GeometryService a_geoserver,
bool  a_fixRegularNextToMultiValued = true 
)
bool EBIndexSpace::setDistributedData ( )
inline

Set a flag that indicates the data defining the EB is distributed. This will signal EBISLevel to hand grid generation off to the GeometryService. Function returns previous value of m_distributedData. Call this before define() if this functionality is desired.

References m_distributedData.

int EBIndexSpace::numLevels ( ) const
int EBIndexSpace::numVoFs ( const ProblemDomain a_domain) const

Get the number of vofs over the entire domain. This is blocking as a broadcast and gather are required.

int EBIndexSpace::getLevel ( const ProblemDomain a_domain) const

return level index of domain. return -1 if a_domain does not correspond to any refinement of EBIS.

RealVect EBIndexSpace::getOrigin ( ) const
inline

References m_ebisLevel.

const ProblemDomain& EBIndexSpace::getBox ( int  level) const
inline

returns the problem domain box at a level of refinement

References m_domainLevel.

void EBIndexSpace::fillEBISLayout ( EBISLayout a_ebis,
const DisjointBoxLayout a_grids,
const ProblemDomain a_domain,
const int &  a_nghost 
) const
bool EBIndexSpace::isDefined ( ) const

Return true if the define function has been called.

void EBIndexSpace::clear ( )
int EBIndexSpace::getNCellMax ( ) const
void EBIndexSpace::write ( HDF5Handle a_handle,
ProblemDomain  a_outputLevel = ProblemDomain() 
) const

Writes out finest level as a default. Writes at the level you are domain you want if a_outputLevel is defined.

void EBIndexSpace::writeInfo ( HDF5Handle handle) const
DisjointBoxLayout EBIndexSpace::getIrregGrids ( int  level) const
inline

References m_ebisLevel.

DisjointBoxLayout EBIndexSpace::getFlowGrids ( int  level) const
inline

References m_ebisLevel.

DisjointBoxLayout EBIndexSpace::levelGrids ( int  level) const
inline

References m_ebisLevel.

Real EBIndexSpace::dx ( int  level) const
inline

References m_ebisLevel.

IntVectSet EBIndexSpace::irregCells ( int  depth = 0) const
inline

References m_ebisLevel.

void EBIndexSpace::setCellMax ( int  max)
inline

References m_nCellMax, and max().

void EBIndexSpace::resetLevels ( int  nLevel)
Vector<RefCountedPtr<EBIndexSpace> > EBIndexSpace::connectedComponents ( )
RefCountedPtr<EBIndexSpace> EBIndexSpace::biggestConnectedComponent ( int &  a_numComponents)
Vector<RefCountedPtr<EBIndexSpace> > EBIndexSpace::findConnectedComponents ( int &  a_numComponents,
const bool &  a_onlyBiggest 
)
private
bool EBIndexSpace::setAllConnectedVoFs ( Real a_totalVolFrac,
EBCellFAB a_curEBCellFAB,
const EBGraph a_curEBGraph,
const EBISBox a_curEBISBox,
const VolIndex a_curVoF,
const VolIndex a_lastVoF,
const unsigned int &  a_curNum 
)
private
void EBIndexSpace::resetAllConnectedVoFs ( EBCellFAB a_curEBCellFAB,
const EBGraph a_curEBGraph,
const EBISBox a_curEBISBox,
const VolIndex a_curVoF,
const VolIndex a_lastVoF 
)
private
void EBIndexSpace::operator= ( const EBIndexSpace ebiin)
inlineprivate

References MayDay::Error().

Friends And Related Function Documentation

friend class Chombo_EBIS
friend

This makes Chombo_EBIS be the only function that can call the private constructor.

Member Data Documentation

bool EBIndexSpace::s_MFSingleBox
static
int EBIndexSpace::m_nCellMax
private

Referenced by setCellMax().

bool EBIndexSpace::m_isDefined
private
bool EBIndexSpace::m_distributedData
private

Referenced by setDistributedData().

Vector<EBISLevel*> EBIndexSpace::m_ebisLevel
private
Vector<ProblemDomain> EBIndexSpace::m_domainLevel
private

Referenced by getBox().

int EBIndexSpace::m_nlevels
private
Real EBIndexSpace::s_tolerance
staticprivate
bool EBIndexSpace::s_verbose
staticprivate

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