6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
11#include <dune/common/iteratorfacades.hh>
12#include <dune/common/typetraits.hh>
14#include <dune/geometry/referenceelements.hh>
30 template<
typename CellIterator>
32 :
public ForwardIteratorFacade
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;
54 typedef ReferenceElements<ctype, dim>
Refelems;
70 return cellit != cellend;
77 if(mePassedTheEnd && otherPassedTheEnd)
return true;
79 if(mePassedTheEnd || otherPassedTheEnd)
return false;
81 return cellit == other.cellit &&
88 if(index == Refelems::general(cellit->type()).size(
dim)) {
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_)
Include standard header files.
Definition: agrid.hh:60
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
iterate over the corners of some cell range
Definition: corneriterator.hh:39
Value & Reference
Definition: corneriterator.hh:46
VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
Definition: corneriterator.hh:44
void increment()
Definition: corneriterator.hh:85
Reference dereference() const
Definition: corneriterator.hh:65
std::iterator_traits< CellIterator >::difference_type DifferenceType
Definition: corneriterator.hh:48
static const unsigned dim
Definition: corneriterator.hh:52
ReferenceElements< ctype, dim > Refelems
Definition: corneriterator.hh:54
const Corner Value
Definition: corneriterator.hh:45
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
bool equals(const DerivedType &other) const
Definition: corneriterator.hh:73
CornerIterator< CellIterator > DerivedType
Definition: corneriterator.hh:42
std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype
Definition: corneriterator.hh:51
bool isDereferencable() const
Definition: corneriterator.hh:69