Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

DataIterator Class Reference

#include <DataIterator.H>

Collaboration diagram for DataIterator:

Collaboration 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, since it is intended to work with all of BoxLayouts, DisjointBoxLayouts, BoxLayoutDatas LevelDatas, and any object that is built on top of a BoxLayout object.

DataIterator accesses the data in a BoxLayout-based object in a data-parallel manner. This means that it skips over entries for Boxes not assigned to this processor. The order of access is not defined.

In serial execution mode, there is no difference between DataIterator and LayoutIterator.


Public Member Functions

 DataIterator ()
 a null constructed DataIterator will return false on ok()

 DataIterator (const BoxLayout &a_layout)
 ~DataIterator ()
const DataIndexoperator() () const
 return the index that this iterator is at

DataIndex i () const
 return a copy of the index that this iterator is at

void operator++ ()
 move the iterator to the next index in the layout

void incr ()
 move the iterator to the next index in the layout

bool ok () const
 return true if this iterator is still in the layout

void begin ()
 initialize this iterator to the first index in the layout

void reset ()
 same as begin()

void end ()
 move this iterator to after the last index in the layout


Private Member Functions

 DataIterator (const BoxLayout &boxlayout, const int *layoutID)

Private Attributes

BoxLayout m_layout
unsigned int m_index
DataIndex m_current
unsigned int m_procID

Friends

class BoxLayout
class DisjointBoxLayout


Constructor & Destructor Documentation

DataIterator::DataIterator  )  [inline]
 

a null constructed DataIterator will return false on ok()

DataIterator::DataIterator const BoxLayout a_layout  )  [inline]
 

DataIterator::~DataIterator  )  [inline]
 

DataIterator::DataIterator const BoxLayout boxlayout,
const int *  layoutID
[private]
 


Member Function Documentation

const DataIndex & DataIterator::operator()  )  const [inline]
 

return the index that this iterator is at

Aborts if the iterator is not ok()

DataIndex DataIterator::i  )  const [inline]
 

return a copy of the index that this iterator is at

Aborts if the iterator is not ok()

void DataIterator::operator++  )  [inline]
 

move the iterator to the next index in the layout

void DataIterator::incr  )  [inline]
 

move the iterator to the next index in the layout

bool DataIterator::ok  )  const [inline]
 

return true if this iterator is still in the layout

void DataIterator::begin  )  [inline]
 

initialize this iterator to the first index in the layout

void DataIterator::reset  )  [inline]
 

same as begin()

void DataIterator::end  ) 
 

move this iterator to after the last index in the layout

The iterator will be !ok() afterwards.


Friends And Related Function Documentation

friend class BoxLayout [friend]
 

friend class DisjointBoxLayout [friend]
 


Member Data Documentation

BoxLayout DataIterator::m_layout [private]
 

unsigned int DataIterator::m_index [private]
 

DataIndex DataIterator::m_current [private]
 

unsigned int DataIterator::m_procID [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 17:55:45 2004 for Chombo by doxygen 1.3.2