6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
14#include <dune/geometry/referenceelements.hh>
16#include <dune/grid/io/file/vtk/corner.hh>
30 template<
typename CellIterator>
33 < CornerIterator<CellIterator>,
34 const Corner<typename std::remove_const<typename std::iterator_traits<
35 CellIterator>::value_type>::type>,
36 const Corner<typename std::remove_const<typename std::iterator_traits<
37 CellIterator>::value_type>::type>&,
38 typename std::iterator_traits<CellIterator>::difference_type>
43 typedef VTK::Corner<
typename std::remove_const<
typename std::iterator_traits<
44 CellIterator>::value_type>::type>
Corner;
47 typedef typename std::iterator_traits<CellIterator>::difference_type
50 typedef typename std::iterator_traits<CellIterator>::value_type::Geometry::ctype
52 static const unsigned dim = std::iterator_traits<CellIterator>::
53 value_type::mydimension;
69 bool isDereferencable()
const {
70 return cellit != cellend;
74 bool mePassedTheEnd = !isDereferencable();
75 bool otherPassedTheEnd = !other.isDereferencable();
77 if(mePassedTheEnd && otherPassedTheEnd)
return true;
79 if(mePassedTheEnd || otherPassedTheEnd)
return false;
81 return cellit == other.cellit &&
90 if(cellit != cellend) {
106 unsigned vtkIndex = 0)
107 : cellit(cellit_), cellend(cellend_)
109 if(cellit != cellend) {
110 corner.
cell(*cellit);
119 : cellit(cellend_), cellend(cellend_)
Base class for stl conformant forward iterators.
Definition: iteratorfacades.hh:141
iterate over the corners of some cell range
Definition: corneriterator.hh:39
CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_, unsigned vtkIndex=0)
construct a CornerIterator
Definition: corneriterator.hh:105
CornerIterator(const CellIterator &cellend_)
construct a CornerIterator
Definition: corneriterator.hh:118
simple class representing a corner of a cell
Definition: corner.hh:25
unsigned vtkIndex() const
get the index of the corner within the cell in VTK-numbering
Definition: corner.hh:63
unsigned duneIndex() const
get the index of the corner within the cell in Dune-numbering
Definition: corner.hh:55
const Cell & cell() const
get reference to the cell
Definition: corner.hh:46
This file implements iterator facade classes for writing stl conformant iterators.
Dune namespace.
Definition: alignedallocator.hh:13
Class providing access to the singletons of the reference elements.
Definition: referenceelements.hh:170
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition: referenceelements.hh:198
Traits for type conversions and type information.