6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
12#include <dune/common/iteratorfacades.hh>
37 :
public ForwardIteratorFacade
38 < BoundaryIterator<GV>,
39 const typename GV::Intersection,
40 const typename GV::Intersection&,
41 typename std::iterator_traits<typename GV::template Codim<0>::
42 Iterator>::difference_type>
47 typedef const typename GV::Intersection
Value;
51 typedef typename std::iterator_traits<ElementIterator>::difference_type
60 std::shared_ptr<IntersectionIterator> iit;
64 if(eit == gv->template end<0>())
return true;
66 if((*iit)->boundary() && !(*iit)->neighbor())
return true;
71 void basic_increment() {
73 if(*iit == gv->iend(*eit)) {
76 if(eit != gv->template end<0>())
86 if(eit != other.eit)
return false;
90 bool mePassedTheEnd = eit == gv->template end<0>();
91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();
94 if(mePassedTheEnd && otherPassedTheEnd)
return true;
97 if(mePassedTheEnd || otherPassedTheEnd)
return false;
100 return *iit == *other.iit;
105 while(!valid()) basic_increment();
117 while(!valid()) basic_increment();
126 : gv(&gv_), eit(eit_)
128 if(eit != gv->template end<0>())
131 while(!valid()) basic_increment();
139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())
141 if(eit != gv->template end<0>())
144 while(!valid()) basic_increment();
148 template<
typename ElementIndexSet>
150 const ElementIndexSet& eis;
158 template<
typename GV>
163 static const unsigned dimCell = GV::dimension-1;
165 typedef typename GV::Intersection
Cell;
Include standard header files.
Definition: agrid.hh:60
iterate over the GridViews boundary intersections
Definition: boundaryiterators.hh:43
BoundaryIterator< GV > DerivedType
Definition: boundaryiterators.hh:46
BoundaryIterator(const GV &gv_, const ElementIterator &eit_)
construct a BoundaryIterator
Definition: boundaryiterators.hh:125
Reference dereference() const
Definition: boundaryiterators.hh:82
const GV::Intersection Value
Definition: boundaryiterators.hh:47
BoundaryIterator(const GV &gv_, bool end=false)
construct a BoundaryIterator
Definition: boundaryiterators.hh:138
BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const IntersectionIterator &iit_)
construct a BoundaryIterator
Definition: boundaryiterators.hh:113
GV::template Codim< 0 >::Iterator ElementIterator
Definition: boundaryiterators.hh:49
Value & Reference
Definition: boundaryiterators.hh:48
GV::IntersectionIterator IntersectionIterator
Definition: boundaryiterators.hh:50
bool equals(const DerivedType &other) const
Definition: boundaryiterators.hh:85
std::iterator_traits< ElementIterator >::difference_type DifferenceType
Definition: boundaryiterators.hh:52
void increment()
Definition: boundaryiterators.hh:103
Definition: boundaryiterators.hh:149
IntersectionIndexSet(const ElementIndexSet &eis_)
Definition: boundaryiterators.hh:153
Definition: boundaryiterators.hh:159
PointIterator beginPoints() const
Definition: boundaryiterators.hh:195
ConnectivityWriter makeConnectivity() const
Definition: boundaryiterators.hh:198
GV::Communication Communication
Definition: boundaryiterators.hh:175
static const unsigned dimCell
Definition: boundaryiterators.hh:163
VTK::CornerIterator< CellIterator > CornerIterator
Definition: boundaryiterators.hh:169
BoundaryIterator< GV > CellIterator
Definition: boundaryiterators.hh:166
Corner Point
Definition: boundaryiterators.hh:171
CornerIterator beginCorners() const
Definition: boundaryiterators.hh:188
CellIterator beginCells() const
Definition: boundaryiterators.hh:181
NonConformingConnectivityWriter< Cell > ConnectivityWriter
Definition: boundaryiterators.hh:174
CornerIterator endCorners() const
Definition: boundaryiterators.hh:191
VTK::Corner< Cell > Corner
Definition: boundaryiterators.hh:168
GV::Intersection Cell
Definition: boundaryiterators.hh:165
CornerIterator PointIterator
Definition: boundaryiterators.hh:172
NonConformingBoundaryIteratorFactory(const GV &gv_)
Definition: boundaryiterators.hh:177
CellIterator endCells() const
Definition: boundaryiterators.hh:184
const Communication & comm() const
Definition: boundaryiterators.hh:201
PointIterator endPoints() const
Definition: boundaryiterators.hh:196
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 nonconforming mode
Definition: functionwriter.hh:261