DUNE PDELab (2.8)

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
38 void increment()
39 {
40 ++(_entity.impl()._it);
41 }
42
44 bool equals (const YaspLevelIterator& rhs) const
45 {
46 return (_entity == rhs._entity);
47 }
48
50 const Entity& dereference() const
51 {
52 return _entity;
53 }
54
55 protected:
56 Entity _entity;
57 };
58
59}
60
61#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH
Iterates over entities of one grid level.
Definition: yaspgridleveliterator.hh:17
Entity _entity
entity
Definition: yaspgridleveliterator.hh:56
void increment()
increment
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:44
YaspLevelIterator()
default constructor
Definition: yaspgridleveliterator.hh:29
const Entity & dereference() const
dereferencing
Definition: yaspgridleveliterator.hh:50
Dune namespace.
Definition: alignedallocator.hh:11
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 21, 23:30, 2024)