1 #ifndef DUNE_ALU2DGRID_ITERATOR_HH
2 #define DUNE_ALU2DGRID_ITERATOR_HH
17 template<
int cd,
int dim,
class Gr
idImp>
18 class ALU2dGridEntity;
19 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
20 class ALU2dGridLevelIterator;
21 template<
int cd,
class Gr
idImp >
22 class ALU2dGridEntityPointer;
23 template<
int mydim,
int coorddim,
class Gr
idImp>
24 class ALU2dGridGeometry;
25 template<
class Gr
idImp>
26 class ALU2dGridHierarchicIterator;
27 template<
class Gr
idImp>
28 class ALU2dGridIntersectionBase;
29 template<
class Gr
idImp>
30 class ALU2dGridLeafIntersectionIterator;
31 template<
class Gr
idImp>
32 class ALU2dGridLevelIntersectionIterator;
33 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
34 class ALU2dGridLeafIterator;
35 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
46 template<
int cdim, PartitionIteratorType pitype,
class Gr
idImp>
47 class ALU2dGridLeafIterator
48 :
public ALU2dGridEntityPointer<cdim,GridImp>
51 static const int dim = GridImp::dimension;
52 static const int dimworld = GridImp::dimensionworld;
54 static const int codim = cdim;
66 typedef typename GridImp :: ALU2dGridLeafMarkerVectorType LeafMarkerVectorType;
69 template <
class ElementImp,
class MarkerVectorImp,
int codim>
73 static int level(
const ElementImp & elem,
const MarkerVectorImp& marker)
80 template <
class ElementImp,
class MarkerVectorImp>
81 struct GetLevel<ElementImp,MarkerVectorImp,2>
84 static int level(
const ElementImp & elem,
const MarkerVectorImp& marker)
86 return marker.levelOfVertex(elem.getIndex());
91 typedef typename GridImp :: GridObjectFactoryType
FactoryType;
94 typedef typename GridImp::template Codim<cdim>::Entity
Entity;
115 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
120 LeafMarkerVectorType & marker_;
131 template<PartitionIteratorType pitype,
class Gr
idImp>
136 static const int dim = GridImp::dimension;
137 static const int dimworld = GridImp::dimensionworld;
139 static const int codim = 1;
151 typedef typename GridImp :: ALU2dGridLeafMarkerVectorType LeafMarkerVectorType;
157 typedef typename GridImp::template Codim<1>::Entity
Entity;
185 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
191 LeafMarkerVectorType & marker_;
201 template<PartitionIteratorType pitype,
class Gr
idImp>
206 static const int dim = GridImp::dimension;
207 static const int dimworld = GridImp::dimensionworld;
208 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
209 static const int codim = 0;
225 typedef typename GridImp::template Codim<codim>::Entity
Entity;
246 HElementType * item_;
250 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
261 template<PartitionIteratorType pitype,
class Gr
idImp>
266 static const int dim = GridImp::dimension;
267 static const int dimworld = GridImp::dimensionworld;
268 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
269 static const int codim = 1;
285 typedef typename GridImp::template Codim<codim>::Entity
Entity;
310 HElementType * item_;
315 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
334 template<PartitionIteratorType pitype,
class Gr
idImp>
339 static const int dim = GridImp::dimension;
340 static const int dimworld = GridImp::dimensionworld;
341 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
342 static const int codim = 2;
358 typedef typename GridImp::template Codim<codim>::Entity
Entity;
387 HElementType * item_;
388 VertexType * vertex_;
391 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
410 template<
class Gr
idImp>
411 class ALU2dGridHierarchicIterator
412 :
public ALU2dGridEntityPointer<0,GridImp>
415 typedef ALU2dGridHierarchicIterator<GridImp> ThisType;
417 static const int dim = GridImp::dimension;
418 static const int dimworld = GridImp::dimensionworld;
419 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
420 static const int codim = 2;
422 typedef typename ALU2dImplTraits< dimworld, eltype >::HElementType HElementType ;
428 typedef typename GridImp::template Codim<0>::Entity
Entity;
430 typedef typename GridImp::ctype
ctype;
436 const HElementType & elem,
int maxlevel,
bool end=
false);
449 maxlevel_= org.maxlevel_;
450 endIter_ = org.endIter_;
457 HElementType * goNextElement (HElementType * oldEl);
460 const HElementType * elem_;
470 #include "iterator_imp.cc"
472 #endif // #ifndef DUNE_ALU2DGRID_ITERATOR_HH