dune-grid  2.4.1
volumeiterators.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 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
VTK::Corner< Cell > Point
Definition: volumeiterators.hh:39
static const unsigned dimCell
Definition: volumeiterators.hh:85
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition: volumeiterators.hh:34
CornerIterator endCorners() const
Definition: volumeiterators.hh:61
PointIterator endPoints() const
Definition: volumeiterators.hh:68
ConformingVolumeIteratorFactory(const GV &gv_)
Definition: volumeiterators.hh:47
GV::CollectiveCommunication CollectiveCommunication
Definition: volumeiterators.hh:98
ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > ConnectivityWriter
Definition: volumeiterators.hh:44
PointIterator beginPoints() const
Definition: volumeiterators.hh:65
simple class representing a corner of a cell
Definition: corner.hh:23
VTK::Corner< Cell > Corner
Definition: volumeiterators.hh:36
CornerIterator PointIterator
Definition: volumeiterators.hh:95
ConnectivityWriter makeConnectivity() const
Definition: volumeiterators.hh:72
CornerIterator endCorners() const
Definition: volumeiterators.hh:114
Definition: volumeiterators.hh:21
CellIterator endCells() const
Definition: volumeiterators.hh:54
ConnectivityWriter makeConnectivity() const
Definition: volumeiterators.hh:121
const CollectiveCommunication & comm() const
Definition: volumeiterators.hh:75
const CollectiveCommunication & comm() const
Definition: volumeiterators.hh:124
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition: volumeiterators.hh:89
VTK::CornerIterator< CellIterator > CornerIterator
Definition: volumeiterators.hh:92
Corner Point
Definition: volumeiterators.hh:94
NonConformingConnectivityWriter< Cell > ConnectivityWriter
Definition: volumeiterators.hh:97
GV::template Codim< 0 >::Entity Cell
Definition: volumeiterators.hh:87
writer for the connectivity array in conforming mode
Definition: functionwriter.hh:185
VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator
Definition: volumeiterators.hh:41
VTK::CornerIterator< CellIterator > CornerIterator
Definition: volumeiterators.hh:37
CornerIterator beginCorners() const
Definition: volumeiterators.hh:111
Definition: volumeiterators.hh:81
CellIterator beginCells() const
Definition: volumeiterators.hh:51
PointIterator beginPoints() const
Definition: volumeiterators.hh:118
writer for the connectivity array in nonconforming mode
Definition: functionwriter.hh:251
static const unsigned dimCell
Definition: volumeiterators.hh:30
CellIterator beginCells() const
Definition: volumeiterators.hh:104
NonConformingVolumeIteratorFactory(const GV &gv_)
Definition: volumeiterators.hh:100
GV::CollectiveCommunication CollectiveCommunication
Definition: volumeiterators.hh:45
iterate over the corners of some cell range
Definition: corneriterator.hh:29
CornerIterator beginCorners() const
Definition: volumeiterators.hh:58
CellIterator endCells() const
Definition: volumeiterators.hh:107
iterate over the points of some corner range
Definition: pointiterator.hh:48
GV::template Codim< 0 >::Entity Cell
Definition: volumeiterators.hh:32
VTK::Corner< Cell > Corner
Definition: volumeiterators.hh:91
PointIterator endPoints() const
Definition: volumeiterators.hh:119