3 #ifndef DUNE_ALU2DGRID_ITERATOR_HH
4 #define DUNE_ALU2DGRID_ITERATOR_HH
19 template<
int cd,
int dim,
class Gr
idImp>
20 class ALU2dGridEntity;
21 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
22 class ALU2dGridLevelIterator;
23 template<
int cd,
class Gr
idImp >
24 class ALU2dGridEntityPointer;
25 template<
int mydim,
int coorddim,
class Gr
idImp>
26 class ALU2dGridGeometry;
27 template<
class Gr
idImp>
28 class ALU2dGridHierarchicIterator;
29 template<
class Gr
idImp>
30 class ALU2dGridIntersectionBase;
31 template<
class Gr
idImp>
32 class ALU2dGridLeafIntersectionIterator;
33 template<
class Gr
idImp>
34 class ALU2dGridLevelIntersectionIterator;
35 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
36 class ALU2dGridLeafIterator;
37 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
48 template<
int cdim, PartitionIteratorType pitype,
class Gr
idImp>
53 static const int dim = GridImp::dimension;
54 static const int dimworld = GridImp::dimensionworld;
56 static const int codim = cdim;
68 typedef typename GridImp :: ALU2dGridLeafMarkerVectorType LeafMarkerVectorType;
71 template <
class ElementImp,
class MarkerVectorImp,
int codim>
75 static int level(
const ElementImp & elem,
const MarkerVectorImp& marker)
82 template <
class ElementImp,
class MarkerVectorImp>
83 struct GetLevel<ElementImp,MarkerVectorImp,2>
86 static int level(
const ElementImp & elem,
const MarkerVectorImp& marker)
88 return marker.levelOfVertex(elem.getIndex());
93 typedef typename GridImp :: GridObjectFactoryType
FactoryType;
96 typedef typename GridImp::template Codim<cdim>::Entity
Entity;
117 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
122 LeafMarkerVectorType & marker_;
133 template<PartitionIteratorType pitype,
class Gr
idImp>
138 static const int dim = GridImp::dimension;
139 static const int dimworld = GridImp::dimensionworld;
141 static const int codim = 1;
153 typedef typename GridImp :: ALU2dGridLeafMarkerVectorType LeafMarkerVectorType;
159 typedef typename GridImp::template Codim<1>::Entity
Entity;
187 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
193 LeafMarkerVectorType & marker_;
203 template<PartitionIteratorType pitype,
class Gr
idImp>
204 class ALU2dGridLevelIterator<0, pitype, GridImp>
208 static const int dim = GridImp::dimension;
209 static const int dimworld = GridImp::dimensionworld;
210 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
211 static const int codim = 0;
227 typedef typename GridImp::template Codim<codim>::Entity
Entity;
230 ALU2dGridLevelIterator(
const FactoryType& factory,
int level,
bool end);
233 ALU2dGridLevelIterator(
const ThisType & org);
248 HElementType * item_;
252 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
263 template<PartitionIteratorType pitype,
class Gr
idImp>
264 class ALU2dGridLevelIterator<1, pitype, GridImp>
268 static const int dim = GridImp::dimension;
269 static const int dimworld = GridImp::dimensionworld;
270 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
271 static const int codim = 1;
287 typedef typename GridImp::template Codim<codim>::Entity
Entity;
290 ALU2dGridLevelIterator(
const FactoryType& factroy,
int level,
bool end);
293 ALU2dGridLevelIterator(
const ThisType & org);
295 ~ALU2dGridLevelIterator();
312 HElementType * item_;
317 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
336 template<PartitionIteratorType pitype,
class Gr
idImp>
337 class ALU2dGridLevelIterator<2, pitype, GridImp>
341 static const int dim = GridImp::dimension;
342 static const int dimworld = GridImp::dimensionworld;
343 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
344 static const int codim = 2;
360 typedef typename GridImp::template Codim<codim>::Entity
Entity;
363 ALU2dGridLevelIterator(
const FactoryType& factory,
int level,
bool end);
366 ALU2dGridLevelIterator(
const ThisType & org);
368 ~ALU2dGridLevelIterator();
389 HElementType * item_;
390 VertexType * vertex_;
393 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
412 template<
class Gr
idImp>
419 static const int dim = GridImp::dimension;
420 static const int dimworld = GridImp::dimensionworld;
421 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
422 static const int codim = 2;
430 typedef typename GridImp::template Codim<0>::Entity
Entity;
432 typedef typename GridImp::ctype
ctype;
438 const HElementType & elem,
int maxlevel,
bool end=
false);
451 maxlevel_= org.maxlevel_;
452 endIter_ = org.endIter_;
459 HElementType * goNextElement (HElementType * oldEl);
462 const HElementType * elem_;
472 #include "iterator_imp.cc"
474 #endif // #ifndef DUNE_ALU2DGRID_ITERATOR_HH