dune-grid 3.0-git
identitygridleveliterator.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_IDENTITYGRIDLEVELITERATOR_HH
4#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
5
7
12namespace Dune {
13
14
15
16
17 //**********************************************************************
18 //
19 // --IdentityGridLevelIterator
23 template<int codim, PartitionIteratorType pitype, class GridImp>
25 public Dune::IdentityGridEntityPointer<codim,GridImp,typename GridImp::HostGridType::Traits::template Codim<codim>::template Partition<pitype>::LevelIterator>
26 {
27
28 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::template Partition<pitype>::LevelIterator HostGridLevelIterator;
30
31 public:
32
34 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)
35 : Base(identityGrid, identityGrid->hostgrid_->levelGridView(level).template begin<codim,pitype>())
36 {}
37
38
44 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, bool endDummy)
45 : Base(identityGrid, identityGrid->hostgrid_->levelGridView(level).template end<codim,pitype>())
46 {}
47
48
50 void increment() {
51 ++this->hostEntityPointer_;
52 }
53
54 };
55
56
57} // namespace Dune
58
59#endif
The IdentityGridEntityPointer class.
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:861
Include standard header files.
Definition agrid.hh:60
Definition identitygridentitypointer.hh:19
Iterator over all entities of a given codimension and level of a grid.
Definition identitygridleveliterator.hh:26
void increment()
prefix increment
Definition identitygridleveliterator.hh:50
IdentityGridLevelIterator(const GridImp *identityGrid, int level)
Constructor.
Definition identitygridleveliterator.hh:34
IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool endDummy)
Constructor which create the end iterator.
Definition identitygridleveliterator.hh:44