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>
49 class ALU2dGridLeafIterator
50 :
public ALU2dGridEntityPointer<cdim,GridImp>
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>
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;
239 ThisType & operator = (
const ThisType & org);
248 HElementType * item_;
252 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
263 template<PartitionIteratorType pitype,
class Gr
idImp>
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;
301 ThisType & operator = (
const ThisType & org);
312 HElementType * item_;
317 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
336 template<PartitionIteratorType pitype,
class Gr
idImp>
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;
374 ThisType & operator = (
const ThisType & org);
389 HElementType * item_;
390 VertexType * vertex_;
393 typedef ALU2DSPACE Listwalkptr< ElementType > IteratorType;
412 template<
class Gr
idImp>
413 class ALU2dGridHierarchicIterator
414 :
public ALU2dGridEntityPointer<0,GridImp>
417 typedef ALU2dGridHierarchicIterator<GridImp> ThisType;
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;
424 typedef typename ALU2dImplTraits< dimworld, eltype >::HElementType HElementType ;
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
GridImp::template Codim< cdim >::Entity Entity
type of entity we iterate (interface)
Definition: alugrid/2d/iterator.hh:96
Definition: alugrid/2d/iterator.hh:204
void increment()
increment, go to next entity
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
Hierarchic Iterator of ALU2dGrid.
Definition: alugrid/2d/entity.hh:28
Dune::ALU2dImplTraits< dimworld, eltype >::template Codim< 1 >::InterfaceType ElementType
Definition: alugrid/2d/iterator.hh:160
GridImp::template Codim< codim >::Entity Entity
Definition: alugrid/2d/iterator.hh:227
Definition: alu2dinclude.hh:97
[ provides Dune::Grid ]
Definition: alugrid/2d/entity.hh:38
GridImp::template Codim< codim >::Entity Entity
Definition: alugrid/2d/iterator.hh:360
Definition: alugrid/2d/iterator.hh:134
int level() const
ask for level of entities
ALU2dGridLeafIterator(const FactoryType &factory, bool end)
Constructor called by LeafIterator.
Definition: alugrid/2d/entity.hh:210
Include standard header files.
Definition: agrid.hh:59
HmeshType::helement_t HElementType
Definition: alu2dinclude.hh:108
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/iterator.hh:225
Definition: alugrid/2d/entity.hh:22
GridImp::template Codim< codim >::Entity Entity
Definition: alugrid/2d/iterator.hh:287
ElementType
Definition: alu2dinclude.hh:55
ThisType & operator=(const ThisType &org)
assigment operator
Definition: alugrid/2d/iterator.hh:337
ALU2dGridEntity< 0, dim, GridImp > EntityImp
tpye of entity implementation
Definition: alugrid/2d/iterator.hh:434
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/iterator.hh:285
GridImp::ctype ctype
type of coordinates, i.e. double
Definition: alugrid/2d/iterator.hh:432
Definition: alugrid/2d/entity.hh:36
Dune::ALU2dImplTraits< dimworld, eltype >::template Codim< cdim >::InterfaceType ElementType
Definition: alugrid/2d/iterator.hh:97
Provides proxy classes for IntersectionsIterators.
Different resources needed by all grid implementations.
GridImp::template Codim< 1 >::Entity Entity
type of entity we iterate (interface)
Definition: alugrid/2d/iterator.hh:159
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/iterator.hh:358
ALU2dGridHierarchicIterator(const FactoryType &factory, const HElementType &elem, int maxlevel, bool end=false)
the normal Constructor
ThisType & operator=(const ALU2dGridHierarchicIterator< GridImp > &org)
the assignment operator
Definition: alugrid/2d/iterator.hh:447
Definition: alugrid/2d/entity.hh:20
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/iterator.hh:93
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/iterator.hh:156
GridImp::template Codim< 0 >::Entity Entity
type of entities we iterate
Definition: alugrid/2d/iterator.hh:430
Definition: alugrid/2d/iterator.hh:264
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/iterator.hh:427
Definition: alu2dinclude.hh:118
ThisType & operator=(const ThisType &org)
assigment of iterator
#define ALU2DSPACE
Definition: alu2dinclude.hh:34
void increment()
prefix increment