LayoutIterator Class Reference

#include <LayoutIterator.H>

Inheritance diagram for LayoutIterator:

Inheritance graph
[legend]

List of all members.


Detailed Description

An Iterator based on a BoxLayout object.

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 LayoutIndexoperator() () 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 LayoutIndexoperator[] (int ivec) const
LayoutIndexoperator[] (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


Constructor & Destructor Documentation

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]


Member Function Documentation

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]

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]

Reimplemented in DataIterator.

References m_indicies.

LayoutIndex& LayoutIterator::operator[] ( int  ivec  )  [inline]

References m_indicies.


Friends And Related Function Documentation

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.


Member Data Documentation

Referenced by operator()(), and operator[]().

unsigned int LayoutIterator::m_current [protected]

Referenced by begin(), ok(), operator()(), and operator++().


The documentation for this class was generated from the following file:

Generated on Fri Apr 5 04:25:08 2019 for Chombo + EB by  doxygen 1.5.5