#include <source/hierarchy/boxes/BoxTreeNode.h>
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 |
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.
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.
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. |
SAMRAI::hier::BoxTreeNode< DIM >::~BoxTreeNode | ( | ) |
The dtor does nothing even slightly interesting.
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.
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. |
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.
overlap_boxes | boxlist containing boxes that overlap with box. | |
box | the specified box whose overlaps are requested. |
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.