#include <source/hierarchy/boxes/BoxTop.h>
Public Member Functions | |
~BoxTop () | |
void | findOverlappingBoxes (BoxArray< DIM > &overlaps, const Box< DIM > &box) |
Compute the set of boxes that overlap with the specified box. | |
void | findOverlappingBoxIndices (tbox::Array< int > &indices, const Box< DIM > &box) |
Compute the indices of the boxes that overlap the specified box. | |
void | findOverlappingBoxesAndIndices (BoxArray< DIM > &overlaps, tbox::Array< int > &indices, const Box< DIM > &box) |
Compute the set of boxes, and their indices, that overlap with the specified box. | |
void | removeIntersections (BoxList< DIM > &list) |
Remove from list the portions that intersect the boxes in the BoxArray that was passed to the constructor. | |
void | print (std::ostream &os=tbox::plog) |
Undocumented function, used during development and testing. |
A BoxTop object is constructed by passing the ctor a BoxArray; this array is used internally to setup private data structures that will be used in subsequent methods, described below. If the BoxArray contains n boxes, then the setup phase (which is invoked by the constructor) has a runtime complexity of O(n log(n)).
Following construction, two types of operations are supported. First, the three related functions findOverlappingBoxes, findOverlappingBoxIndices, and findOverlappingBoxesAndIndices take a box as input, and compute the subset of the boxes, and/or the indices of the boxes, that overlap with the box.
Second, the removeIntersections call takes a list of boxes as input, and removes those portions that intersect with the boxes in the BoxArray that was passed to the constructor.
SAMRAI::hier::BoxTop< DIM >::BoxTop | ( | const BoxArray< DIM > & | in_boxes, | |
const tbox::Array< tbox::List< IntVector< DIM > > > & | in_shifts | |||
) |
Constructor for BoxTop.
in_boxes | input array of boxes. | |
in_shifts | contains a shift vector associated with each boxes. |
SAMRAI::hier::BoxTop< DIM >::BoxTop | ( | const BoxArray< DIM > & | in_boxes | ) |
SAMRAI::hier::BoxTop< DIM >::~BoxTop | ( | ) |
The destructor releases privately held resources.
SAMRAI::hier::BoxTop< DIM >::BoxTop | ( | const BoxArray< DIM > & | in_boxes, | |
const tbox::Array< tbox::List< IntVector< DIM > > > & | in_shifts | |||
) |
Constructor for BoxTop.
in_boxes | input array of boxes. | |
in_shifts | contains a shift vector associated with each boxes. |
SAMRAI::hier::BoxTop< DIM >::BoxTop | ( | const BoxArray< DIM > & | in_boxes | ) |
void SAMRAI::hier::BoxTop< DIM >::findOverlappingBoxes | ( | BoxArray< DIM > & | overlaps, | |
const Box< DIM > & | box | |||
) |
Compute the set of boxes that overlap with the specified box.
The return array, overlaps, contains the subset of the boxes that were passed to the constructor that overlap the box.
overlaps | the subset of boxes, from the array that was passed to the ctor, that overlap the specified box. | |
box | the specified box whose overlaps are requested. |
void SAMRAI::hier::BoxTop< DIM >::findOverlappingBoxIndices | ( | tbox::Array< int > & | indices, | |
const Box< DIM > & | box | |||
) |
Compute the indices of the boxes that overlap the specified box.
The return array, indices, contains the indices of the boxes (in the BoxArray that was passed to the constructor) that overlap the specified box.
indices | the indices of the overlapping boxes. | |
box | the specified box whose overlaps are requested. |
void SAMRAI::hier::BoxTop< DIM >::findOverlappingBoxesAndIndices | ( | BoxArray< DIM > & | overlaps, | |
tbox::Array< int > & | indices, | |||
const Box< DIM > & | box | |||
) |
Compute the set of boxes, and their indices, that overlap with the specified box.
The return array, overlaps, contains the subset of the boxes that were passed to the constructor that overlap the box. The returned array, indices, contains an index for each box in overlaps; each index is the corresponding box's index w.r.t. the BoxArray that was passed to the constructor.
overlaps | the subset of boxes, from the array that was passed to the ctor, that overlap the specified box. | |
indices | the indices of the overlapping boxes. | |
box | the specified box whose overlaps are requested. |
void SAMRAI::hier::BoxTop< DIM >::removeIntersections | ( | BoxList< DIM > & | list | ) |
Remove from list the portions that intersect the boxes in the BoxArray that was passed to the constructor.
CAUTION: the semantics of this call differ from that of BoxList::removeIntersections(const BoxList<DIM> takeaway). Here, the list that is being modified is the list that is passed as an argument; the "takeaway" list is the list that was passed when the BoxTop object was constructed.
list | the list of boxes from which intersections are to be removed. |
void SAMRAI::hier::BoxTop< DIM >::print | ( | std::ostream & | os = tbox::plog |
) |
Undocumented function, used during development and testing.