SAMRAI::hier::BoxArray< DIM > Class Template Reference

#include <source/hierarchy/boxes/BoxArray.h>

List of all members.

Public Member Functions

 BoxArray (const int n=0)
 BoxArray (const tbox::Array< Box< DIM > > &array)
 BoxArray (const BoxArray< DIM > &array)
 BoxArray (const BoxList< DIM > &list)
 BoxArray (const tbox::Array< tbox::DatabaseBox > &array)
 operator tbox::Array () const
BoxArray< DIM > & operator= (const tbox::Array< tbox::DatabaseBox > &array)
BoxArray< DIM > & operator= (const BoxArray< DIM > &array)
BoxArray< DIM > & operator= (const BoxList< DIM > &list)
 ~BoxArray ()
int getNumberOfBoxes () const
int size () const
Box< DIM > & getBox (const int i)
const Box< DIM > & getBox (const int i) const
Box< DIM > & operator() (const int i)
const Box< DIM > & operator() (const int i) const
Box< DIM > & operator[] (const int i)
const Box< DIM > & operator[] (const int i) const
BoxArray< DIM > & BoxArray_from_Array (tbox::Array< tbox::DatabaseBox > array)
void set_BoxArray_from_Array (tbox::Array< tbox::DatabaseBox > array)
bool contains (const Index< DIM > &p) const
void grow (const IntVector< DIM > &ghosts)
void shift (const IntVector< DIM > &offset)
void rotate (int rotation_number)
void refine (const IntVector< DIM > &ratio)
void coarsen (const IntVector< DIM > &ratio)
void resizeBoxArray (const int n)
Box< DIM > getBoundingBox () const
void print (std::ostream &os=tbox::plog) const


Detailed Description

template<int DIM>
class SAMRAI::hier::BoxArray< DIM >

Class BoxArray is a container represents an array of boxes. Once the array is created, it can be resized. However, it is usually better to use the BoxList class to represent collections of boxes that change in number.

See also:
hier::Box

hier::BoxList


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::BoxArray< DIM >::BoxArray ( const int  n = 0  ) 

Create an array of boxes with space for n boxes. All boxes are initialized to empty.

template<int DIM>
SAMRAI::hier::BoxArray< DIM >::BoxArray ( const tbox::Array< Box< DIM > > &  array  ) 

Create a box array and copy box data from the array argument.

template<int DIM>
SAMRAI::hier::BoxArray< DIM >::BoxArray ( const BoxArray< DIM > &  array  ) 

The const constructor creates an array of boxes and copies box data from the argument box array.

template<int DIM>
SAMRAI::hier::BoxArray< DIM >::BoxArray ( const BoxList< DIM > &  list  ) 

Create a box array and copy box data from the list.

template<int DIM>
SAMRAI::hier::BoxArray< DIM >::BoxArray ( const tbox::Array< tbox::DatabaseBox > &  array  ) 

Create a regular box array from an array of tbox::DatabaseBox objects.

template<int DIM>
SAMRAI::hier::BoxArray< DIM >::~BoxArray (  )  [inline]

The BoxArray destructor releases the box array data.


Member Function Documentation

template<int DIM>
SAMRAI::hier::BoxArray< DIM >::operator tbox::Array< tbox::DatabaseBox > (  )  const

Type conversion from BoxArray<DIM> to tbox::Array<tbox::DatabaseBox>.

template<int DIM>
BoxArray< DIM > & SAMRAI::hier::BoxArray< DIM >::operator= ( const tbox::Array< tbox::DatabaseBox > &  array  )  [inline]

Create a box array using boxes in tbox::Array<tbox::DatabaseBox> for the data.

template<int DIM>
BoxArray< DIM > & SAMRAI::hier::BoxArray< DIM >::operator= ( const BoxArray< DIM > &  array  ) 

Create a box array and copy data from the array argument.

template<int DIM>
BoxArray< DIM > & SAMRAI::hier::BoxArray< DIM >::operator= ( const BoxList< DIM > &  list  ) 

Create a box array and copy data from the list argument.

template<int DIM>
int SAMRAI::hier::BoxArray< DIM >::getNumberOfBoxes (  )  const [inline]

Return the number of boxes in the array.

template<int DIM>
int SAMRAI::hier::BoxArray< DIM >::size (  )  const [inline]

Return the number of boxes in the array. Identical to getNumberOfBoxes(), but this method is common to several container classes.

template<int DIM>
Box< DIM > & SAMRAI::hier::BoxArray< DIM >::getBox ( const int  i  )  [inline]

Return a reference to the i-th box. No bounds checking.

template<int DIM>
const Box< DIM > & SAMRAI::hier::BoxArray< DIM >::getBox ( const int  i  )  const [inline]

Return a const reference to the i-th box. No bounds checking.

template<int DIM>
Box< DIM > & SAMRAI::hier::BoxArray< DIM >::operator() ( const int  i  )  [inline]

Return a reference to the i-th box.

When assertion checking is active non-recoverable exception results when array bounds are violated.

DEPRECATED: The operator[] method should be used instead of this one.

template<int DIM>
const Box< DIM > & SAMRAI::hier::BoxArray< DIM >::operator() ( const int  i  )  const [inline]

Return a const reference to the i-th box.

When assertion checking is active non-recoverable exception results when array bounds are violated.

DEPRECATED: The operator[] method should be used instead of this one.

template<int DIM>
Box< DIM > & SAMRAI::hier::BoxArray< DIM >::operator[] ( const int  i  )  [inline]

Non-const array subscripting. Return a reference the box at array index ``i'' (between 0 and N-1, where N is the number of elements in the array.

When assertion checking is active non-recoverable exception results when array bounds are violated.

template<int DIM>
const Box< DIM > & SAMRAI::hier::BoxArray< DIM >::operator[] ( const int  i  )  const [inline]

Const array subscripting. Return a const reference to the box at array index ``i'' (between 0 and N-1, where N is the number of elements in the array.

When assertion checking is active non-recoverable exception results when array bounds are violated.

template<int DIM>
BoxArray< DIM > & SAMRAI::hier::BoxArray< DIM >::BoxArray_from_Array ( tbox::Array< tbox::DatabaseBox array  )  [inline]

Create a BoxArray<DIM> from a tbox::Array<tbox::DatabaseBox>.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::set_BoxArray_from_Array ( tbox::Array< tbox::DatabaseBox array  ) 

Sets a BoxArray<DIM> from a tbox::Array<tbox::DatabaseBox>.

template<int DIM>
bool SAMRAI::hier::BoxArray< DIM >::contains ( const Index< DIM > &  p  )  const

Check whether an index lies within the bounds of the collection of boxes.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::grow ( const IntVector< DIM > &  ghosts  ) 

Grow all boxes in the box array by the specified ghost cell width.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::shift ( const IntVector< DIM > &  offset  ) 

Shift all boxes in the box array by the specified offset.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::rotate ( int  rotation_number  ) 

rotate the box array clockwise 90 degrees times the rotation number. Currently works only in 2D.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::refine ( const IntVector< DIM > &  ratio  ) 

Refine the index space of each box in the box array by the specified vector refinement ratio.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::coarsen ( const IntVector< DIM > &  ratio  ) 

Coarsen the index space of each box in the box array by the specified vector coarsening ratio.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::resizeBoxArray ( const int  n  )  [inline]

Resize the array to contain the specified number of boxes. The resizing operation copies the old box values into the new boxes where the indices in the array overlap.

template<int DIM>
Box< DIM > SAMRAI::hier::BoxArray< DIM >::getBoundingBox (  )  const

Return the bounding box for all boxes in the box array.

template<int DIM>
void SAMRAI::hier::BoxArray< DIM >::print ( std::ostream &  os = tbox::plog  )  const

Print all boxes in this array to specified output stream.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:27 2009 for SAMRAI by  doxygen 1.5.1