dune-grid  2.2.1
volumeiterators.hh
Go to the documentation of this file.
1 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=8 sw=2 sts=2:
3 
4 #ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
5 #define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
6 
8 
13 
14 namespace Dune {
17 
18  namespace VTK {
19 
20  template<typename GV>
22  const GV& gv;
23 
24  typedef typename GV::IndexSet IndexSet;
25  const IndexSet& indexSet() const { return gv.indexSet(); }
26  friend class ConformingConnectivityWriter<
28 
29  public:
30  static const unsigned dimCell = GV::dimension;
31 
32  typedef typename GV::template Codim<0>::Entity Cell;
33  typedef typename GV::template Codim<0>::
34  template Partition<InteriorBorder_Partition>::Iterator CellIterator;
35 
38 
41  typename GV::IndexSet> PointIterator;
42 
45  typedef typename GV::CollectiveCommunication CollectiveCommunication;
46 
47  explicit ConformingVolumeIteratorFactory(const GV& gv_)
48  : gv(gv_)
49  { }
50 
52  return gv.template begin<0, InteriorBorder_Partition>();
53  }
55  return gv.template end<0, InteriorBorder_Partition>();
56  }
57 
59  return CornerIterator(beginCells(), endCells());
60  }
62  return CornerIterator(endCells());
63  }
64 
66  return PointIterator(beginCells(), endCells(), gv.indexSet());
67  }
69  return PointIterator(endCells());
70  }
71 
73  return ConnectivityWriter(*this);
74  }
75  const CollectiveCommunication& comm() const {
76  return gv.comm();
77  }
78  };
79 
80  template<typename GV>
82  const GV& gv;
83 
84  public:
85  static const unsigned dimCell = GV::dimension;
86 
87  typedef typename GV::template Codim<0>::Entity Cell;
88  typedef typename GV::template Codim<0>::
89  template Partition<InteriorBorder_Partition>::Iterator CellIterator;
90 
93 
94  typedef Corner Point;
96 
98  typedef typename GV::CollectiveCommunication CollectiveCommunication;
99 
100  explicit NonConformingVolumeIteratorFactory(const GV& gv_)
101  : gv(gv_)
102  { }
103 
105  return gv.template begin<0, InteriorBorder_Partition>();
106  }
108  return gv.template end<0, InteriorBorder_Partition>();
109  }
110 
112  return CornerIterator(beginCells(), endCells());
113  }
115  return CornerIterator(endCells());
116  }
117 
118  PointIterator beginPoints() const { return beginCorners(); }
119  PointIterator endPoints() const { return endCorners(); }
120 
122  return ConnectivityWriter();
123  }
124  const CollectiveCommunication& comm() const {
125  return gv.comm();
126  }
127  };
128 
129  } // namespace VTK
130 
132 
133 } // namespace Dune
134 
135 #endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH