Chombo + EB  3.2
VoFIterator.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 // ANAG, LBNL
12 
13 #ifndef _VOFITERATOR_H_
14 #define _VOFITERATOR_H_
15 
16 #include "IntVect.H"
17 #include "VolIndex.H"
18 #include "IntVectSet.H"
19 #include "Vector.H"
20 #include "NamespaceHeader.H"
21 class EBGraph;
22 
23 /// Iterator for all vofs within an IntVectSet and an Ebgraph
24 /**
25  Iterator for all vofs within an IntVectSet and an Ebgraph
26  */
28 {
29 public:
30  ///
31  VoFIterator(const IntVectSet& a_ivs,
32  const EBGraph& a_ebgraph);
33 
34  ///
35  VoFIterator();
36 
37  ///
38  ~VoFIterator();
39 
40  ///
41  void define(const IntVectSet& a_ivs,
42  const EBGraph& a_ebgraph);
43 
44  ///
45  void reset();
46 
47  ///
48  void operator++();
49 
50  ///
51  const VolIndex& operator() () const;
52 
53  ///
54  bool ok() const;
55 
56  ///
57  bool isDefined() const;
58 
59  const Vector<VolIndex> getVector() const;
60 
61  int size() const
62  {
63  return m_vols.size();
64  }
65 private:
68  int m_ivol;
69 };
70 
71 #include "NamespaceFooter.H"
72 #endif
const VolIndex & operator()() const
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
void define(const IntVectSet &a_ivs, const EBGraph &a_ebgraph)
int m_ivol
Definition: VoFIterator.H:68
bool ok() const
Vector< VolIndex > m_vols
Definition: VoFIterator.H:67
const Vector< VolIndex > getVector() const
Geometric description within a box.
Definition: EBGraph.H:427
int size() const
Definition: VoFIterator.H:61
size_t size() const
Definition: Vector.H:192
void operator++()
void reset()
Iterator for all vofs within an IntVectSet and an Ebgraph.
Definition: VoFIterator.H:27
bool isDefined() const
Volume of Fluid Index.
Definition: VolIndex.H:31
bool m_isDefined
Definition: VoFIterator.H:66