11 #ifndef _DATAITERATOR_H_ 12 #define _DATAITERATOR_H_ 19 #include "NamespaceHeader.H" 82 virtual bool ok()
const;
96 return m_indices->size();
129 m_timeEnabled =
true;
137 m_peakEnabled =
true;
143 m_timeEnabled =
false;
149 m_peakEnabled =
false;
185 unsigned long long m_startPeak;
296 #define DATAITERATOR(CLASS, BOXLAYOUT) \ 297 DataIterator dit = BOXLAYOUT .dataIterator(); \ 298 for (dit.begin(); dit.ok(); ++dit) \ 300 DataIndex di = dit(); \ 301 MT_BEGIN1(CLASS, DataIndex, di) 303 #define ENDITERATOR(CLASS) \ 304 MT_END1(CLASS, DataIndex, di) \ 307 #define DATAITERATOR1(CLASS, BOXLAYOUT, TYPE1, VAL1) \ 308 DataIterator dit = BOXLAYOUT .dataIterator(); \ 309 for (dit.begin(); dit.ok(); ++dit) \ 311 DataIndex di = dit(); \ 312 MT_BEGIN2(CLASS, TYPE1, VAL1, DataIndex, di) 314 #define ENDITERATOR1(CLASS, TYPE1, VAL1) \ 315 MT_END2(CLASS, TYPE1, VAL1, DataIndex, di) \ 318 #define DATAITERATOR2(CLASS, BOXLAYOUT, TYPE1, VAL1, TYPE2, VAL2) \ 319 DataIterator dit = BOXLAYOUT .dataIterator(); \ 320 for (dit.begin(); dit.ok(); ++dit) \ 322 DataIndex di = dit(); \ 323 MT_BEGIN3(CLASS, TYPE1, VAL1, TYPE2, VAL2, DataIndex, di) 325 #define ENDITERATOR2(CLASS, TYPE1, VAL1, TYPE2, VAL2) \ 326 MT_END3(CLASS, TYPE1, VAL1, TYPE2, VAL2, DataIndex, di) \ 331 #include "NamespaceFooter.H" DataIterator(const BoxLayout &a_layout)
Definition: DataIterator.H:199
Vector< Box > getBoxes()
Definition: DataIterator.H:252
void enableTime()
load balancing function. no-op in serial
Definition: DataIterator.H:258
Vector< Box > boxArray() const
void incr()
move the iterator to the next Box in the layout
Definition: LayoutIterator.H:63
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:145
const LayoutIndex & operator()() const
return the index that this iterator is at
Definition: LayoutIterator.H:106
DataIndex operator[](int ivec) const
Definition: DataIterator.H:223
void end()
move this iterator to after the last Box in the layout
DataIterator(const BoxLayout &boxlayout, const int *layoutID)
Definition: DataIterator.H:289
void clearPeak()
load balancing function. no-op in serial
Definition: DataIterator.H:235
unsigned int size() const
Returns the total number of boxes in the BoxLayout.
void disableTime()
load balancing function. no-op in serial
Definition: DataIterator.H:267
void begin()
initialize this iterator to the first Box in its Layout
Definition: LayoutIterator.H:122
virtual bool ok() const
return true if this iterator is still in its Layout
Definition: LayoutIterator.H:117
Definition: DataIterator.H:190
An Iterator based on a BoxLayout object.
Definition: LayoutIterator.H:35
void clearTime()
load balancing function. no-op in serial
Definition: DataIterator.H:230
void enablePeak()
Definition: DataIterator.H:262
void reset()
same as begin()
void mergePeak()
Definition: DataIterator.H:280
unsigned long long m_startTime
Definition: TimedDataIterator.H:79
int size() const
Definition: DataIterator.H:218
unsigned int m_current
Definition: LayoutIterator.H:103
void mergeTime()
load balancing function. no-op in serial
Definition: DataIterator.H:276
BoxLayout m_layout
Definition: LayoutIterator.H:100
DataIterator()
Definition: DataIterator.H:196
virtual void operator++()
move the iterator to the next Box in the layout
Definition: LayoutIterator.H:112
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
Vector< unsigned long long > getTime() const
load balancing function. no-op in serial
Definition: DataIterator.H:240
const DataIndex & operator()() const
return the index that this iterator is at
Definition: DataIterator.H:206
Vector< unsigned long long > m_time
Definition: TimedDataIterator.H:76
Definition: DataIndex.H:112
DataIndex i() const
return a copy of the index that this iterator is at
Definition: DataIterator.H:213
Vector< unsigned long long > getPeak() const
Definition: DataIterator.H:246
DataIterator dataIterator() const
Parallel iterator.
virtual ~DataIterator()
Definition: DataIterator.H:193
bool m_timeDefined
Definition: TimedDataIterator.H:78
Definition: TimedDataIterator.H:23
void disablePeak()
Definition: DataIterator.H:271
bool m_timeEnabled
Definition: TimedDataIterator.H:77