#include <LayoutData.H>
A collection of Box-oriented objects. The arrangement of the T objects is given by the underlying BoxLayout object. LayoutData does not attempt to prevent users from manipulating the template class T to become out of synch with the boxes in the BoxLayout. Caveat emptor.
Non-local (off-processor access) to a LayoutData index is an error. You can assure that access to the data stored in a LayoutData is local to your processor by using the DataIterator object for indexing.
Data in a LayoutData CANNOT be communicated to other processors using the API presented in LevelData.
class T must provide the following methods:
{ T() }
This class is useful for processor-local data that needs to be indexable along with a BoxLayoutData. Auxillary data objects, etc.
Public Member Functions | |
LayoutData () | |
LayoutData (const BoxLayout &a_dp) | |
virtual | ~LayoutData () |
virtual void | define (const BoxLayout &a_dp) |
DataIterator | dataIterator () const |
TimedDataIterator | timedDataIterator () const |
const T & | operator[] (const DataIndex &a_index) const |
const accessor function | |
const T & | operator[] (const DataIterator &a_iterator) const |
const accessor function | |
T & | operator[] (const DataIndex &a_index) |
non-const accessor function | |
T & | operator[] (const DataIterator &a_iterator) |
non-const accessor function | |
Box | box (const DataIndex &a_index) const |
Box | box (const DataIterator &a_iterator) const |
const BoxLayout & | boxLayout () const |
Protected Attributes | |
BoxLayout | m_boxLayout |
Vector< T * > | m_vector |
bool | m_callDelete |
Private Member Functions | |
LayoutData< T > & | operator= (const LayoutData< T > &a_rhs) |
LayoutData (const LayoutData &a_rhs) | |
void | allocate () |
LayoutData< T >::LayoutData | ( | ) | [inline] |
References BoxLayout::close(), LayoutData< T >::m_boxLayout, and LayoutData< T >::m_callDelete.
LayoutData< T >::LayoutData | ( | const BoxLayout & | a_dp | ) | [inline] |
constructor. allocates a T object for every box in the BoxLayout a_dp using the T null constructor. a_dp must be closed.
References LayoutData< T >::allocate(), BoxLayout::isClosed(), and LayoutData< T >::m_callDelete.
LayoutData< T >::~LayoutData | ( | ) | [inline, virtual] |
LayoutData< T >::LayoutData | ( | const LayoutData< T > & | a_rhs | ) | [private] |
void LayoutData< T >::define | ( | const BoxLayout & | a_dp | ) | [inline, virtual] |
constructor. allocates a T object for every box in the BoxLayout a_dp using the T null constructor. a_dp must be closed. previously stored T objects are removed
Reimplemented in BoxLayoutData< T >, LevelData< T >, BoxLayoutData< EBGraph >, BoxLayoutData< NodeFArrayBox >, BoxLayoutData< FluxBox >, BoxLayoutData< BaseIVFAB< double > >, BoxLayoutData< BaseIFFAB< double > >, BoxLayoutData< EBCellFAB >, BoxLayoutData< FArrayBox >, BoxLayoutData< EBData >, BoxLayoutData< EBFluxFAB >, LevelData< EBGraph >, LevelData< NodeFArrayBox >, LevelData< FluxBox >, LevelData< BaseIVFAB< double > >, LevelData< BaseIFFAB< double > >, LevelData< EBCellFAB >, LevelData< FArrayBox >, LevelData< EBData >, and LevelData< EBFluxFAB >.
References LayoutData< T >::allocate(), BoxLayout::isClosed(), and LayoutData< T >::m_boxLayout.
Referenced by BaseIFFactory< T >::BaseIFFactory(), and BaseIVFactory< T >::BaseIVFactory().
DataIterator LayoutData< T >::dataIterator | ( | ) | const [inline] |
References BoxLayout::dataIterator(), and LayoutData< T >::m_boxLayout.
Referenced by LayoutData< T >::allocate(), BoxLayoutData< T >::allocateGhostVector(), LevelData< T >::apply(), BoxLayoutData< T >::apply(), EBPoissonOp::applyOp(), BaseIFFactory< T >::BaseIFFactory(), BaseIVFactory< T >::BaseIVFactory(), LevelData< T >::copyTo(), VCAMRPoissonOp::diagonalScale(), regionGather(), BoxLayoutData< T >::setVector(), and LayoutData< T >::~LayoutData().
TimedDataIterator LayoutData< T >::timedDataIterator | ( | ) | const [inline] |
References LayoutData< T >::m_boxLayout, and BoxLayout::timedDataIterator().
const T & LayoutData< T >::operator[] | ( | const DataIndex & | a_index | ) | const [inline] |
const accessor function
References BoxLayout::check(), BoxLayout::lindex(), LayoutData< T >::m_boxLayout, and LayoutData< T >::m_vector.
const T & LayoutData< T >::operator[] | ( | const DataIterator & | a_iterator | ) | const [inline] |
const accessor function
Returns member for which DataIterator is currently indexed to. Equivalent to layout[a_iterator()]
T & LayoutData< T >::operator[] | ( | const DataIndex & | a_index | ) | [inline] |
non-const accessor function
References BoxLayout::check(), BoxLayout::lindex(), LayoutData< T >::m_boxLayout, and LayoutData< T >::m_vector.
T & LayoutData< T >::operator[] | ( | const DataIterator & | a_iterator | ) | [inline] |
non-const accessor function
Box LayoutData< T >::box | ( | const DataIndex & | a_index | ) | const [inline] |
References BoxLayout::get(), and LayoutData< T >::m_boxLayout.
Referenced by BoxLayoutData< T >::allocateGhostVector(), BoxLayoutData< T >::apply(), LevelData< T >::copyTo(), and BoxLayoutData< T >::setVector().
Box LayoutData< T >::box | ( | const DataIterator & | a_iterator | ) | const [inline] |
References BoxLayout::get(), and LayoutData< T >::m_boxLayout.
const BoxLayout& LayoutData< T >::boxLayout | ( | ) | const [inline] |
LayoutData<T>& LayoutData< T >::operator= | ( | const LayoutData< T > & | a_rhs | ) | [private] |
void LayoutData< T >::allocate | ( | ) | [inline, private] |
References LayoutData< T >::dataIterator(), MayDay::Error(), i, BoxLayout::lindex(), LayoutData< T >::m_boxLayout, LayoutData< T >::m_callDelete, LayoutData< T >::m_vector, LayoutIterator::ok(), Vector< T >::resize(), DataIterator::size(), and Vector< T >::size().
Referenced by LayoutData< T >::define(), and LayoutData< T >::LayoutData().
BoxLayout LayoutData< T >::m_boxLayout [protected] |
Referenced by LayoutData< T >::allocate(), BoxLayoutData< T >::allocateGhostVector(), LevelData< T >::apply(), BoxLayoutData< T >::apply(), LayoutData< T >::box(), LayoutData< Vector< IntVectSet > >::boxLayout(), BoxLayoutData< T >::BoxLayoutData(), LayoutData< T >::dataIterator(), LevelData< T >::define(), LayoutData< T >::define(), BoxLayoutData< T >::define(), BoxLayoutData< T >::generalCopyTo(), LayoutData< T >::LayoutData(), LevelData< T >::LevelData(), LayoutData< T >::operator[](), BoxLayoutData< T >::setVector(), LayoutData< T >::timedDataIterator(), and LayoutData< T >::~LayoutData().
Vector<T*> LayoutData< T >::m_vector [protected] |
bool LayoutData< T >::m_callDelete [protected] |