00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012
00013 #ifndef _FACEITERATOR_H_
00014 #define _FACEITERATOR_H_
00015
00016 #include "IntVect.H"
00017 #include "FaceIndex.H"
00018 #include "IntVectSet.H"
00019 #include "Vector.H"
00020 #include "NamespaceHeader.H"
00021 class EBGraph;
00022
00023 #define FACEITER_CTOR_ARGS const IntVectSet& a_ivs, \
00024 const EBGraph& a_ebgraph, \
00025 int a_direction, \
00026 const FaceStop::WhichFaces& a_location
00027
00029
00032 class FaceStop
00033 {
00034 public:
00036
00050 enum WhichFaces{Invalid=-1,
00051 SurroundingWithBoundary=0, SurroundingNoBoundary=1,
00052 HiWithBoundary, LoWithBoundary,
00053 HiNoBoundary , LoNoBoundary,
00054 LoBoundaryOnly, HiBoundaryOnly, AllBoundaryOnly,
00055 NUMTYPES};
00056 };
00057
00058
00060
00064 class FaceIterator
00065 {
00066 public:
00067
00069 FaceIterator( FACEITER_CTOR_ARGS );
00070
00072 FaceIterator(const Box& region, const EBGraph& a_ebgraph, int a_direction, const FaceStop::WhichFaces& a_location);
00073
00075 FaceIterator();
00076
00078
00079
00081
00082
00084 ~FaceIterator();
00085
00086
00088
00092 void define( FACEITER_CTOR_ARGS );
00093
00095 void reset();
00096
00098 void operator++();
00099
00101 const FaceIndex& operator() () const;
00102
00104 bool ok() const;
00105
00107 bool isDefined() const;
00108
00110 const Vector<FaceIndex>& getVector() const;
00111
00113
00114
00116
00120
00121
00122 private:
00124
00127 void doDefine( FACEITER_CTOR_ARGS );
00128
00129 bool m_isDefined;
00130 Vector<FaceIndex> m_faces;
00131 int m_iface;
00132 int m_direction;
00133
00134
00135 };
00136
00137
00138
00139
00140
00141 #include "NamespaceFooter.H"
00142 #endif