dune-grid 2.9.0
volumeiterators.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5
6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
8
10
15
16namespace Dune {
19
20 namespace VTK {
21
22 template<typename GV>
24 const GV& gv;
25
26 typedef typename GV::IndexSet IndexSet;
27 const IndexSet& indexSet() const { return gv.indexSet(); }
30
31 public:
32 static const unsigned dimCell = GV::dimension;
33
34 typedef typename GV::template Codim<0>::Entity Cell;
35 typedef typename GV::template Codim<0>::
36 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
37
40
43 typename GV::IndexSet> PointIterator;
44
47 typedef typename GV::Communication Communication;
48
49 explicit ConformingVolumeIteratorFactory(const GV& gv_)
50 : gv(gv_)
51 { }
52
54 return gv.template begin<0, InteriorBorder_Partition>();
55 }
57 return gv.template end<0, InteriorBorder_Partition>();
58 }
59
62 }
64 return CornerIterator(endCells());
65 }
66
68 return PointIterator(beginCells(), endCells(), gv.indexSet());
69 }
71 return PointIterator(endCells());
72 }
73
75 return ConnectivityWriter(*this);
76 }
77 const Communication& comm() const {
78 return gv.comm();
79 }
80 };
81
82 template<typename GV>
84 const GV& gv;
85
86 public:
87 static const unsigned dimCell = GV::dimension;
88
89 typedef typename GV::template Codim<0>::Entity Cell;
90 typedef typename GV::template Codim<0>::
91 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
92
95
96 typedef Corner Point;
98
100 typedef typename GV::Communication Communication;
101
103 : gv(gv_)
104 { }
105
107 return gv.template begin<0, InteriorBorder_Partition>();
108 }
110 return gv.template end<0, InteriorBorder_Partition>();
111 }
112
115 }
117 return CornerIterator(endCells());
118 }
119
121 PointIterator endPoints() const { return endCorners(); }
122
124 return ConnectivityWriter();
125 }
126 const Communication& comm() const {
127 return gv.comm();
128 }
129 };
130
131 } // namespace VTK
132
134
135} // namespace Dune
136
137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
Include standard header files.
Definition: agrid.hh:60
simple class representing a corner of a cell
Definition: corner.hh:25
iterate over the corners of some cell range
Definition: corneriterator.hh:39
writer for the connectivity array in conforming mode
Definition: functionwriter.hh:195
writer for the connectivity array in nonconforming mode
Definition: functionwriter.hh:261
iterate over the points of some corner range
Definition: pointiterator.hh:58
Definition: volumeiterators.hh:23
CornerIterator endCorners() const
Definition: volumeiterators.hh:63
VTK::CornerIterator< CellIterator > CornerIterator
Definition: volumeiterators.hh:39
VTK::Corner< Cell > Corner
Definition: volumeiterators.hh:38
CellIterator endCells() const
Definition: volumeiterators.hh:56
GV::Communication Communication
Definition: volumeiterators.hh:47
VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator
Definition: volumeiterators.hh:43
ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > ConnectivityWriter
Definition: volumeiterators.hh:46
CornerIterator beginCorners() const
Definition: volumeiterators.hh:60
static const unsigned dimCell
Definition: volumeiterators.hh:32
PointIterator endPoints() const
Definition: volumeiterators.hh:70
const Communication & comm() const
Definition: volumeiterators.hh:77
ConformingVolumeIteratorFactory(const GV &gv_)
Definition: volumeiterators.hh:49
VTK::Corner< Cell > Point
Definition: volumeiterators.hh:41
ConnectivityWriter makeConnectivity() const
Definition: volumeiterators.hh:74
CellIterator beginCells() const
Definition: volumeiterators.hh:53
GV::template Codim< 0 >::Entity Cell
Definition: volumeiterators.hh:34
PointIterator beginPoints() const
Definition: volumeiterators.hh:67
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition: volumeiterators.hh:36
Definition: volumeiterators.hh:83
const Communication & comm() const
Definition: volumeiterators.hh:126
PointIterator beginPoints() const
Definition: volumeiterators.hh:120
GV::Communication Communication
Definition: volumeiterators.hh:100
CellIterator beginCells() const
Definition: volumeiterators.hh:106
GV::template Codim< 0 >::Entity Cell
Definition: volumeiterators.hh:89
NonConformingVolumeIteratorFactory(const GV &gv_)
Definition: volumeiterators.hh:102
ConnectivityWriter makeConnectivity() const
Definition: volumeiterators.hh:123
NonConformingConnectivityWriter< Cell > ConnectivityWriter
Definition: volumeiterators.hh:99
static const unsigned dimCell
Definition: volumeiterators.hh:87
CellIterator endCells() const
Definition: volumeiterators.hh:109
CornerIterator endCorners() const
Definition: volumeiterators.hh:116
VTK::CornerIterator< CellIterator > CornerIterator
Definition: volumeiterators.hh:94
VTK::Corner< Cell > Corner
Definition: volumeiterators.hh:93
CornerIterator PointIterator
Definition: volumeiterators.hh:97
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition: volumeiterators.hh:91
PointIterator endPoints() const
Definition: volumeiterators.hh:121
Corner Point
Definition: volumeiterators.hh:96
CornerIterator beginCorners() const
Definition: volumeiterators.hh:113