#include <BoxArray.H>
Public Member Functions | |
BoxArray () | |
Construct an empty BoxArray. | |
BoxArray (const Box &bx) | |
Make a boxarray out of a single box. | |
BoxArray (size_t size) | |
Construct a BoxArray of the specified size. | |
BoxArray (const Box *bxvec, int nbox) | |
Construct a BoxArray from an array of Boxes of size nbox. | |
BoxArray (const BoxList &bl) | |
Construct a BoxArray from a BoxList. | |
BoxArray (const BoxArray &bs) | |
The copy constructor. | |
BoxArray & | operator= (const BoxArray &rhs) |
The assignment operator. | |
~BoxArray () | |
The destructor. | |
void | define (const BoxList &bl) |
Initialize the BoxArray from the supplied BoxList. | |
void | define (const BoxArray &bs) |
Initialize the BoxArray from the supplied BoxArray. | |
void | clear () |
Remove all Boxes from the BoxArray. | |
void | resize (int len) |
Resizes the array. See Array<T>::resize() for the gory details. | |
int | size () const |
Returns the number of elements in the BoxArray. | |
long | numPts () const |
void | readFrom (std::istream &is) |
Initialize the BoxArray from the supplied istream. | |
std::ostream & | writeOn (std::ostream &) const |
Output this BoxArray to a checkpoint file. | |
bool | operator== (const BoxArray &rhs) const |
Are the BoxArrays equal? | |
bool | operator!= (const BoxArray &rhs) const |
Are the BoxArrays not equal? | |
BoxArray & | maxSize (int block_size) |
Forces each Box in BoxArray to have sides <= block. | |
BoxArray & | refine (int refinement_ratio) |
Refine each Box in the BoxArray to the specified ratio. | |
BoxArray & | refine (const IntVect &refinement_ratio) |
Refine each Box in the BoxArray to the specified ratio. | |
BoxArray & | coarsen (int refinement_ratio) |
Coarsen each Box in the BoxArray to the specified ratio. | |
BoxArray & | coarsen (const IntVect &refinement_ratio) |
Coarsen each Box in the BoxArray to the specified ratio. | |
BoxArray & | grow (int n) |
Grow each Box in the BoxArray by the specified amount. | |
BoxArray & | grow (const IntVect &iv) |
Grow each Box in the BoxArray by the specified amount. | |
BoxArray & | grow (int idir, int n_cell) |
Grow each Box in the BoxArray on the low and high end by n cells in idir direction. | |
BoxArray & | surroundingNodes () |
Applies surroundingNodes(Box) to each Box in BoxArray. | |
BoxArray & | surroundingNodes (int dir) |
Applies surroundingNodes(Box,int) to each Box in BoxArray. | |
BoxArray & | enclosedCells () |
Applies Box::enclosedCells() to each Box in the BoxArray. | |
BoxArray & | enclosedCells (int dir) |
Applies Box::enclosedCells(int) to each Box in the BoxArray. | |
BoxArray & | convert (IndexType typ) |
Applies Box::convert(IndexType) to each Box in the BoxArray. | |
BoxArray & | convert (Box(*fp)(const Box &)) |
Applies function (*fp)(Box) to each Box in the BoxArray. | |
BoxArray & | shift (int dir, int nzones) |
Applies Box::shift(int,int) to each Box in the BoxArray. | |
BoxArray & | shiftHalf (int dir, int num_halfs) |
Applies Box::shiftHalf(int,int) to each Box in the BoxArray. | |
BoxArray & | shiftHalf (const IntVect &iv) |
Applies Box::shiftHalf(IntVect) to each Box in BoxArray. | |
void | set (int i, const Box &ibox) |
Set element i in this BoxArray to Box ibox. | |
const Box & | operator[] (int index) const |
Returns element index of this BoxArray. | |
const Box & | get (int index) const |
Returns element index of this BoxArray. | |
bool | ok () const |
Returns true if Box is valid and they all have the same IndexType. | |
bool | isDisjoint () const |
Returns true if set of intersecting Boxes in BoxArray is null. | |
BoxList | boxList () const |
Create a BoxList from this BoxArray. | |
bool | contains (const IntVect &v) const |
True if the IntVect is within any of the Boxes in this BoxArray. | |
bool | contains (const Box &b) const |
True if the Box is within any of the Boxes in the List. | |
bool | contains (const BoxArray &bl) const |
True if all Boxes in bl are contained in this BoxArray. | |
Box | minimalBox () const |
Returns smallest Box that contains all Boxes in this BoxArray. | |
void | reserve (long _truesize) |
Protected Member Functions | |
void | uniqify () |
Protected Attributes | |
LnClassPtr< Ref > | m_ref |
Classes | |
class | Ref |
A BoxArray is a collection of Boxes stored in an Array. It is a reference-counted concrete class, not a polymorphic one; i.e. you cannot use any of the List member functions with a BoxList.
BoxArray::BoxArray | ( | ) |
Construct an empty BoxArray.
BoxArray::BoxArray | ( | size_t | size | ) | [explicit] |
Construct a BoxArray of the specified size.
BoxArray::BoxArray | ( | const Box * | bxvec, | |
int | nbox | |||
) |
BoxArray::BoxArray | ( | const BoxArray & | bs | ) |
The copy constructor.
BoxArray::~BoxArray | ( | ) |
The destructor.
void BoxArray::define | ( | const BoxList & | bl | ) |
void BoxArray::define | ( | const BoxArray & | bs | ) |
void BoxArray::clear | ( | ) |
void BoxArray::resize | ( | int | len | ) |
Resizes the array. See Array<T>::resize() for the gory details.
References m_ref, and uniqify().
Referenced by FabArray< FAB >::copy().
int BoxArray::size | ( | ) | const [inline] |
Returns the number of elements in the BoxArray.
References m_ref.
Referenced by BoxList::BoxList(), boxList(), coarsen(), BoxList::contains(), contains(), convert(), FabArray< FAB >::copy(), FabArray< FAB >::define(), DistributionMapping::define(), define(), DistributionMapping::DistributionMapping(), enclosedCells(), grow(), isDisjoint(), VisMF::max(), VisMF::min(), minimalBox(), numPts(), ok(), operator<<(), operator>>(), readFrom(), refine(), FabArray< FAB >::setFab(), shift(), shiftHalf(), VisMF::size(), FabArrayBase::size(), surroundingNodes(), and writeOn().
void BoxArray::readFrom | ( | std::istream & | is | ) |
std::ostream & BoxArray::writeOn | ( | std::ostream & | os | ) | const |
Output this BoxArray to a checkpoint file.
References BoxLib::Error(), and size().
Referenced by operator<<().
bool BoxArray::operator== | ( | const BoxArray & | rhs | ) | const |
bool BoxArray::operator!= | ( | const BoxArray & | rhs | ) | const |
BoxArray & BoxArray::maxSize | ( | int | block_size | ) |
Forces each Box in BoxArray to have sides <= block.
References BoxList::begin(), clear(), BoxList::end(), m_ref, BoxList::maxSize(), and BoxList::size().
BoxArray & BoxArray::refine | ( | int | refinement_ratio | ) |
BoxArray & BoxArray::coarsen | ( | int | refinement_ratio | ) |
BoxArray & BoxArray::grow | ( | int | n | ) |
BoxArray & BoxArray::grow | ( | int | idir, | |
int | n_cell | |||
) |
BoxArray & BoxArray::surroundingNodes | ( | ) |
BoxArray & BoxArray::surroundingNodes | ( | int | dir | ) |
BoxArray & BoxArray::enclosedCells | ( | ) |
BoxArray & BoxArray::enclosedCells | ( | int | dir | ) |
BoxArray & BoxArray::shift | ( | int | dir, | |
int | nzones | |||
) |
Applies Box::shift(int,int) to each Box in the BoxArray.
References m_ref, size(), and uniqify().
Referenced by FabArray< FAB >::shift().
BoxArray & BoxArray::shiftHalf | ( | int | dir, | |
int | num_halfs | |||
) |
void BoxArray::set | ( | int | i, | |
const Box & | ibox | |||
) |
const Box & BoxArray::operator[] | ( | int | index | ) | const [inline] |
const Box & BoxArray::get | ( | int | index | ) | const [inline] |
bool BoxArray::ok | ( | ) | const |
bool BoxArray::isDisjoint | ( | ) | const |
BoxList BoxArray::boxList | ( | ) | const |
Create a BoxList from this BoxArray.
References BoxList::push_back(), and size().
Referenced by BoxLib::complementIn(), and BoxLib::intersect().
bool BoxArray::contains | ( | const IntVect & | v | ) | const |
bool BoxArray::contains | ( | const Box & | b | ) | const |
bool BoxArray::contains | ( | const BoxArray & | bl | ) | const |
Box BoxArray::minimalBox | ( | ) | const |
Returns smallest Box that contains all Boxes in this BoxArray.
References m_ref, Box::minBox(), and size().
void BoxArray::uniqify | ( | ) | [protected] |
References m_ref.
Referenced by clear(), coarsen(), convert(), define(), enclosedCells(), grow(), readFrom(), refine(), reserve(), resize(), set(), shift(), shiftHalf(), and surroundingNodes().
LnClassPtr<Ref> BoxArray::m_ref [protected] |
Referenced by BoxArray(), clear(), coarsen(), contains(), convert(), define(), enclosedCells(), get(), grow(), maxSize(), minimalBox(), numPts(), ok(), operator=(), operator==(), operator[](), readFrom(), refine(), reserve(), resize(), set(), shift(), shiftHalf(), size(), surroundingNodes(), and uniqify().