#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 () |
Friends | |
class | BoxLayout |
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(), CH_assert, 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< CodimBox< FArrayBox > >, BoxLayoutData< BaseFab< IntVect > >, BoxLayoutData< FluxBox >, BoxLayoutData< BaseIVFAB< double > >, BoxLayoutData< BaseIFFAB< double > >, BoxLayoutData< BaseFab< PetscInt > >, BoxLayoutData< EBCellFAB >, BoxLayoutData< EdgeDataBox >, BoxLayoutData< BaseFab< bool > >, BoxLayoutData< FArrayBox >, BoxLayoutData< EBData >, BoxLayoutData< EBFluxFAB >, BoxLayoutData< BaseFab< int > >, LevelData< EBGraph >, LevelData< NodeFArrayBox >, LevelData< CodimBox< FArrayBox > >, LevelData< BaseFab< IntVect > >, LevelData< FluxBox >, LevelData< BaseIVFAB< double > >, LevelData< BaseIFFAB< double > >, LevelData< BaseFab< PetscInt > >, LevelData< EBCellFAB >, LevelData< EdgeDataBox >, LevelData< BaseFab< bool > >, LevelData< FArrayBox >, LevelData< EBData >, LevelData< EBFluxFAB >, and LevelData< BaseFab< int > >.
References LayoutData< T >::allocate(), CH_assert, BoxLayout::isClosed(), and LayoutData< T >::m_boxLayout.
Referenced by BaseIFFactory< T >::BaseIFFactory(), BaseIVFactory< T >::BaseIVFactory(), and IVSFABFactory< T >::IVSFABFactory().
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(), LevelDataOps< T >::axby(), BaseIFFactory< T >::BaseIFFactory(), BaseIVFactory< T >::BaseIVFactory(), blockWriteToBuffer(), LevelData< T >::copyTo(), LevelData< T >::degenerateLocalOnly(), BCFunction::fillGhostCells(), getOffsets(), LevelDataOps< T >::incr(), IVSFABFactory< T >::IVSFABFactory(), LevelData< T >::localCopyTo(), LevelDataOps< T >::mult(), LevelDataOps< T >::plus(), read(), regionGather(), LevelDataOps< T >::scale(), LevelDataOps< T >::setToZero(), LevelDataOps< T >::setVal(), BoxLayoutData< T >::setVector(), write(), WriteMultiData< T >::writeData(), 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 CH_assert, BoxLayout::check(), LayoutIndex::datInd(), LayoutData< T >::m_boxLayout, and LayoutData< T >::m_vector.
Referenced by LevelData< T >::degenerateLocalOnly().
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 CH_assert, BoxLayout::check(), LayoutIndex::datInd(), 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(), blockWriteToBuffer(), LevelData< T >::copyTo(), LevelData< T >::localCopyTo(), read(), BoxLayoutData< T >::setVector(), write(), and WriteMultiData< T >::writeData().
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] |
Referenced by BaseIFFactory< T >::BaseIFFactory(), BaseIVFactory< T >::BaseIVFactory(), blockLocalOffsets(), blockWrite(), blockWriteLevel(), LevelData< T >::copyTo(), BoxLayoutData< T >::define(), getOffsets(), IVSFABFactory< T >::IVSFABFactory(), read(), regionGather(), write(), and WriteMultiData< T >::writeData().
LayoutData<T>& LayoutData< T >::operator= | ( | const LayoutData< T > & | a_rhs | ) | [private] |
void LayoutData< T >::allocate | ( | ) | [inline, private] |
References LayoutData< T >::dataIterator(), MayDay::Error(), BoxLayout::index(), 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().
friend class BoxLayout [friend] |
BoxLayout LayoutData< T >::m_boxLayout [protected] |
Referenced by BoxLayoutData< T >::addTo(), 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[](), and LayoutData< T >::timedDataIterator().
Vector<T*> LayoutData< T >::m_vector [protected] |
bool LayoutData< T >::m_callDelete [protected] |