#include <source/mesh/clustering/HistogramBox.h>
Public Types | |
enum | { ORIGINAL_MODE = 0, ORIG_FAST_REDUCE_MODE = 1, BINARY_TREE_MODE = 2, COMMUNICATOR_MODE = 3 } |
Public Member Functions | |
HistogramBox () | |
HistogramBox (const hier::Box< DIM > &box) | |
~HistogramBox () | |
void | findBoundBoxForTags (hier::Box< DIM > &bound_box, const hier::IntVector< DIM > &min_box) const |
void | boundTagHistogram (int &box_lo, int &box_hi, const int id, const int min_size) const |
void | setCommunicationMode (int mode) |
void | setCommunicator (tbox::MPI::comm comm) |
int | computeTagHistogram (const tbox::Pointer< hier::PatchLevel< DIM > > level, const int tag_index, const int tag_val) |
void | reduceTags (const tbox::Pointer< hier::PatchLevel< DIM > > level) |
void | reduceTags (const int id, const tbox::Pointer< hier::PatchLevel< DIM > > level, const int tag_index, const int tag_val) |
const hier::Box< DIM > & | getBox () const |
tbox::Array< int > & | histogram (const int id) |
const tbox::Array< int > & | histogram (const int id) const |
int & | histogramElt (const int id, const int ic) |
const int & | histogramElt (const int id, const int ic) const |
void | setBox (const hier::Box< DIM > &box) |
void | resetHistogram () |
|
Enumerated type for the communication mode. For a description of each of these modes,
|
|
Default constructor for HistogramBox<DIM>. Note that the HistogramBox<DIM> must be initialized with a box before it can be used. |
|
Constructor for the HistogramBox<DIM>. The HistogramBox<DIM> will be initialized with the box and the histogram elements will be allocated and initialized to zero. |
|
Destructor for the HistogramBox. |
|
Given histogram information in a box region, determine smallest box containing non-zero histogram points. Note that this routine assumes that histogram values are already computed. |
|
Bound the non-zero histogram elements within the specified interval (box_lo, box_hi) in the given coordinate direction. |
|
Set the method used to perform historgram reduction. (This function should only by called from within BergerRigoutsos<DIM>::findBoxesContainingTags.) |
|
Set the communicator to use during histogram reduction. This call only has an effect when used in conjunction with setCommunicationMode(COMMUNICATOR_MODE); (This function should only by called from within BergerRigoutsos<DIM>::findBoxesContainingTags.) |
|
Compute histogram for integer tags (matching tag_val) within the histogram box on the patch level. |
|
Compute global histogram by performing a reduction sum on the local histograms. Note that the reduction is needed since the histogram box will not be contained within any single patch, in general. Also, if the integer tag patch data corresponding to the given descriptor index has ghost cells, the values in these cells are ignored so that the reduction sums data over patch interiors only. |
|
|
|
Return const reference to box represented by histogram. |
|
Return non-const reference to histogram array for given direction. Note that there is no bounds-checking on direction number. |
|
Return const reference to histogram array for given direction. Note that there is no bounds-checking on direction number. |
|
Return non-const histogram element corresponding to given direction and cell index. Note cell index and histogram array location are distinct, in general. Also, there is no bounds checking done to assure the cell index lies within the box. |
|
Return const histogram element corresponding to given direction and cell index. Note cell index and histogram array location are distinct, in general. Also, there is no bounds checking done to assure the cell index lies within the box. |
|
Set the box for the HistogramBox, allocate storage for the histogram signature arrays, and initialize the histogram elements to zero. |
|
Set all histogram elements to zero. |