#include <TreeIntVectSet.H>
For explanations of these functions please look at IntVectSet class when the documentation doesn't appear here.
Further details of how non-recursive TreeNode design works:
(for a 2D tree)
(m_tree) + -- 0
(a)+ - 0 1 1 + 1 <------you are here
+ - + - 0 0 1 0 1 0 0
for the node indicated, the 'index' vector would contain
index=[ 0 1 3 ...............] parents=[&m_tree &a ..................]
or directly refered to as m_tree.nodes[1].nodes[3]
the tree indicates a covering of an index space in either 1 or 0. 1 is stored in the tree by pointing at the static 'full' data member, 0 is stored as a 0.
every 'nodes' member of a TreeNode object can be either
0, &full, or a pointer .
The interpretation of the tree depends on what m_spanBox is. nodes[i] indicates whether the i'th quadrant of the parent Box is full, empty, or needs to be parsed deeper.
Public Member Functions | |
TreeIntVectSet () | |
TreeIntVectSet (const Box &) | |
TreeIntVectSet (const TreeIntVectSet &a_sivs) | |
~TreeIntVectSet () | |
void | define (const Box &) |
void | define (const TreeIntVectSet &a_sivs) |
void | swap (TreeIntVectSet &a_other) |
trade internals of two objects | |
TreeIntVectSet & | operator= (const TreeIntVectSet &a_sivs) |
TreeIntVectSet & | operator|= (const TreeIntVectSet &a_sivs) |
or | |
TreeIntVectSet & | operator|= (const IntVect &a_iv) |
TreeIntVectSet & | operator|= (const Box &a_box) |
TreeIntVectSet & | operator &= (const TreeIntVectSet &s_sivs) |
and | |
TreeIntVectSet & | operator &= (const Box &a_box) |
and | |
TreeIntVectSet & | operator &= (const ProblemDomain &a_domain) |
and | |
TreeIntVectSet & | operator-= (const TreeIntVectSet &a_sivs) |
not | |
TreeIntVectSet & | operator-= (const IntVect &a_iv) |
not | |
TreeIntVectSet & | operator-= (const Box &a_box) |
not | |
bool | operator== (const TreeIntVectSet &lhs) const |
returns true if | |
bool | operator< (const TreeIntVectSet &a_sivs) const |
Vector< Box > | createBoxes () const |
Returns Vector<Box> representation of this IntVectSet. | |
void | createBoxes (Vector< Box > &boxes, int &size) const |
Returns Vector<Box> representation of this IntVectSet. | |
bool | contains (const IntVect &iv) const |
bool | contains (const Box &box) const |
TreeIntVectSet | chop (int idir, int chop_pnt) |
void | chop (int dir, int chop_pnt, TreeIntVectSet &a_hi) |
void | grow (int igrow) |
void | grow (int idir, int igrow) |
void | growHi () |
void | growHi (int a_dir) |
void | refine (int iref=2) |
fast if iref is power of 2 | |
void | coarsen (int iref=2) |
fast if iref is power of 2 | |
void | shift (const IntVect &iv) |
slow operation | |
void | clear () |
void | nestingRegion (int a_radius, const Box &a_domain, int granularity) |
void | nestingRegion (int a_radius, const ProblemDomain &a_domain, int granularity) |
const Box & | minBox () const |
bool | isEmpty () const |
int | numPts () const |
void | compact () const |
void | recalcMinBox () const |
Linearization routines | |
int | linearSize () const |
void | linearIn (const void *const inBuf) |
void | linearOut (void *const a_outBuf) const |
Private Member Functions | |
void | trimCoarsen (int icoarse) |
void | growTree () |
void | remove (const Box &box, TreeIntVectSet *resdiual) |
void | transfer (TreeNode &node, const Box &a_box) |
Static Private Member Functions | |
static void | quadrantBox (const Box &inputBox, int quadrant, Box &outputQuadrant) |
static void | clearTree (TreeNode &tree) |
static void | expandNode (TreeNode &node) |
static int | oppositeQuadrant (int index) |
static bool | nextIntVect (const Box &box, IntVect &iv) |
static void | nextNode (int ¤tDepth) |
static void | cloneNode (const TreeNode &src, TreeNode &dest) |
Private Attributes | |
TreeNode | m_tree |
Box | m_minBox |
Box | m_spanBox |
int | m_depth |
Static Private Attributes | |
static Pool | treeNodePoolObject |
static Pool * | treeNodePool |
static int | index [24] |
static int | otherIndex [24] |
static TreeNode * | parents [24] |
static TreeNode * | P1 [24] |
static const TreeNode * | otherParents [24] |
static const TreeNode * | P2 [24] |
static Box | boxes [24] |
static Box | otherBoxes [24] |
static TreeNode | full |
Friends | |
class | TreeIntVectSetIterator |
class | MeshRefine |
struct | Flag |
class | IntVectSet |
void | dumpTree (const TreeIntVectSet *set) |
TreeIntVectSet::TreeIntVectSet | ( | const TreeIntVectSet & | a_sivs | ) | [inline] |
References define().
TreeIntVectSet::~TreeIntVectSet | ( | ) | [inline] |
References clearTree(), and m_tree.
void TreeIntVectSet::define | ( | const Box & | ) |
Referenced by TreeIntVectSet().
void TreeIntVectSet::define | ( | const TreeIntVectSet & | a_sivs | ) |
void TreeIntVectSet::swap | ( | TreeIntVectSet & | a_other | ) |
trade internals of two objects
TreeIntVectSet& TreeIntVectSet::operator= | ( | const TreeIntVectSet & | a_sivs | ) |
TreeIntVectSet& TreeIntVectSet::operator|= | ( | const TreeIntVectSet & | a_sivs | ) |
or
TreeIntVectSet & TreeIntVectSet::operator|= | ( | const IntVect & | a_iv | ) | [inline] |
TreeIntVectSet& TreeIntVectSet::operator|= | ( | const Box & | a_box | ) |
TreeIntVectSet& TreeIntVectSet::operator &= | ( | const TreeIntVectSet & | s_sivs | ) |
and
TreeIntVectSet& TreeIntVectSet::operator &= | ( | const Box & | a_box | ) |
and
TreeIntVectSet& TreeIntVectSet::operator &= | ( | const ProblemDomain & | a_domain | ) |
and
TreeIntVectSet& TreeIntVectSet::operator-= | ( | const TreeIntVectSet & | a_sivs | ) |
not
TreeIntVectSet & TreeIntVectSet::operator-= | ( | const IntVect & | a_iv | ) | [inline] |
not
TreeIntVectSet& TreeIntVectSet::operator-= | ( | const Box & | a_box | ) |
not
bool TreeIntVectSet::operator== | ( | const TreeIntVectSet & | lhs | ) | const |
returns true if
bool TreeIntVectSet::operator< | ( | const TreeIntVectSet & | a_sivs | ) | const |
Primary sorting criterion: numPts(). Secondary sorting criterion: lexigraphical ordering of the IntVects, taken in the order traversed by TreeIntVectSetIterator. In a total tie, returns false.
Returns Vector<Box> representation of this IntVectSet.
Returns Vector<Box> representation of this IntVectSet.
Referenced by operator<<().
Returns Vector<Box> representation of this IntVectSet.
Returns Vector<Box> representation of this IntVectSet.
bool TreeIntVectSet::contains | ( | const IntVect & | iv | ) | const |
bool TreeIntVectSet::contains | ( | const Box & | box | ) | const |
TreeIntVectSet TreeIntVectSet::chop | ( | int | idir, | |
int | chop_pnt | |||
) |
somewhat expensive, but shouldn't be ;-)
void TreeIntVectSet::chop | ( | int | dir, | |
int | chop_pnt, | |||
TreeIntVectSet & | a_hi | |||
) |
a proper faster chop function that does it all in-place and saves the giant memory cost.
void TreeIntVectSet::grow | ( | int | igrow | ) |
void TreeIntVectSet::grow | ( | int | idir, | |
int | igrow | |||
) |
expensive
void TreeIntVectSet::growHi | ( | ) |
void TreeIntVectSet::growHi | ( | int | a_dir | ) |
void TreeIntVectSet::refine | ( | int | iref = 2 |
) |
fast if iref is power of 2
fast if iref is power of 2
void TreeIntVectSet::coarsen | ( | int | iref = 2 |
) |
fast if iref is power of 2
fast if iref is power of 2
void TreeIntVectSet::shift | ( | const IntVect & | iv | ) |
slow operation
void TreeIntVectSet::clear | ( | ) |
void TreeIntVectSet::nestingRegion | ( | int | a_radius, | |
const Box & | a_domain, | |||
int | granularity | |||
) |
void TreeIntVectSet::nestingRegion | ( | int | a_radius, | |
const ProblemDomain & | a_domain, | |||
int | granularity | |||
) |
bool TreeIntVectSet::isEmpty | ( | ) | const |
int TreeIntVectSet::numPts | ( | ) | const |
void TreeIntVectSet::compact | ( | ) | const |
void TreeIntVectSet::recalcMinBox | ( | ) | const |
int TreeIntVectSet::linearSize | ( | ) | const |
void TreeIntVectSet::linearIn | ( | const void *const | inBuf | ) |
void TreeIntVectSet::linearOut | ( | void *const | a_outBuf | ) | const |
void TreeIntVectSet::trimCoarsen | ( | int | icoarse | ) | [private] |
static void TreeIntVectSet::quadrantBox | ( | const Box & | inputBox, | |
int | quadrant, | |||
Box & | outputQuadrant | |||
) | [static, private] |
static void TreeIntVectSet::clearTree | ( | TreeNode & | tree | ) | [static, private] |
Referenced by ~TreeIntVectSet().
static void TreeIntVectSet::expandNode | ( | TreeNode & | node | ) | [static, private] |
void TreeIntVectSet::growTree | ( | ) | [private] |
void TreeIntVectSet::remove | ( | const Box & | box, | |
TreeIntVectSet * | resdiual | |||
) | [private] |
void TreeIntVectSet::transfer | ( | TreeNode & | node, | |
const Box & | a_box | |||
) | [private] |
static int TreeIntVectSet::oppositeQuadrant | ( | int | index | ) | [static, private] |
void TreeIntVectSet::nextNode | ( | int & | currentDepth | ) | [inline, static, private] |
References index.
static void TreeIntVectSet::cloneNode | ( | const TreeNode & | src, | |
TreeNode & | dest | |||
) | [static, private] |
friend class TreeIntVectSetIterator [friend] |
friend class MeshRefine [friend] |
friend struct Flag [friend] |
friend class IntVectSet [friend] |
void dumpTree | ( | const TreeIntVectSet * | set | ) | [friend] |
TreeNode TreeIntVectSet::m_tree [private] |
Referenced by TreeIntVectSet(), and ~TreeIntVectSet().
Box TreeIntVectSet::m_minBox [private] |
Referenced by minBox().
Box TreeIntVectSet::m_spanBox [private] |
int TreeIntVectSet::m_depth [private] |
Referenced by TreeIntVectSet().
Pool TreeIntVectSet::treeNodePoolObject [static, private] |
Pool* TreeIntVectSet::treeNodePool [static, private] |
int TreeIntVectSet::index[24] [static, private] |
Referenced by nextNode().
int TreeIntVectSet::otherIndex[24] [static, private] |
TreeNode* TreeIntVectSet::parents[24] [static, private] |
TreeNode* TreeIntVectSet::P1[24] [static, private] |
const TreeNode* TreeIntVectSet::otherParents[24] [static, private] |
const TreeNode* TreeIntVectSet::P2[24] [static, private] |
Box TreeIntVectSet::boxes[24] [static, private] |
Box TreeIntVectSet::otherBoxes[24] [static, private] |
TreeNode TreeIntVectSet::full [static, private] |