11 #ifndef _DATAITERATOR_H_
12 #define _DATAITERATOR_H_
19 #include "NamespaceHeader.H"
75 virtual bool ok()
const;
89 return m_indices->size();
186 #define DATAITERATOR(CLASS, BOXLAYOUT) \
187 DataIterator dit = BOXLAYOUT .dataIterator(); \
188 for (dit.begin(); dit.ok(); ++dit) \
190 DataIndex di = dit(); \
191 MT_BEGIN1(CLASS, DataIndex, di)
193 #define ENDITERATOR(CLASS) \
194 MT_END1(CLASS, DataIndex, di) \
197 #define DATAITERATOR1(CLASS, BOXLAYOUT, TYPE1, VAL1) \
198 DataIterator dit = BOXLAYOUT .dataIterator(); \
199 for (dit.begin(); dit.ok(); ++dit) \
201 DataIndex di = dit(); \
202 MT_BEGIN2(CLASS, TYPE1, VAL1, DataIndex, di)
204 #define ENDITERATOR1(CLASS, TYPE1, VAL1) \
205 MT_END2(CLASS, TYPE1, VAL1, DataIndex, di) \
208 #define DATAITERATOR2(CLASS, BOXLAYOUT, TYPE1, VAL1, TYPE2, VAL2) \
209 DataIterator dit = BOXLAYOUT .dataIterator(); \
210 for (dit.begin(); dit.ok(); ++dit) \
212 DataIndex di = dit(); \
213 MT_BEGIN3(CLASS, TYPE1, VAL1, TYPE2, VAL2, DataIndex, di)
215 #define ENDITERATOR2(CLASS, TYPE1, VAL1, TYPE2, VAL2) \
216 MT_END3(CLASS, TYPE1, VAL1, TYPE2, VAL2, DataIndex, di) \
219 #include "NamespaceFooter.H"
DataIterator(const BoxLayout &a_layout)
Definition: DataIterator.H:149
A reference-counting handle class.
Definition: RefCountedPtr.H:66
void incr()
move the iterator to the next Box in the layout
Definition: LayoutIterator.H:66
#define CH_assert(cond)
Definition: CHArray.H:37
const LayoutIndex & operator()() const
return the index that this iterator is at
Definition: LayoutIterator.H:99
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:146
void end()
move this iterator to after the last Box in the layout
DataIterator(const BoxLayout &boxlayout, const int *layoutID)
Definition: DataIterator.H:179
int size() const
Definition: DataIterator.H:168
void begin()
initialize this iterator to the first Box in its Layout
Definition: LayoutIterator.H:115
int m_current
Definition: LayoutIterator.H:95
Definition: DataIterator.H:140
unsigned int size() const
Returns the total number of boxes in the BoxLayout.
An Iterator based on a BoxLayout object.
Definition: LayoutIterator.H:38
void reset()
same as begin()
DataIndex i() const
return a copy of the index that this iterator is at
Definition: DataIterator.H:163
BoxLayout m_layout
Definition: LayoutIterator.H:92
DataIterator()
Definition: DataIterator.H:146
virtual void operator++()
move the iterator to the next Box in the layout
Definition: LayoutIterator.H:105
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:31
DataIterator dataIterator() const
Parallel iterator.
Definition: DataIndex.H:112
virtual bool ok() const
return true if this iterator is still in its Layout
Definition: LayoutIterator.H:110
virtual ~DataIterator()
Definition: DataIterator.H:143
const DataIndex & operator()() const
return the index that this iterator is at
Definition: DataIterator.H:156
Definition: TimedDataIterator.H:23