#include <source/hierarchy/boxes/BinaryTree.h>
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) |
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.
SAMRAI::hier::BinaryTree< DIM >::~BinaryTree | ( | ) |
The destructor does nothing of public interest.
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.)
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.)
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.)
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.)
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.)
void SAMRAI::hier::BinaryTree< DIM >::partialBcast | ( | const Box< DIM > & | participants_box, | |
int & | value | |||
) |
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 | |||
) |