#include <source/mesh/clustering/AsyncBergerRigoutsosNode.h>
Inheritance diagram for SAMRAI::mesh::AsyncBergerRigoutsosNode< DIM >:
Public Types | |
typedef hier::LayerNodeSet< DIM >::Node | GraphNode |
Shorthand for the box-graph node corresponding to boxes. | |
typedef hier::LayerNodeSet< DIM >::NodeContainer | GraphNodeContainer |
Shorthand for a container of graph-nodes. | |
typedef hier::LayerEdgeSet< DIM >::NabrContainer | GraphNabrContainer |
Shorthand for a container of neighbor graph-nodes. | |
typedef hier::LayerEdgeSet< DIM >::Connectivity | Connectivity |
Shortthand for the connectivity between two sets of graph nodes. | |
typedef set< int > | IntSet |
Shorthand for a sorted, possibly incontiguous, set of integers. | |
enum | OwnerMode { SINGLE_OWNER = 0, MOST_OVERLAP = 1, FEWEST_OWNED = 2, LEAST_ACTIVE = 3 } |
Public Member Functions | |
AsyncBergerRigoutsosNode (CommonParams *common_params, const hier::Box< DIM > *bound_box=NULL, mesh::AsyncBergerRigoutsosNode< DIM > *parent=NULL, const int child_number=1) | |
Construct a node of a BR dendogram. | |
~AsyncBergerRigoutsosNode (void) | |
Destructor. | |
void | setMaxGhostCellWidth (const hier::IntVector< DIM > &max_gcw) |
Set the maximum ghost cell width used for checking overlaps. | |
void | setAlgorithmAdvanceMode (const string &algo_advance_mode) |
Set the mode for advancing the asynchronous implementation. | |
void | setOwnerMode (const string &mode) |
Set the method for choosing the owner. Choices:
| |
void | setUseLevelBoxes (bool flag) |
Switch on or off the use of global level boxes. | |
void | setComputeEdges (int compute_edges) |
Edge computation flag. | |
void | runAlgorithm () |
Run the BR algorithm to find boxes. | |
const hier::LayerNodeSet< DIM > & | getNewNodes () const |
Get the output boxes in a hier::LayerNodeSet<DIM> form. | |
const Connectivity & | getNewCnect () const |
Get the connectivity between input and output graph nodes (between the tagged and new graph nodes). | |
void | printClassData (ostream &os, int detail_level=0) const |
int | getMaxNodes () const |
Max number of local nodes for dendogram. | |
int | getMaxGeneration () const |
max generation count for the local nodes in the dendogram. | |
int | getMaxOwnership () const |
Max number of locally owned nodes in the dendogram. | |
double | getAvgNumberOfCont () const |
Average number of continuations for local nodes in dendogram. | |
int | getMaxNumberOfCont () const |
Max number of continuations for local nodes in dendogram. | |
int | getNumBoxesGenerated () const |
Number of boxes generated (but not necessarily owned) on the local process. | |
void | setLogNodeHistory (bool flag) |
Set whether to log dendogram node action history (useful for debugging). | |
Classes | |
struct | CommonParams |
Parameters shared among all dendogram nodes in an dendogram and collectively managed by those nodes. More... |
In mesh generation, the BR algorithm can be used to cluster tagged cells into boxes. This algorithm is described in Berger and Rigoutsos, IEEE Trans. on Sys, Man, and Cyber (21)5:1278-1286.
This class implements the BR algorithm to execute in a non-recursive way, in order to improve parallel efficiency over recursive implementations. To facilitate a non-recursive implementation, data in the recursive tree is maintained in a "BR dendogram", nodes of which are instances of this class.
Clarification on the uses of the word "node":
Each dendogram node is associated with a candidate box, an owner process coordinating distributed computations on the box and a group of processors participating in those computations. Should the candidate box be one of the final output boxes, the owner also owns the graph node associated with the box.
To use this class:
This class creates its output in a distributed nested-level box-graph (DNBG) format. The output is distributed over all processes running the algorithm, with each process owning a subset of the DNBG. The 2 primary outputs of this implementation are:
|
Shorthand for the box-graph node corresponding to boxes.
|
|
Shorthand for a container of graph-nodes.
|
|
Shorthand for a container of neighbor graph-nodes.
|
|
Shortthand for the connectivity between two sets of graph nodes.
|
|
Shorthand for a sorted, possibly incontiguous, set of integers.
|
|
|
|
Construct a node of a BR dendogram. Construct a node node of a BR dendogram, which you can use to run the BR algorithm.
|
|
Destructor. Deallocate internal data. |
|
Set the maximum ghost cell width used for checking overlaps. Overlap checking is done to determine nearest-neighbor relationships when generating connectivity to new graph nodes. If a box grown by this ammount intersects another box, the two boxes are considered neighbors. By default the max ghost cell width is one in each direction. |
|
Set the mode for advancing the asynchronous implementation. Choices are:
The default is "ADVANCE_SOME". Asynchronous modes are NOT guaranteed to compute the output graph nodes in any particular order. The order depends on the ordering of message completion, which is not deterministic. If you require consistent outputs, we suggest you have a scheme for reordering the output boxes. |
|
Set the method for choosing the owner. Choices:
Experiments show that "MOST_OVERLAP" gives the best clustering speed, while "SINGLE_OWNER" may give a faster output globalization (since you don't need an all-gather). |
|
Switch on or off the use of global level boxes. If off, the global level boxes will neither be used nor be generated. This feature is in anticipation of future support for the distributed nested-level box graph in SAMRAI. |
|
Edge computation flag. Valid values to set are:
By default, the value is 2. |
|
Run the BR algorithm to find boxes.
|
|
Get the output boxes in a hier::LayerNodeSet<DIM> form.
|
|
Get the connectivity between input and output graph nodes (between the tagged and new graph nodes). The connectivity data generated depend on the flag set using setComputeEdges(). |
|
|
|
Max number of local nodes for dendogram.
|
|
max generation count for the local nodes in the dendogram.
|
|
Max number of locally owned nodes in the dendogram.
|
|
Average number of continuations for local nodes in dendogram.
|
|
Max number of continuations for local nodes in dendogram.
|
|
Number of boxes generated (but not necessarily owned) on the local process.
|
|
Set whether to log dendogram node action history (useful for debugging).
|