4#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
5#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
7#include <dune/grid/common/gridenums.hh>
9#include <dune/grid/io/file/vtk/corner.hh>
10#include <dune/grid/io/file/vtk/corneriterator.hh>
11#include <dune/grid/io/file/vtk/functionwriter.hh>
12#include <dune/grid/io/file/vtk/pointiterator.hh>
21 class ConformingVolumeIteratorFactory {
24 typedef typename GV::IndexSet IndexSet;
25 const IndexSet& indexSet()
const {
return gv.indexSet(); }
26 friend class ConformingConnectivityWriter<
27 ConformingVolumeIteratorFactory<GV> >;
30 static const unsigned dimCell = GV::dimension;
32 typedef typename GV::template Codim<0>::Entity Cell;
33 typedef typename GV::template Codim<0>::
34 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
36 typedef VTK::Corner<Cell> Corner;
37 typedef VTK::CornerIterator<CellIterator> CornerIterator;
39 typedef VTK::Corner<Cell> Point;
40 typedef VTK::PointIterator<CellIterator,
41 typename GV::IndexSet> PointIterator;
43 typedef ConformingConnectivityWriter<ConformingVolumeIteratorFactory<GV>
45 typedef typename GV::CollectiveCommunication CollectiveCommunication;
47 explicit ConformingVolumeIteratorFactory(
const GV& gv_)
51 CellIterator beginCells()
const {
52 return gv.template begin<0, InteriorBorder_Partition>();
54 CellIterator endCells()
const {
55 return gv.template end<0, InteriorBorder_Partition>();
58 CornerIterator beginCorners()
const {
59 return CornerIterator(beginCells(), endCells());
61 CornerIterator endCorners()
const {
62 return CornerIterator(endCells());
65 PointIterator beginPoints()
const {
66 return PointIterator(beginCells(), endCells(), gv.indexSet());
68 PointIterator endPoints()
const {
69 return PointIterator(endCells());
72 ConnectivityWriter makeConnectivity()
const {
73 return ConnectivityWriter(*
this);
75 const CollectiveCommunication& comm()
const {
81 class NonConformingVolumeIteratorFactory {
85 static const unsigned dimCell = GV::dimension;
87 typedef typename GV::template Codim<0>::Entity Cell;
88 typedef typename GV::template Codim<0>::
89 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
91 typedef VTK::Corner<Cell> Corner;
92 typedef VTK::CornerIterator<CellIterator> CornerIterator;
95 typedef CornerIterator PointIterator;
97 typedef NonConformingConnectivityWriter<Cell> ConnectivityWriter;
98 typedef typename GV::CollectiveCommunication CollectiveCommunication;
100 explicit NonConformingVolumeIteratorFactory(
const GV& gv_)
104 CellIterator beginCells()
const {
105 return gv.template begin<0, InteriorBorder_Partition>();
107 CellIterator endCells()
const {
108 return gv.template end<0, InteriorBorder_Partition>();
111 CornerIterator beginCorners()
const {
112 return CornerIterator(beginCells(), endCells());
114 CornerIterator endCorners()
const {
115 return CornerIterator(endCells());
118 PointIterator beginPoints()
const {
return beginCorners(); }
119 PointIterator endPoints()
const {
return endCorners(); }
121 ConnectivityWriter makeConnectivity()
const {
122 return ConnectivityWriter();
124 const CollectiveCommunication& comm()
const {
Dune namespace.
Definition: alignment.hh:10