#include <source/hierarchy/boxes/BoxTop.h>
Public Member Functions | |
BoxTop (const BoxArray< DIM > &in_boxes, const tbox::Array< tbox::List< IntVector< DIM > > > &in_shifts) | |
Constructor for BoxTop. | |
BoxTop (const BoxArray< DIM > &in_boxes) | |
Constructor for BoxTop. | |
~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 (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.
|
Constructor for BoxTop.
|
|
Constructor for BoxTop.
|
|
The destructor releases privately held resources. |
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Undocumented function, used during development and testing.
|