Proto  3.2
Proto_NeighborIterator.H
Go to the documentation of this file.
1 #pragma once
2 #ifndef _PROTO_NEIGHBOR_ITERATOR__
3 #define _PROTO_NEIGHBOR_ITERATOR__
4 #include "Proto_DataIndex.H"
6 namespace Proto
7 {
9  {
10  protected:
11 
19 
20  public:
21 
22  /// Constructor takes DBL, and Box that we are intersecting with the DBL.
23  inline NeighborIterator(const DisjointBoxLayout& a_dbl, const Box& a_bx);
24  //~NeighborIterator();
25 
26  /// Iterator functions begin, end, ++.
27  inline NeighborIterator& begin();
28  inline const DataIndex<BoxPartition>& end() const{return m_end;};
29  inline bool ok() const {return (m_current != m_end);}
30  inline NeighborIterator& operator++();
31 
32  /// Dereference operator returns the DataIndex corresponding to the current iterate.
33  inline const DataIndex<BoxPartition>& operator*() const{return m_current;};
34  /// The Point corresponding to the Box for that index. Undefined if invalid.
35  inline Point point() const;
36  /// The region to be copied from corresponding to that index. Undefined if invalid.
37  inline Box srcBox() const;
38  /// The region to be copied from corresponding to that index. Undefined if invalid.
39  inline Box destBox() const;
40  /// The amount by which the srcBox is shifted to obtain destBox a_bx.
41  inline Point shift();
42  // Processor ID for current iterate.
43  inline int procID(){return m_layout.procID(m_current);};
44  };
45  #include "implem/Proto_NeighborIteratorImplem.H"
46 } // end namespace Proto
47 #endif // end include guard
Point m_shift
Definition: Proto_NeighborIterator.H:15
Definition: Proto_NeighborIterator.H:8
Point shift()
The amount by which the srcBox is shifted to obtain destBox a_bx.
Definition: Proto_NeighborIterator.H:91
Box srcBox() const
The region to be copied from corresponding to that index. Undefined if invalid.
Definition: Proto_NeighborIterator.H:77
DataIndex< BoxPartition > m_end
Definition: Proto_NeighborIterator.H:17
Iterator for Boxes.
Definition: Proto_Box.H:991
BoxIterator m_bxit
Definition: Proto_NeighborIterator.H:14
Disjoint Box Layout.
Definition: Proto_DisjointBoxLayout.H:30
DisjointBoxLayout m_layout
Definition: Proto_NeighborIterator.H:12
const DataIndex< BoxPartition > & end() const
Definition: Proto_NeighborIterator.H:28
ProblemDomain m_dProbC
Definition: Proto_NeighborIterator.H:18
NeighborIterator(const DisjointBoxLayout &a_dbl, const Box &a_bx)
Constructor takes DBL, and Box that we are intersecting with the DBL.
Definition: Proto_NeighborIterator.H:2
Box m_bx
Definition: Proto_NeighborIterator.H:13
int procID()
Definition: Proto_NeighborIterator.H:43
An interval in DIM dimensional space.
Definition: Proto_Box.H:29
NeighborIterator & begin()
Iterator functions begin, end, ++.
Definition: Proto_NeighborIterator.H:19
Point point() const
The Point corresponding to the Box for that index. Undefined if invalid.
Definition: Proto_NeighborIterator.H:71
int procID(const LevelIndex &a_index) const
Get Process ID.
Definition: Proto_DisjointBoxLayout.H:230
NeighborIterator & operator++()
Definition: Proto_NeighborIterator.H:43
bool ok() const
Definition: Proto_NeighborIterator.H:29
Box destBox() const
The region to be copied from corresponding to that index. Undefined if invalid.
Definition: Proto_NeighborIterator.H:84
Definition: Proto_Array.H:17
Integer Valued Vector.
Definition: Proto_Point.H:24
DataIndex< BoxPartition > m_current
Definition: Proto_NeighborIterator.H:16
Represents a rectangular domain over which a problem can be defined, including periodic images...
Definition: Proto_ProblemDomain.H:22
const DataIndex< BoxPartition > & operator*() const
Dereference operator returns the DataIndex corresponding to the current iterate.
Definition: Proto_NeighborIterator.H:33