#include <LayoutIterator.H>


An Iterator based on a BoxLayout object. It does not support a dereferencing operation(1), since it is intended to work with all of BoxLayouts, DisjointBoxLayouts, BoxLayoutDatas LevelData's, and any object that is built on top of a BoxLayout object. LayoutIterator accesses the data in a BoxLayout-based object in a NON-data-parallel manner (i.e. every processor iterates through all the Boxes in the BoxLayout). This differs from the DataIterator class.
BoxLayout-based objects can act as the Factory for the LayoutIterator.
(1) STL-speak. not critical for comprehension, but can help people familiar with STL iterators and expecting similar behaviour.
Public Member Functions | |
| LayoutIterator () | |
| a null constructed LayoutIterator will return false on ok() | |
| virtual | ~LayoutIterator () |
| const LayoutIndex & | operator() () const |
| return the index that this iterator is at | |
| LayoutIndex | i () const |
| return a copy of the index that this iterator is at | |
| virtual void | operator++ () |
| move the iterator to the next Box in the layout | |
| void | incr () |
| move the iterator to the next Box in the layout | |
| virtual bool | ok () const |
| return true if this iterator is still in its Layout | |
| void | begin () |
| initialize this iterator to the first Box in its Layout | |
| void | reset () |
| same as begin() | |
| void | end () |
| move this iterator to after the last Box in the layout | |
Protected Member Functions | |
| LayoutIterator (const BoxLayout &a_boxlayout, const int *a_layoutID) | |
Protected Attributes | |
| BoxLayout | m_layout |
| unsigned int | m_index |
| LayoutIndex | m_current |
Friends | |
| class | BoxLayout |
| class | TimedDataIterator |
| LayoutIterator::LayoutIterator | ( | ) | [inline] |
a null constructed LayoutIterator will return false on ok()
| virtual LayoutIterator::~LayoutIterator | ( | ) | [inline, virtual] |
| LayoutIterator::LayoutIterator | ( | const BoxLayout & | a_boxlayout, | |
| const int * | a_layoutID | |||
| ) | [protected] |
| const LayoutIndex & LayoutIterator::operator() | ( | ) | const [inline] |
return the index that this iterator is at
Reimplemented in DataIterator.
References m_current, and ok().
Referenced by i(), and DataIterator::operator()().
| LayoutIndex LayoutIterator::i | ( | ) | const [inline] |
return a copy of the index that this iterator is at
Reimplemented in DataIterator.
References operator()().
| void LayoutIterator::operator++ | ( | ) | [inline, virtual] |
move the iterator to the next Box in the layout
Reimplemented in TimedDataIterator.
References BoxLayout::m_boxes, m_current, LayoutIndex::m_index, m_index, m_layout, and ok().
| void LayoutIterator::incr | ( | ) | [inline] |
move the iterator to the next Box in the layout
| bool LayoutIterator::ok | ( | ) | const [inline, virtual] |
return true if this iterator is still in its Layout
Reimplemented in TimedDataIterator.
References m_index, m_layout, and BoxLayout::size().
Referenced by LayoutData< T >::allocate(), BoxLayoutData< T >::allocateGhostVector(), BaseIFFactory< T >::BaseIFFactory(), BaseIVFactory< T >::BaseIVFactory(), begin(), ViscousTensorOp::diagonalScale(), VCAMRPoissonOp::diagonalScale(), EBViscousTensorOp::diagonalScale(), MultilevelLinearOp< T >::dotProduct(), operator()(), operator++(), regionGather(), and MergeSolver< T >::solve().
| void LayoutIterator::begin | ( | ) | [inline] |
initialize this iterator to the first Box in its Layout
References BoxLayout::m_boxes, m_current, LayoutIndex::m_index, m_index, m_layout, and ok().
Referenced by MultilevelLinearOp< T >::dotProduct(), and regionGather().
| void LayoutIterator::reset | ( | ) |
same as begin()
| void LayoutIterator::end | ( | ) |
move this iterator to after the last Box in the layout
The iterator will be !ok() afterwards.
friend class BoxLayout [friend] |
Reimplemented in DataIterator, and TimedDataIterator.
friend class TimedDataIterator [friend] |
Reimplemented in DataIterator.
BoxLayout LayoutIterator::m_layout [protected] |
Referenced by begin(), TimedDataIterator::getBoxes(), ok(), operator++(), and DataIterator::size().
unsigned int LayoutIterator::m_index [protected] |
Referenced by begin(), ok(), and operator++().
LayoutIndex LayoutIterator::m_current [protected] |
Referenced by begin(), operator()(), and operator++().
1.5.5