IBAMR  IBAMR version 0.19.
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SAMRAI::hier::BoxTreeNode< DIM > Class Template Reference

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

#include <BoxTreeNode.h>

Inheritance diagram for SAMRAI::hier::BoxTreeNode< DIM >:
Inheritance graph
[legend]

Classes

struct  Triple
 

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. More...
 
 ~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. More...
 
void findOverlapBoxes (BoxList< DIM > &overlap_boxes, const Box< DIM > &box)
 Create a list of all boxes that overlap the given box. More...
 
void count ()
 

Private Member Functions

 BoxTreeNode (const BoxTreeNode< DIM > &box)
 
BoxTreeNode< DIM > & operator= (const BoxTreeNode< DIM > &box)
 

Private Attributes

Box< DIM > d_domain
 
tbox::Pointer< BoxTreeNode< DIM > > d_left_child
 
tbox::Pointer< BoxTreeNode< DIM > > d_right_child
 
tbox::Array< Tripled_box_triples
 
tbox::Array< intd_work
 
int d_dim
 
tbox::Pointer< BoxTreeNode< DIM > > d_tree
 
int d_rank
 

Detailed Description

template<int DIM>
class SAMRAI::hier::BoxTreeNode< 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

◆ BoxTreeNode() [1/2]

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 box. The dim parameter is the dimension along which the domain will be cut when constructing child nodes.

Parameters
box_triplesinput
have_mappingtrue is the calling BoxTree was passed a processor mapping.
min_lengthif 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.
dimthe dimension along which the domain will be cut when constructing child nodes.
recurse_levelis a counter that is used internally to keep track of the recurse level. Do not change the default value.

◆ ~BoxTreeNode()

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

The dtor does nothing even slightly interesting.

◆ BoxTreeNode() [2/2]

template<int DIM>
SAMRAI::hier::BoxTreeNode< DIM >::BoxTreeNode ( const BoxTreeNode< DIM > &  box)
private

The copy ctor is not implemented.

Member Function Documentation

◆ findOverlapIndices()

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 
)

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
indicesthe indices of the overlapping boxes.
boxthe specified box whose overlaps are requested.
find_local_boxesswitch to determine if all overlapping boxes are returned, or only those boxes that overlap and are local to this processor.
recurse_levelis a counter that is used internally to keep track of the recurse level. Do not change the default value.

◆ findOverlapBoxes()

template<int DIM>
void SAMRAI::hier::BoxTreeNode< DIM >::findOverlapBoxes ( BoxList< DIM > &  overlap_boxes,
const Box< DIM > &  box 
)
Parameters
overlap_boxesboxlist containing boxes that overlap with box.
boxthe specified box whose overlaps are requested.

◆ count()

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.

◆ operator=()

template<int DIM>
BoxTreeNode<DIM>& SAMRAI::hier::BoxTreeNode< DIM >::operator= ( const BoxTreeNode< DIM > &  box)
private

The assignemnt operator is not implemented.

Member Data Documentation

◆ d_domain

template<int DIM>
Box<DIM> SAMRAI::hier::BoxTreeNode< DIM >::d_domain
private

The physical domain that this node represents.

◆ d_left_child

template<int DIM>
tbox::Pointer< BoxTreeNode<DIM> > SAMRAI::hier::BoxTreeNode< DIM >::d_left_child
private

Pointers to familial nodes.

◆ d_right_child

template<int DIM>
tbox::Pointer< BoxTreeNode<DIM> > SAMRAI::hier::BoxTreeNode< DIM >::d_right_child
private

◆ d_box_triples

template<int DIM>
tbox::Array<Triple> SAMRAI::hier::BoxTreeNode< DIM >::d_box_triples
private

The list of boxes, and their associated indices and processor mappings, that are contained within the physical domain that this node represents.

◆ d_work

template<int DIM>
tbox::Array<int> SAMRAI::hier::BoxTreeNode< DIM >::d_work
private

Working space that is used in findOverlapIndices

◆ d_dim

template<int DIM>
int SAMRAI::hier::BoxTreeNode< DIM >::d_dim
private

The dimension along which the input box triples will be partitioned.

◆ d_tree

template<int DIM>
tbox::Pointer< BoxTreeNode<DIM> > SAMRAI::hier::BoxTreeNode< DIM >::d_tree
private

A tree rooted at this node. The tree is constructed from d_box_triples; these boxes are partitioned along dimension d_dim - 1.

◆ d_rank

template<int DIM>
int SAMRAI::hier::BoxTreeNode< DIM >::d_rank
private

This processor's rank.


The documentation for this class was generated from the following file: