Dune Core Modules (2.6.0)

yaspgridleveliterator.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH
4#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH
5
10namespace Dune {
11
12
15 template<int codim, PartitionIteratorType pitype, class GridImp>
17 {
19 enum { dim=GridImp::dimension };
21 enum { dimworld=GridImp::dimensionworld };
22 typedef typename GridImp::ctype ctype;
23 public:
24 typedef typename GridImp::template Codim<codim>::Entity Entity;
25 typedef typename GridImp::YGridLevelIterator YGLI;
26 typedef typename GridImp::YGrid::Iterator I;
27
30 {}
31
33 YaspLevelIterator (const YGLI & g, const I& it)
34 : _entity(YaspEntity<codim, dim, GridImp>(g,it))
35 {}
36
39 _entity(i._entity) {}
40
42 void increment()
43 {
44 ++(GridImp::getRealImplementation(_entity)._it);
45 }
46
48 bool equals (const YaspLevelIterator& rhs) const
49 {
50 return (_entity == rhs._entity);
51 }
52
54 const Entity& dereference() const
55 {
56 return _entity;
57 }
58
59 protected:
60 Entity _entity;
61 };
62
63}
64
65#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH
Iterates over entities of one grid level.
Definition: yaspgridleveliterator.hh:17
Entity _entity
entity
Definition: yaspgridleveliterator.hh:60
void increment()
increment
Definition: yaspgridleveliterator.hh:42
YaspLevelIterator(const YaspLevelIterator &i)
copy constructor
Definition: yaspgridleveliterator.hh:38
YaspLevelIterator(const YGLI &g, const I &it)
constructor
Definition: yaspgridleveliterator.hh:33
bool equals(const YaspLevelIterator &rhs) const
equality
Definition: yaspgridleveliterator.hh:48
YaspLevelIterator()
default constructor
Definition: yaspgridleveliterator.hh:29
const Entity & dereference() const
dereferencing
Definition: yaspgridleveliterator.hh:54
Dune namespace.
Definition: alignedallocator.hh:10
Static tag representing a codimension.
Definition: dimension.hh:22
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 26, 23:30, 2024)