#include <source/hierarchy/boxes/Box.h>
Inheritance diagram for SAMRAI::hier::Box< DIM >:
Public Types | |
typedef BoxIterator< DIM > | Iterator |
Public Member Functions | |
Box () | |
Box (const Index< DIM > &lower, const Index< DIM > &upper) | |
Box (const Box< DIM > &box) | |
Box (const tbox::DatabaseBox &box) | |
~Box () | |
Box< DIM > & | operator= (const Box< DIM > &box) |
Index< DIM > & | lower () |
Index< DIM > & | upper () |
const Index< DIM > & | lower () const |
const Index< DIM > & | upper () const |
int & | lower (const int i) |
int & | upper (const int i) |
const int & | lower (const int i) const |
const int & | upper (const int i) const |
bool | empty () const |
void | setEmpty () |
int | numberCells (const int i) const |
IntVector< DIM > | numberCells () const |
int | size () const |
int | longestDimension () const |
int | offset (const Index< DIM > &p) const |
bool | contains (const Index< DIM > &p) const |
int | operator== (const Box< DIM > &box) const |
int | operator!= (const Box< DIM > &box) const |
Box< DIM > | operator * (const Box< DIM > &box) const |
bool | intersects (const Box< DIM > &box) const |
Box< DIM > | operator+ (const Box< DIM > &box) const |
Box< DIM > & | operator+= (const Box< DIM > &box) |
bool | coalesceWith (const Box< DIM > &box) |
void | grow (const IntVector< DIM > &ghosts) |
void | grow (const int direction, const int ghosts) |
void | growLower (const IntVector< DIM > &ghosts) |
void | growLower (const int direction, const int ghosts) |
void | growUpper (const IntVector< DIM > &ghosts) |
void | growUpper (const int direction, const int ghosts) |
void | shift (const IntVector< DIM > &offset) |
void | shift (const int direction, const int offset) |
void | rotate (const int rotation_number) |
void | refine (const IntVector< DIM > &ratio) |
void | coarsen (const IntVector< DIM > &ratio) |
Box< DIM > & | operator= (const tbox::DatabaseBox &box) |
Box< DIM > & | Box_from_DatabaseBox (const tbox::DatabaseBox &box) |
void | set_Box_from_DatabaseBox (const tbox::DatabaseBox &box) |
tbox::DatabaseBox | DatabaseBox_from_Box () const |
operator tbox::DatabaseBox () | |
operator tbox::DatabaseBox () const | |
Static Public Member Functions | |
static Box< DIM > | grow (const Box< DIM > &box, const IntVector< DIM > &ghosts) |
static Box< DIM > | shift (const Box< DIM > &box, const IntVector< DIM > &offset) |
static Box< DIM > | refine (const Box< DIM > &box, const IntVector< DIM > &ratio) |
static Box< DIM > | coarsen (const Box< DIM > &box, const IntVector< DIM > &ratio) |
Friends | |
template<int D> | |
istream & | operator>> (istream &s, Box< D > &box) |
template<int D> | |
ostream & | operator<< (ostream &s, const Box< D > &box) |
Class Box<DIM> is translated into classes Box1, Box2, and Box3 after being passed through a preprocessor.
|
A box iterator iterates over the elements of a box. This class is defined elsewhere, and the typedef is used to point to that class. |
|
The default constructor creates an ``empty'' box. |
|
Create a box describing the index space between lower and upper. The box is assumed to be cell centered and include all elements between lower and upper, including the end points. |
|
The copy constructor copies the index space of the argument box. |
|
Construct a Box<DIM> from a DatabaseBox. |
|
The destructor for Box. |
|
The assignment operator copies the index space of the argument box. |
|
Return a non-const lower index of the box. |
|
Return a non-const upper index of the box. |
|
Return a const lower index of the box. |
|
Return a const upper index of the box. |
|
Return the i'th component (non-const) of the lower index of the box. |
|
Return the i'th component (non-const) of the upper index of the box. |
|
Return the i'th component (const) of the lower index of the box. |
|
Return the i'th component (const) of the upper index of the box. |
|
Return whether the box is ``empty''. A box is empty if any of the lower bounds is greater than the corresponding upper bound. An empty box has a size of zero. |
|
Set the index space represented by the box to empty. |
|
Return the number of cells (an integer) represented by the box in the given coordinate direction. |
|
Return the number of cells (a vector of integers) represented by the box in every coordinate direction. |
|
Calculate the number of indices represented by the box. If the box is empty, then the number of index points within the box is zero. |
|
Return the dimension of the box that is longest. |
|
Given an index, calculate the offset of the index into the box. This function assumes column-major (e.g., Fortran) ordering of the indices within the box. This operation is a convenience function for later array indexing operations. |
|
Check whether an index lies within the bounds of the box. |
|
Check whether two boxes represent the same portion of index space. |
|
Check whether two boxes cover different portions of index space. |
|
Calculate the intersection of the index spaces of two boxes. The intersection with an empty box always yields an empty box. |
|
Return true if two boxes have a non-empty intersection. Otherwise, return false. |
|
Calculate the bounding box of two boxes. Note that this is not the union of the two boxes (since union is not closed over boxes), but rather the smallest box that contains both boxes. |
|
Increase the bounding box to include the argument box. |
|
Return true if this box can be coalesced with the argument box, and set this box to the union of the boxes. Otherwise, return false and leave boxes as is. Two boxes may be coalesced if their union is a box (recall that index set union is not closed over boxes). If either box is empty, then the return value is true and this box becomes the union of the two. |
|
Grow a box by the specified ghost cell width. The lower bound is decremented by the width, and the upper bound is incremented by the width. All dimensions are grown by the corresponding component in the IntVector; ghost cell widths may be different in each dimension. Negative ghost cell widths will shrink the box. |
|
Grow a box by the specified ghost cell width in the given coordinate direction in index space. The lower bound is decremented by the width, and the upper bound is incremented by the width. Note that negative ghost cell widths will shrink the box. |
|
Similar to grow() functions. However, box is only grown in lower directions (i.e., only lower index is changed). |
|
Similar to grow() functions. However, box is only grown in lower bound of given direction in index space. |
|
Similar to grow() function. However, box is only grown in upper directions (i.e., only upper index is changed). |
|
Similar to grow() functions. However, box is only grown in upper bound of given direction in index space. |
|
Shift a box by the specified amount (a vector of integers). The new box is located at (lower+offset, upper+offset). |
|
Similar to shift() function above, but shift occurs only in specified direction in index space. The new box is located at (lower+offset, upper+offset) in that direction. |
|
Rotate 90 degrees around origin. Currently works for 2D only. |
|
Refine the index space of a box by specified vector ratio. Each component of the box is multiplied by the refinement ratio. |
|
Coarsen the index space of a box by specified vector ratio. Each component is divided by the specified coarsening ratio and rounded (if necessary) such that the coarsened box contains the cells that are the parents of the refined box. In other words, refining a coarsened box will always yield a box that is equal to or larger than the original box. |
|
This assignment operator constructs a Box<DIM> given a DatabaseBox. |
|
Sets a Box<DIM> from a tbox::DatabaseBox and returns a reference to the Box<DIM>. |
|
Sets a Box<DIM> from a DatabaseBox. |
|
Returns a tbox::DatabaseBox generated from a Box<DIM>. |
|
Type conversion from Box<DIM> to Box |
|
Type conversion from Box<DIM> to Box |
|
Utility function to grow a box by the specified vector ghost cell width. A new box is returned and the argument is not changed. |
|
Utility function to shift a box by the specified offset. A new box is returned and the argument is not changed. |
|
Utility function to refine the index space of a box by the specified refinement ratio. A new box is returned and the argument is not changed. |
|
Utility function to coarsen the index space of a box by the specified coarsening ratio. A new box is returned and the argument is not changed. |
|
Read the box description in the form [L,U], where L and U are the lower and upper bounds of the box. |
|
Output the box description in the form [L,U], where L and U are the lower and upper bounds of the box. |