Go to the documentation of this file.
4 #ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
5 #define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
9 #include <dune/common/iteratorfacades.hh>
10 #include <dune/common/typetraits.hh>
12 #include <dune/geometry/referenceelements.hh>
28 template<
typename CellIterator>
30 :
public ForwardIteratorFacade
31 < CornerIterator<CellIterator>,
32 const Corner<typename std::remove_const<typename std::iterator_traits<
33 CellIterator>::value_type>::type>,
34 const Corner<typename std::remove_const<typename std::iterator_traits<
35 CellIterator>::value_type>::type>&,
36 typename std::iterator_traits<CellIterator>::difference_type>
41 typedef VTK::Corner<
typename std::remove_const<
typename std::iterator_traits<
42 CellIterator>::value_type>::type>
Corner;
45 typedef typename std::iterator_traits<CellIterator>::difference_type
48 typedef typename std::iterator_traits<CellIterator>::value_type::Geometry::ctype
50 static const unsigned dim = std::iterator_traits<CellIterator>::
51 value_type::mydimension;
52 typedef ReferenceElements<ctype, dim>
Refelems;
68 return cellit != cellend;
75 if(mePassedTheEnd && otherPassedTheEnd)
return true;
77 if(mePassedTheEnd || otherPassedTheEnd)
return false;
79 return cellit == other.cellit &&
86 if(index == Refelems::general(cellit->type()).size(
dim)) {
88 if(cellit != cellend) {
104 unsigned vtkIndex = 0)
105 : cellit(cellit_), cellend(cellend_)
107 if(cellit != cellend) {
108 corner.
cell(*cellit);
117 : cellit(cellend_), cellend(cellend_)
127 #endif // DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
std::iterator_traits< CellIterator >::difference_type DifferenceType
Definition: corneriterator.hh:46
const typedef Corner Value
Definition: corneriterator.hh:43
VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
Definition: corneriterator.hh:42
bool equals(const DerivedType &other) const
Definition: corneriterator.hh:71
void increment()
Definition: corneriterator.hh:83
simple class representing a corner of a cell
Definition: corner.hh:23
const Cell & cell() const
get reference to the cell
Definition: corner.hh:44
ReferenceElements< ctype, dim > Refelems
Definition: corneriterator.hh:52
CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_, unsigned vtkIndex=0)
construct a CornerIterator
Definition: corneriterator.hh:103
Reference dereference() const
Definition: corneriterator.hh:63
unsigned duneIndex() const
get the index of the corner within the cell in Dune-numbering
Definition: corner.hh:53
CornerIterator< CellIterator > DerivedType
Definition: corneriterator.hh:40
bool isDereferencable() const
Definition: corneriterator.hh:67
iterate over the corners of some cell range
Definition: corneriterator.hh:29
static const unsigned dim
Definition: corneriterator.hh:50
CornerIterator(const CellIterator &cellend_)
construct a CornerIterator
Definition: corneriterator.hh:116
unsigned vtkIndex() const
get the index of the corner within the cell in VTK-numbering
Definition: corner.hh:61
std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype
Definition: corneriterator.hh:49
Include standard header files.
Definition: agrid.hh:58
Value & Reference
Definition: corneriterator.hh:44