dune-grid 2.9.0
yaspgridleveliterator.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH
6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH
7
12namespace Dune {
13
14
17 template<int codim, PartitionIteratorType pitype, class GridImp>
19 {
21 constexpr static int dim = GridImp::dimension;
23 constexpr static int dimworld = GridImp::dimensionworld;
24 typedef typename GridImp::ctype ctype;
25 public:
26 typedef typename GridImp::template Codim<codim>::Entity Entity;
27 typedef typename GridImp::YGridLevelIterator YGLI;
28 typedef typename GridImp::YGrid::Iterator I;
29
32 {}
33
35 YaspLevelIterator (const YGLI & g, const I& it)
36 : _entity(YaspEntity<codim, dim, GridImp>(g,it))
37 {}
38
40 void increment()
41 {
42 ++(_entity.impl()._it);
43 }
44
46 bool equals (const YaspLevelIterator& rhs) const
47 {
48 return (_entity == rhs._entity);
49 }
50
52 const Entity& dereference() const
53 {
54 return _entity;
55 }
56
57 protected:
59 };
60
61}
62
63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH
Include standard header files.
Definition: agrid.hh:60
Definition: yaspgridentity.hh:268
Iterates over entities of one grid level.
Definition: yaspgridleveliterator.hh:19
Entity _entity
entity
Definition: yaspgridleveliterator.hh:58
GridImp::YGridLevelIterator YGLI
Definition: yaspgridleveliterator.hh:27
GridImp::template Codim< codim >::Entity Entity
Definition: yaspgridleveliterator.hh:26
void increment()
increment
Definition: yaspgridleveliterator.hh:40
GridImp::YGrid::Iterator I
Definition: yaspgridleveliterator.hh:28
YaspLevelIterator(const YGLI &g, const I &it)
constructor
Definition: yaspgridleveliterator.hh:35
bool equals(const YaspLevelIterator &rhs) const
equality
Definition: yaspgridleveliterator.hh:46
YaspLevelIterator()
default constructor
Definition: yaspgridleveliterator.hh:31
const Entity & dereference() const
dereferencing
Definition: yaspgridleveliterator.hh:52