Class HistogramBox<DIM> manages the histogram signature array for a region of index space contained within a single box. It is used during the regridding process to gather information about the distribution of tagged cells across a portion of a patch level.
#include <HistogramBox.h>
|
| | 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::SAMRAI_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 () |
| |
◆ anonymous enum
Enumerated type for the communication mode. For a description of each of these modes,
- See also
- mesh::BergerRigoutsos.
- ORIGINAL_MODE {Original communication mode used in SAMRAI, through v1.3.1 (global reductions).}
- ORIG_FAST_REDUCE_MODE {Original communication mode but with a 'faster' reduce operation.}
- BINARY_TREE_MODE {Reduces all-to-all communication costs using explicit tbox::MPI send/recvs in a binary tree, rather than global reductions.}
- COMMUNICATOR_MODE {Similar to the binary tree option, but uses tbox::MPI communicators in place of the explicit send/recvs.}
| Enumerator |
|---|
| ORIGINAL_MODE | |
| ORIG_FAST_REDUCE_MODE | |
| BINARY_TREE_MODE | |
| COMMUNICATOR_MODE | |
◆ HistogramBox() [1/2]
Default constructor for HistogramBox<DIM>. Note that the HistogramBox<DIM> must be initialized with a box before it can be used.
◆ HistogramBox() [2/2]
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.
◆ ~HistogramBox()
◆ findBoundBoxForTags()
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.
◆ boundTagHistogram()
Bound the non-zero histogram elements within the specified interval (box_lo, box_hi) in the given coordinate direction.
◆ setCommunicationMode()
◆ setCommunicator()
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.)
◆ computeTagHistogram()
Compute histogram for integer tags (matching tag_val) within the histogram box on the patch level.
◆ reduceTags() [1/2]
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.
◆ reduceTags() [2/2]
◆ getBox()
Return const reference to box represented by histogram.
◆ histogram() [1/2]
Return non-const reference to histogram array for given direction. Note that there is no bounds-checking on direction number.
◆ histogram() [2/2]
Return const reference to histogram array for given direction. Note that there is no bounds-checking on direction number.
◆ histogramElt() [1/2]
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.
◆ histogramElt() [2/2]
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.
◆ setBox()
Set the box for the HistogramBox, allocate storage for the histogram signature arrays, and initialize the histogram elements to zero.
◆ resetHistogram()
Set all histogram elements to zero.
◆ computeTagHistogramOrig()
◆ computeLocalHistogram()
◆ freeTimers()
Free static timers.
To be called by shutdown registry to make sure memory for timers does not leak.
◆ d_box
◆ d_histogram
◆ d_comm
◆ d_communication_mode
◆ t_compute
◆ t_commwait
The documentation for this class was generated from the following file: