Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::hier::BoxTreeNode< DIM > Class Template Reference

Building block used by BoxTree<DIM>. More...

#include <source/hierarchy/boxes/BoxTreeNode.h>

List of all members.

Public Member Functions

 BoxTreeNode (const tbox::Array< typename BoxTreeNode< DIM >::Triple > box_triples, bool have_mapping, int min_length=10, int dim=DIM-1, int recurse_level=0)
 Constructs a BoxTreeNode that represents the physical domain specified by the bounding box that includes all boxes in box_triples.
 ~BoxTreeNode ()
void findOverlapIndices (tbox::List< int > &indices, const Box< DIM > &box, bool find_local_boxes, int recurse_level=0)
 Compute the box array indices of boxes that overlap the given box.
void findOverlapBoxes (BoxList< DIM > &overlap_boxes, const Box< DIM > &box)
 Create a list of all boxes that overlap the given box.
void count ()

Classes

struct  Triple


Detailed Description

template<int DIM>
class SAMRAI::hier::BoxTreeNode< DIM >

Building block used by BoxTree<DIM>.

This is a private class that is used by the BoxTree<DIM> class; there is no reason that anyone should make direct use of this class.


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::BoxTreeNode< DIM >::BoxTreeNode const tbox::Array< typename BoxTreeNode< DIM >::Triple box_triples,
bool  have_mapping,
int  min_length = 10,
int  dim = DIM-1,
int  recurse_level = 0
 

Constructs a BoxTreeNode that represents the physical domain specified by the bounding box that includes all boxes in box_triples.

Constructs a BoxTreeNode that represents the physical domain specified by box. The dim parameter is the dimension along which the domain will be cut when constructing child nodes.

Parameters:
box_triples input
have_mapping true is the calling BoxTree was passed a processor mapping.
min_length if box_triples contains less than min_length elements, than the list will never be partitioned amongst child nodes. Setting to a larger value tends to decrease the total number of nodes in the tree (and hence reduces memory requirements), but increase the cost of findOverlappingBoxes.
dim the dimension along which the domain will be cut when constructing child nodes.
recurse_level is a counter that is used internally to keep track of the recurse level. Do not change the default value.

template<int DIM>
SAMRAI::hier::BoxTreeNode< DIM >::~BoxTreeNode  ) 
 

The dtor does nothing even slightly interesting.


Member Function Documentation

template<int DIM>
void SAMRAI::hier::BoxTreeNode< DIM >::findOverlapIndices tbox::List< int > &  indices,
const Box< DIM > &  box,
bool  find_local_boxes,
int  recurse_level = 0
 

Compute the box array indices of boxes that overlap the given box.

If find_local_boxes = false, then the return array, indices, contains the indices of the boxes (wrt the BoxArray that was passed to the constructor) and that overlap with the specified box. If find_local_boxes = true, then only the indices of those boxes that overlap and whose corresponding patches are mapped to this processor are returned.

Parameters:
indices the indices of the overlapping boxes.
box the specified box whose overlaps are requested.
find_local_boxes switch to determine if all overlapping boxes are returned, or only those boxes that overlap and are local to this processor.
recurse_level is a counter that is used internally to keep track of the recurse level. Do not change the default value.

template<int DIM>
void SAMRAI::hier::BoxTreeNode< DIM >::findOverlapBoxes BoxList< DIM > &  overlap_boxes,
const Box< DIM > &  box
 

Create a list of all boxes that overlap the given box.

Parameters:
overlap_boxes boxlist containing boxes that overlap with box.
box the specified box whose overlaps are requested.

template<int DIM>
void SAMRAI::hier::BoxTreeNode< DIM >::count  ) 
 

Counts the total number of nodes in all trees rooted at this node, and add this to the totals storeed in BoxTree<DIM>::s_node_count and BoxTree<DIM>::s_box_count. This is a recursive call, i.e, all nodes in all subtrees rooted at this node are also examined.

This call is primarily of interest for gathering information on performance, during development and testing.


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:24:32 2005 for SAMRAI by  doxygen 1.4.2