BoxArray Class Reference

: An Array of Boxes More...

#include <BoxArray.H>

List of all members.

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.
BoxArrayoperator= (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?
BoxArraymaxSize (int block_size)
 Forces each Box in BoxArray to have sides <= block.
BoxArrayrefine (int refinement_ratio)
 Refine each Box in the BoxArray to the specified ratio.
BoxArrayrefine (const IntVect &refinement_ratio)
 Refine each Box in the BoxArray to the specified ratio.
BoxArraycoarsen (int refinement_ratio)
 Coarsen each Box in the BoxArray to the specified ratio.
BoxArraycoarsen (const IntVect &refinement_ratio)
 Coarsen each Box in the BoxArray to the specified ratio.
BoxArraygrow (int n)
 Grow each Box in the BoxArray by the specified amount.
BoxArraygrow (const IntVect &iv)
 Grow each Box in the BoxArray by the specified amount.
BoxArraygrow (int idir, int n_cell)
 Grow each Box in the BoxArray on the low and high end by n cells in idir direction.
BoxArraysurroundingNodes ()
 Applies surroundingNodes(Box) to each Box in BoxArray.
BoxArraysurroundingNodes (int dir)
 Applies surroundingNodes(Box,int) to each Box in BoxArray.
BoxArrayenclosedCells ()
 Applies Box::enclosedCells() to each Box in the BoxArray.
BoxArrayenclosedCells (int dir)
 Applies Box::enclosedCells(int) to each Box in the BoxArray.
BoxArrayconvert (IndexType typ)
 Applies Box::convert(IndexType) to each Box in the BoxArray.
BoxArrayconvert (Box(*fp)(const Box &))
 Applies function (*fp)(Box) to each Box in the BoxArray.
BoxArrayshift (int dir, int nzones)
 Applies Box::shift(int,int) to each Box in the BoxArray.
BoxArrayshiftHalf (int dir, int num_halfs)
 Applies Box::shiftHalf(int,int) to each Box in the BoxArray.
BoxArrayshiftHalf (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 Boxoperator[] (int index) const
 Returns element index of this BoxArray.
const Boxget (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< Refm_ref

Classes

class  Ref


Detailed Description

: An Array of Boxes

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.


Constructor & Destructor Documentation

BoxArray::BoxArray (  ) 

Construct an empty BoxArray.

BoxArray::BoxArray ( const Box bx  ) 

Make a boxarray out of a single box.

References m_ref.

BoxArray::BoxArray ( size_t  size  )  [explicit]

Construct a BoxArray of the specified size.

BoxArray::BoxArray ( const Box bxvec,
int  nbox 
)

Construct a BoxArray from an array of Boxes of size nbox.

References m_ref.

BoxArray::BoxArray ( const BoxList bl  )  [explicit]

Construct a BoxArray from a BoxList.

BoxArray::BoxArray ( const BoxArray bs  ) 

The copy constructor.

BoxArray::~BoxArray (  ) 

The destructor.


Member Function Documentation

BoxArray & BoxArray::operator= ( const BoxArray rhs  ) 

The assignment operator.

References m_ref.

void BoxArray::define ( const BoxList bl  ) 

Initialize the BoxArray from the supplied BoxList.

It is an error if the BoxArray has already been initialized.

References BL_ASSERT, m_ref, size(), and uniqify().

Referenced by FabArray< FAB >::define().

void BoxArray::define ( const BoxArray bs  ) 

Initialize the BoxArray from the supplied BoxArray.

It is an error if the BoxArray has already been initialized.

References BL_ASSERT, m_ref, and size().

void BoxArray::clear (  ) 

Remove all Boxes from the BoxArray.

References m_ref, and uniqify().

Referenced by maxSize().

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]

long BoxArray::numPts (  )  const

References m_ref, and size().

void BoxArray::readFrom ( std::istream &  is  ) 

Initialize the BoxArray from the supplied istream.

It is an error if the BoxArray has already been initialized. Note that the BoxArray in the istream must have been written using writeOn().

References BL_ASSERT, m_ref, size(), and uniqify().

Referenced by operator>>().

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

Are the BoxArrays equal?

References m_ref.

Referenced by operator!=().

bool BoxArray::operator!= ( const BoxArray rhs  )  const

Are the BoxArrays not equal?

References operator==().

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  ) 

Refine each Box in the BoxArray to the specified ratio.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::refine ( const IntVect refinement_ratio  ) 

Refine each Box in the BoxArray to the specified ratio.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::coarsen ( int  refinement_ratio  ) 

Coarsen each Box in the BoxArray to the specified ratio.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::coarsen ( const IntVect refinement_ratio  ) 

Coarsen each Box in the BoxArray to the specified ratio.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::grow ( int  n  ) 

Grow each Box in the BoxArray by the specified amount.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::grow ( const IntVect iv  ) 

Grow each Box in the BoxArray by the specified amount.

References m_ref, size(), and uniqify().

BoxArray & 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.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::surroundingNodes (  ) 

Applies surroundingNodes(Box) to each Box in BoxArray.

See the documentation of Box for details.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::surroundingNodes ( int  dir  ) 

Applies surroundingNodes(Box,int) to each Box in BoxArray.

See the documentation of Box for details.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::enclosedCells (  ) 

Applies Box::enclosedCells() to each Box in the BoxArray.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::enclosedCells ( int  dir  ) 

Applies Box::enclosedCells(int) to each Box in the BoxArray.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::convert ( IndexType  typ  ) 

Applies Box::convert(IndexType) to each Box in the BoxArray.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::convert ( Box(*)(const Box &)  fp  ) 

Applies function (*fp)(Box) to each Box in the BoxArray.

References BL_ASSERT, m_ref, size(), and uniqify().

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 
)

Applies Box::shiftHalf(int,int) to each Box in the BoxArray.

References m_ref, size(), and uniqify().

BoxArray & BoxArray::shiftHalf ( const IntVect iv  ) 

Applies Box::shiftHalf(IntVect) to each Box in BoxArray.

References m_ref, size(), and uniqify().

void BoxArray::set ( int  i,
const Box ibox 
)

Set element i in this BoxArray to Box ibox.

References m_ref, and uniqify().

const Box & BoxArray::operator[] ( int  index  )  const [inline]

Returns element index of this BoxArray.

References m_ref.

const Box & BoxArray::get ( int  index  )  const [inline]

Returns element index of this BoxArray.

References m_ref.

bool BoxArray::ok (  )  const

Returns true if Box is valid and they all have the same IndexType.

Is true by default if the BoxArray is empty.

References m_ref, Box::ok(), Box::sameType(), and size().

bool BoxArray::isDisjoint (  )  const

Returns true if set of intersecting Boxes in BoxArray is null.

References size().

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

True if the IntVect is within any of the Boxes in this BoxArray.

References m_ref, and size().

Referenced by contains().

bool BoxArray::contains ( const Box b  )  const

True if the Box is within any of the Boxes in the List.

The Box must also have the same IndexType as those in this BoxArray.

References BoxLib::complementIn(), and size().

bool BoxArray::contains ( const BoxArray bl  )  const

True if all Boxes in bl are contained in this BoxArray.

References contains(), m_ref, and size().

Box BoxArray::minimalBox (  )  const

Returns smallest Box that contains all Boxes in this BoxArray.

References m_ref, Box::minBox(), and size().

void BoxArray::reserve ( long  _truesize  ) 

References m_ref, and uniqify().

void BoxArray::uniqify (  )  [protected]


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Fri Nov 21 10:11:01 2008 for AMRParticlePaths by  doxygen 1.5.5