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

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

List of all members.

Public Member Functions

 BinaryTree (const ProcessorMapping &mapping, const BoxArray< DIM > &boxes)
 ~BinaryTree ()
bool participates (int node_id, const Box< DIM > &box)
int findParticipatingAnscestor (const Box< DIM > &box)
void findParticipatingDescendants (const Box< DIM > &box, tbox::Array< int > &id_out)
void reduce (const Box< DIM > &box, int *data, int len)
void partialBcast (const Box< DIM > &participants_box, Box< DIM > &box_to_bcast)
void partialBcast (const Box< DIM > &participants_box, int &value)
void buildParticipatingCommunicator (const Box< DIM > &box, tbox::SAMRAI_MPI::comm old_comm, tbox::SAMRAI_MPI::group &new_group, tbox::SAMRAI_MPI::comm &new_comm)


Detailed Description

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

Class BinaryTree<DIM> is a utility class designed to support more efficient implementations of the Berger-Rigoutsous clustering algorithm.


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::BinaryTree< DIM >::BinaryTree ( const ProcessorMapping mapping,
const BoxArray< DIM > &  boxes 
)

Constructs a binary tree. If "number_of_nodes = 0," the tree will be constructed with the same number of nodes as there are MPI processes.

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

The destructor does nothing of public interest.


Member Function Documentation

template<int DIM>
bool SAMRAI::hier::BinaryTree< DIM >::participates ( int  node_id,
const Box< DIM > &  box 
)

Returns true if "box" intersects a patch that is local to the processor "node_id;" else returns false. However, always returns true when node_id == findRoot(). (This a highly specialized call, designed for use with Berger-Rigoutsous research.) (You must call init() before calling this method.)

template<int DIM>
int SAMRAI::hier::BinaryTree< DIM >::findParticipatingAnscestor ( const Box< DIM > &  box  ) 

Returns the processor id of the nearest anscestor in the tree that has a local patch that intersects with box. If no such processor exists, returns the id of the root node. (This a highly specialized call, designed for use with Berger-Rigoutsous research.) (You must call init() before calling this method.)

template<int DIM>
void SAMRAI::hier::BinaryTree< DIM >::findParticipatingDescendants ( const Box< DIM > &  box,
tbox::Array< int > &  id_out 
)

Returns, in id_out, the processor ids of this processor's descendants that will send to this processor (i.e., if "i" is listed in id_out, then when processor "i" calls findParticipatingAnscestor, id_out = this processor). Note that id_out may be empty on return. (This a highly specialized call, designed for use with Berger-Rigoutsous research.) (You must call init() before calling this method.)

template<int DIM>
void SAMRAI::hier::BinaryTree< DIM >::reduce ( const Box< DIM > &  box,
int *  data,
int  len 
)

Performs an all-to-one sum reduction on data; root ends up with the summation; a processor participates in the reduction only if it has a local patch that intersects with box. (This a highly specialized call, designed for use with Berger-Rigoutsous research.) (You must call init() before calling this method.)

template<int DIM>
void SAMRAI::hier::BinaryTree< DIM >::partialBcast ( const Box< DIM > &  participants_box,
Box< DIM > &  box_to_bcast 
)

Broadcasts "box_to_bcast" to a subset of processors. The subset is composed of those processors for which participatesInReduction(processor, participants_box) is true. (This a highly specialized call, designed for use with Berger-Rigoutsous research.) (You must call init() before calling this method.)

template<int DIM>
void SAMRAI::hier::BinaryTree< DIM >::partialBcast ( const Box< DIM > &  participants_box,
int &  value 
)

template<int DIM>
void SAMRAI::hier::BinaryTree< DIM >::buildParticipatingCommunicator ( const Box< DIM > &  box,
tbox::SAMRAI_MPI::comm  old_comm,
tbox::SAMRAI_MPI::group new_group,
tbox::SAMRAI_MPI::comm new_comm 
)


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:27 2009 for SAMRAI by  doxygen 1.5.1