11 #ifndef _TREEINTVECTSET_H_ 12 #define _TREEINTVECTSET_H_ 16 #include "NamespaceHeader.H" 28 #define TIVS_NODESIZE 2 29 #elif (CH_SPACEDIM==2) 30 #define TIVS_NODESIZE 4 31 #elif (CH_SPACEDIM==3) 32 #define TIVS_NODESIZE 8 33 #elif (CH_SPACEDIM==4) 34 #define TIVS_NODESIZE 16 35 #elif (CH_SPACEDIM==5) 36 #define TIVS_NODESIZE 32 37 #elif (CH_SPACEDIM==6) 38 #define TIVS_NODESIZE 64 41 #error TIVS_NODESIZE is only defined for 1D, 2D, 3D, 4D, 5D, or 6D 192 void grow(
int igrow);
198 void grow(
int idir,
int igrow);
218 void refine(
int iref = 2);
262 void linearIn(
const void*
const inBuf);
264 void linearOut(
void*
const a_outBuf)
const;
304 static void nextNode(
int& currentDepth);
305 static void cloneNode(
const TreeNode& src, TreeNode& dest);
316 static TreeNode*
P1[24];
318 static const TreeNode*
P2[24];
320 #pragma omp threadprivate(boxes,otherBoxes) 321 #pragma omp threadprivate(parents,otherParents,P1,P2) 322 #pragma omp threadprivate(index, otherIndex) 341 const IntVect& operator()()
const ;
408 return *
this|=
Box(iv, iv);
414 return *
this-=
Box(iv, iv);
452 for (
int i=0; i<b.
size(); ++i) os<<b[i]<<std::endl;
475 while (
index[depth] == TIVS_NODESIZE)
483 #include "NamespaceFooter.H" 484 #endif // TREEINTVECTSET_H
friend void dumpTree(const TreeIntVectSet *set)
bool contains(const IntVect &iv) const
const IntVect & operator()() const
Definition: TreeIntVectSet.H:424
TreeIntVectSet & operator=(const TreeIntVectSet &a_sivs)
void swap(TreeIntVectSet &a_other)
trade internals of two objects
TreeIntVectSet & operator &=(const TreeIntVectSet &s_sivs)
and
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
static int otherIndex[24]
Definition: TreeIntVectSet.H:314
void linearOut(void *const a_outBuf) const
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
static int index[24]
Definition: TreeIntVectSet.H:314
bool ok() const
Definition: TreeIntVectSet.H:394
TreeIntVectSet & operator-=(const TreeIntVectSet &a_sivs)
not
TreeIntVectSetIterator()
Definition: TreeIntVectSet.H:361
static Box otherBoxes[24]
Definition: TreeIntVectSet.H:319
Vector< const TreeIntVectSet::TreeNode * > nodes
Definition: TreeIntVectSet.H:349
bool operator<(const TreeIntVectSet &a_sivs) const
TreeNode m_tree
Definition: TreeIntVectSet.H:285
static Pool treeNodePoolObject
Definition: TreeIntVectSet.H:292
Vector< Box > boxes
Definition: TreeIntVectSet.H:350
IntVectSet implementation based on tree representation.
Definition: TreeIntVectSet.H:93
void transfer(TreeNode &node, const Box &a_box)
static void clearTree(TreeNode &tree)
static const TreeNode * P2[24]
Definition: TreeIntVectSet.H:318
Definition: EBInterface.H:45
void resize(unsigned int isize)
Definition: Vector.H:346
void trimCoarsen(int icoarse)
static Box boxes[24]
Definition: TreeIntVectSet.H:319
Box m_minBox
Definition: TreeIntVectSet.H:286
void shift(const IntVect &iv)
slow operation
void clear()
Definition: TreeIntVectSet.H:372
void define(const TreeIntVectSet &ivs)
Definition: TreeIntVectSet.H:379
const TreeIntVectSet * m_ivs
Definition: TreeIntVectSet.H:348
static void cloneNode(const TreeNode &src, TreeNode &dest)
Definition: TreeIntVectSet.H:335
IntVect m_current
Definition: TreeIntVectSet.H:353
int m_depth
Definition: TreeIntVectSet.H:352
Pool is a class to optimize memory allocation.
Definition: Pool.H:63
IndexTM< T, N > max(const IndexTM< T, N > &a_p1, const IndexTM< T, N > &a_p2)
Definition: IndexTMI.H:401
friend struct Flag
Definition: TreeIntVectSet.H:329
size_t size() const
Definition: Vector.H:192
static bool nextIntVect(const Box &box, IntVect &iv)
void linearIn(const void *const inBuf)
static void nextNode(int ¤tDepth)
Definition: TreeIntVectSet.H:471
std::ostream & operator<<(std::ostream &os, const TreeIntVectSet &ivs)
Definition: TreeIntVectSet.H:449
static TreeNode * P1[24]
Definition: TreeIntVectSet.H:316
int m_depth
Definition: TreeIntVectSet.H:287
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
void nestingRegion(int a_radius, const Box &a_domain, int granularity)
friend class TreeIntVectSetIterator
Definition: TreeIntVectSet.H:269
static Pool * treeNodePool
Definition: TreeIntVectSet.H:293
void recalcMinBox() const
Box m_spanBox
Definition: TreeIntVectSet.H:286
static void expandNode(TreeNode &node)
static void quadrantBox(const Box &inputBox, int quadrant, Box &outputQuadrant)
void refine(int iref=2)
fast if iref is power of 2
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
TreeIntVectSet & operator|=(const TreeIntVectSet &a_sivs)
or
static const TreeNode * otherParents[24]
Definition: TreeIntVectSet.H:317
bool operator==(const TreeIntVectSet &lhs) const
returns true if
static int oppositeQuadrant(int index)
const Box & minBox() const
Definition: TreeIntVectSet.H:466
Vector< int > index
Definition: TreeIntVectSet.H:351
TreeIntVectSet chop(int idir, int chop_pnt)
Class which manages grid generation.
Definition: MeshRefine.H:26
static TreeNode * parents[24]
Definition: TreeIntVectSet.H:315
void operator++()
Definition: TreeIntVectSet.H:418
void end()
Definition: TreeIntVectSet.H:400
static TreeNode full
Definition: TreeIntVectSet.H:328
void coarsen(int iref=2)
fast if iref is power of 2
Vector< Box > createBoxes() const
Returns Vector<Box> representation of this IntVectSet.
~TreeIntVectSet()
Definition: TreeIntVectSet.H:432
TreeIntVectSet()
Definition: TreeIntVectSet.H:457