|
IBAMR
IBAMR version 0.19.
|
#include <BinaryTree.h>
Classes | |
| struct | binTreeNode |
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) |
Private Member Functions | |
| int | findParent (int node) |
| int | findLeftChild (int node) |
| int | findRightChild (int node) |
| int | findRoot () |
| void | preorderComputation (int node_id, const Box< DIM > &box) |
| BinaryTree (const BinaryTree< DIM > &) | |
| BinaryTree< DIM > & | operator= (const BinaryTree< DIM > &) |
Private Attributes | |
| tbox::Array< binTreeNode > | d_tree |
| int | d_root |
| ProcessorMapping | d_mapping |
| tbox::Array< Box< DIM > > | d_boxes |
| tbox::Array< int > | d_first |
| tbox::Array< int > | d_descendants |
| int | d_descendants_len |
| int | d_myid |
Class BinaryTree<DIM> is a utility class designed to support more efficient implementations of the Berger-Rigoutsous clustering algorithm.
| 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.
|
private |
| 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 | ||
| ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17