13 #ifndef _EBINDEXSPACE_H_ 14 #define _EBINDEXSPACE_H_ 30 #include "NamespaceHeader.H" 32 typedef std::map<DisjointBoxLayout, EBISLayout>
dmap;
82 void dumpDebug(
const string& a_string);
86 void fixFineToCoarse(
EBISLevel& a_fineEBIS);
90 int numVoFsOnProc()
const;
96 void reconcileIrreg(
EBISLevel & a_otherPhase);
98 void cellStitch(
EBData& a_ebdataCoarA,
106 const int& a_bphase);
119 const bool & a_distributedData =
false,
120 const bool & a_fixRegularNextToMultiValued =
true);
132 const bool & a_distributedData =
false,
133 const bool & a_fixRegularNextToMultiValued =
true);
155 const int& a_nghost)
const;
169 const Real& getDX()
const;
174 void fixRegularNextToMultiValued();
176 void clearMultiBoundaries();
177 void setBoundaryPhase(
int phase);
220 const int a_ncellmax,
223 static void makeBoxes(std::list<Box>& a_boxes,
229 const int a_ncellmax);
242 bool match(
const Real& a_a,
243 const Real& a_b)
const;
248 void refreshCache()
const;
278 int a_maxCoarsenings = -1);
284 int a_maxCoarsenings = -1);
290 int a_maxCoarsenings = -1);
298 int a_maxCoarsenings = -1);
305 int a_maxCoarsenings,
306 bool a_fixRegularNextToMultiValued =
true);
309 bool a_fixRegularNextToMultiValued =
true);
323 bool was = m_distributedData;
324 m_distributedData =
true;
329 int numLevels()
const;
348 return m_ebisLevel[0]->getOrigin();
357 return m_domainLevel[level];
364 const int& a_nghost)
const;
370 bool isDefined()
const;
375 int getNCellMax()
const;
400 return m_ebisLevel[level]->getIrregGrids();
405 return m_ebisLevel[level]->getFlowGrids();
410 return m_ebisLevel[level]->m_grids;
415 return m_ebisLevel[level]->m_dx;
420 return m_ebisLevel[depth]->irregCells();
428 void resetLevels(
int nLevel);
438 const bool & a_onlyBiggest);
440 bool setAllConnectedVoFs(
Real& a_totalVolFrac,
446 const unsigned int& a_curNum);
448 void resetAllConnectedVoFs(
EBCellFAB& a_curEBCellFAB,
478 MayDay::Error(
"no copy construction of EBIndexSpace allowed");
483 const Real& a_b)
const 485 return (a_a < (a_b + m_tolerance)) && (a_a > (a_b - m_tolerance));
491 return D_TERM6( (a_a[0] < (a_b[0] + m_tolerance)) &&
492 (a_a[0] > (a_b[0] - m_tolerance)),
494 (a_a[1] < (a_b[1] + m_tolerance)) &&
495 (a_a[1] > (a_b[1] - m_tolerance)),
497 (a_a[2] < (a_b[2] + m_tolerance)) &&
498 (a_a[2] > (a_b[2] - m_tolerance)),
500 (a_a[3] < (a_b[3] + m_tolerance)) &&
501 (a_a[3] > (a_b[3] - m_tolerance)),
503 (a_a[4] < (a_b[4] + m_tolerance)) &&
504 (a_a[4] > (a_b[4] - m_tolerance)),
506 (a_a[5] < (a_b[5] + m_tolerance)) &&
507 (a_a[5] > (a_b[5] - m_tolerance)));
510 #include "NamespaceFooter.H" int m_nlevels
Definition: EBIndexSpace.H:465
IntVectSet irregCells(int depth=0) const
Definition: EBIndexSpace.H:418
DisjointBoxLayout getIrregGrids(int level) const
Definition: EBIndexSpace.H:398
static bool s_verbose
Definition: EBIndexSpace.H:468
Vector< EBISLevel * > m_ebisLevel
Definition: EBIndexSpace.H:462
A reference-counting handle class.
Definition: RefCountedPtr.H:66
#define D_TERM6(a, b, c, d, e, f)
Definition: CHArray.H:40
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
DisjointBoxLayout getFlowGrids(int level) const
Definition: EBIndexSpace.H:403
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
DisjointBoxLayout levelGrids(int level) const
Definition: EBIndexSpace.H:408
Definition: EBIndexSpace.H:260
Chombo_EBIS()
Definition: EBIndexSpace.H:51
static Real s_tolerance
Definition: EBIndexSpace.H:467
std::map< int, dmap > m_cache
Definition: EBIndexSpace.H:204
int m_nCellMax
Definition: EBIndexSpace.H:457
DisjointBoxLayout m_grids
Definition: EBIndexSpace.H:185
~Chombo_EBIS()
Definition: EBIndexSpace.H:54
Definition: EBIndexSpace.H:79
bool m_isDefined
Definition: EBIndexSpace.H:458
RealVect m_origin
Definition: EBIndexSpace.H:191
bool setDistributedData()
Definition: EBIndexSpace.H:321
singleton version of EBIndexSpace.
Definition: EBIndexSpace.H:37
RealVect getOrigin() const
Definition: EBIndexSpace.H:346
Real dx(int level) const
Definition: EBIndexSpace.H:413
Vector< ProblemDomain > m_domainLevel
Definition: EBIndexSpace.H:463
int m_cacheStale
Definition: EBIndexSpace.H:206
Geometric description within a box.
Definition: EBGraph.H:432
LevelData< EBGraph > m_graph
Definition: EBIndexSpace.H:197
static void alias(const EBIndexSpace *a_input)
EBISLevel(const EBISLevel &ebiin)
Definition: EBIndexSpace.H:237
static EBIndexSpace * instance()
static bool s_aliased
if you want to sneak an existing EBIS into the singleton.
Definition: EBIndexSpace.H:58
void operator=(const EBIndexSpace &ebiin)
Definition: EBIndexSpace.H:471
Definition: EBCellFAB.H:29
LevelData< EBData > m_data
Definition: EBIndexSpace.H:200
double Real
Definition: REAL.H:33
Definition: GeometryService.H:37
ProblemDomain m_domain
Definition: EBIndexSpace.H:188
IndexTM< T, N > max(const IndexTM< T, N > &a_p1, const IndexTM< T, N > &a_p2)
Definition: IndexTMI.H:403
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:31
EBIndexSpace(const EBIndexSpace &ebiin)
Definition: EBIndexSpace.H:476
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
int write(HDF5Handle &a_handle, const BoxLayout &a_layout, const std::string &name="boxes")
writes BoxLayout to HDF5 file.
bool m_distributedData
Definition: EBIndexSpace.H:460
static EBIndexSpace * s_instance
Definition: EBIndexSpace.H:49
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Real m_dx
Definition: EBIndexSpace.H:194
static Real s_tolerance
Definition: EBIndexSpace.H:208
Real m_tolerance
Definition: EBIndexSpace.H:202
void setCellMax(int max)
Definition: EBIndexSpace.H:423
Handle to a particular group in an HDF file.
Definition: CH_HDF5.H:267
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Volume of Fluid Index.
Definition: VolIndex.H:31
const ProblemDomain & getBox(int level) const
Definition: EBIndexSpace.H:355
Definition: EBISLayout.H:39
std::map< DisjointBoxLayout, EBISLayout > dmap
Definition: EBIndexSpace.H:32
bool match(const Real &a_a, const Real &a_b) const
Definition: EBIndexSpace.H:482
static bool s_MFSingleBox
Definition: EBIndexSpace.H:434
void operator=(const EBISLevel &ebiin)
Definition: EBIndexSpace.H:232
static bool s_verbose
Definition: EBIndexSpace.H:209
int m_phase
Definition: EBIndexSpace.H:179