Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

TreeIntVectSet Class Reference

#include <TreeIntVectSet.H>

Collaboration diagram for TreeIntVectSet:

Collaboration graph
[legend]
List of all members.

Detailed Description

IntVectSet implementation based on tree representation.

For explanations of these functions please look at IntVectSet class when the documentation doesn't appear here.

See also:
IntVectSet

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)
TreeIntVectSetoperator= (const TreeIntVectSet &a_sivs)
TreeIntVectSetoperator|= (const TreeIntVectSet &a_sivs)
 or

TreeIntVectSetoperator|= (const IntVect &a_iv)
TreeIntVectSetoperator|= (const Box &a_box)
TreeIntVectSetoperator &= (const TreeIntVectSet &s_sivs)
 and

TreeIntVectSetoperator &= (const Box &a_box)
 and

TreeIntVectSetoperator &= (const ProblemDomain &a_domain)
 and

TreeIntVectSetoperator-= (const TreeIntVectSet &a_sivs)
 not

TreeIntVectSetoperator-= (const IntVect &a_iv)
 not

TreeIntVectSetoperator-= (const Box &a_box)
 not

bool operator== (const TreeIntVectSet &lhs) const
 returns true if

Vector< BoxcreateBoxes () 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 grow (int igrow)
 
See also:
IntVectSet::grow


void grow (int idir, int igrow)
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 BoxminBox () 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 ()

Static Private Member Functions

void quadrantBox (const Box &inputBox, int quadrant, Box &outputQuadrant)
void clearTree (TreeNode &tree)
void expandNode (TreeNode &node)
int oppositeQuadrant (int index)
bool nextIntVect (const Box &box, IntVect &iv)
void nextNode (int &currentDepth)
void cloneNode (const TreeNode &src, TreeNode &dest)

Private Attributes

TreeNode m_tree
Box m_minBox
Box m_spanBox
int m_depth

Static Private Attributes

Pool treeNodePool
Vector< int > index
Vector< int > bufferOffset
Vector< TreeNode * > parents
Vector< Boxboxes
TreeNode full

Friends

class TreeIntVectSetIterator
struct Flag
class IntVectSet
void dumpTree (const TreeIntVectSet *set)


Constructor & Destructor Documentation

TreeIntVectSet::TreeIntVectSet  )  [inline]
 

TreeIntVectSet::TreeIntVectSet const Box  )  [inline]
 

TreeIntVectSet::TreeIntVectSet const TreeIntVectSet a_sivs  )  [inline]
 

TreeIntVectSet::~TreeIntVectSet  )  [inline]
 


Member Function Documentation

void TreeIntVectSet::define const Box  ) 
 

void TreeIntVectSet::define const TreeIntVectSet a_sivs  ) 
 

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

Vector<Box> TreeIntVectSet::createBoxes  )  const
 

Returns Vector<Box> representation of this IntVectSet.

Returns Vector<Box> representation of this IntVectSet.

void TreeIntVectSet::createBoxes Vector< Box > &  boxes,
int &  size
const
 

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 ;-)

See also:
IntVectSet::chop

void TreeIntVectSet::grow int  igrow  ) 
 

See also:
IntVectSet::grow

expensive

void TreeIntVectSet::grow int  idir,
int  igrow
 

expensive

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
 

const Box & TreeIntVectSet::minBox  )  const [inline]
 

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]
 

void TreeIntVectSet::quadrantBox const Box inputBox,
int  quadrant,
Box outputQuadrant
[static, private]
 

void TreeIntVectSet::clearTree TreeNode &  tree  )  [static, private]
 

void TreeIntVectSet::expandNode TreeNode &  node  )  [static, private]
 

void TreeIntVectSet::growTree  )  [private]
 

int TreeIntVectSet::oppositeQuadrant int  index  )  [static, private]
 

bool TreeIntVectSet::nextIntVect const Box box,
IntVect iv
[static, private]
 

void TreeIntVectSet::nextNode int &  currentDepth  )  [inline, static, private]
 

void TreeIntVectSet::cloneNode const TreeNode &  src,
TreeNode &  dest
[static, private]
 


Friends And Related Function Documentation

friend class TreeIntVectSetIterator [friend]
 

friend struct Flag [friend]
 

friend class IntVectSet [friend]
 

void dumpTree const TreeIntVectSet set  )  [friend]
 


Member Data Documentation

TreeNode TreeIntVectSet::m_tree [private]
 

Box TreeIntVectSet::m_minBox [private]
 

Box TreeIntVectSet::m_spanBox [private]
 

int TreeIntVectSet::m_depth [private]
 

Pool TreeIntVectSet::treeNodePool [static, private]
 

Vector<int> TreeIntVectSet::index [static, private]
 

Vector<int> TreeIntVectSet::bufferOffset [static, private]
 

Vector<TreeNode*> TreeIntVectSet::parents [static, private]
 

Vector<Box> TreeIntVectSet::boxes [static, private]
 

TreeNode TreeIntVectSet::full [static, private]
 


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 17:56:03 2004 for Chombo by doxygen 1.3.2