#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 | |
| const LayoutIndex & | operator[] (int ivec) const |
| LayoutIndex & | operator[] (int ivec) |
Protected Member Functions | |
| LayoutIterator (const BoxLayout &a_boxlayout, const int *a_layoutID) | |
Protected Attributes | |
| BoxLayout | m_layout |
| RefCountedPtr< Vector < LayoutIndex > > | m_indicies |
| unsigned int | m_current |
Friends | |
| class | BoxLayout |
| class | DisjointBoxLayout |
| 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 CH_assert, m_current, m_indicies, 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 m_current.
| 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_current, m_layout, and BoxLayout::size().
Referenced by LayoutData< T >::allocate(), BaseIFFactory< T >::BaseIFFactory(), BaseIVFactory< T >::BaseIVFactory(), blockWriteToBuffer(), PetscSolver< T >::create_mat_vec(), LevelData< T >::degenerateLocalOnly(), VCAMRPoissonOp2::diagonalScale(), NWOViscousTensorOp::diagonalScale(), NWOEBViscousTensorOp::diagonalScale(), ViscousTensorOp::diagonalScale(), EBViscousTensorOp::diagonalScale(), VCAMRPoissonOp2::divideByIdentityCoef(), NWOViscousTensorOp::divideByIdentityCoef(), NWOEBViscousTensorOp::divideByIdentityCoef(), ViscousTensorOp::divideByIdentityCoef(), EBViscousTensorOp::divideByIdentityCoef(), MultilevelLinearOp< T >::dotProduct(), BCFunction::fillGhostCells(), IVSFABFactory< T >::IVSFABFactory(), operator()(), EBFastFR::reflux(), regionGather(), PetscSolver< T >::setup_solver(), MergeSolver< T >::solve(), PetscSolver< T >::solve_mfree_private(), write(), WriteMultiData< T >::writeData(), and LayoutData< T >::~LayoutData().
| void LayoutIterator::begin | ( | ) | [inline] |
initialize this iterator to the first Box in its Layout
References m_current.
Referenced by LevelData< T >::degenerateLocalOnly(), 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.
| const LayoutIndex& LayoutIterator::operator[] | ( | int | ivec | ) | const [inline] |
| LayoutIndex& LayoutIterator::operator[] | ( | int | ivec | ) | [inline] |
References m_indicies.
friend class BoxLayout [friend] |
Reimplemented in DataIterator, and TimedDataIterator.
friend class DisjointBoxLayout [friend] |
Reimplemented in DataIterator, and TimedDataIterator.
friend class TimedDataIterator [friend] |
Reimplemented in DataIterator.
BoxLayout LayoutIterator::m_layout [protected] |
RefCountedPtr<Vector<LayoutIndex> > LayoutIterator::m_indicies [protected] |
Referenced by operator()(), and operator[]().
unsigned int LayoutIterator::m_current [protected] |
Referenced by begin(), ok(), operator()(), and operator++().
1.5.5