5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH
6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
19 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
23 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::template Partition<pitype>::LevelIterator HostGridLevelIterator;
29 typedef typename GridImp::template Codim<codim>::Entity
Entity;
33 : identityGrid_(identityGrid),
34 hostLevelIterator_(identityGrid->hostgrid_->
levelGridView(level).template begin<codim,pitype>())
44 : identityGrid_(identityGrid),
45 hostLevelIterator_(identityGrid->hostgrid_->
levelGridView(level).template end<codim,pitype>())
56 return Entity{{identityGrid_,*hostLevelIterator_}};
61 return hostLevelIterator_ == i.hostLevelIterator_;
65 const GridImp* identityGrid_;
67 HostGridLevelIterator hostLevelIterator_;
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:802
Include standard header files.
Definition: agrid.hh:60
Iterator over all entities of a given codimension and level of a grid.
Definition: identitygridleveliterator.hh:21
void increment()
prefix increment
Definition: identitygridleveliterator.hh:50
GridImp::template Codim< codim >::Entity Entity
Definition: identitygridleveliterator.hh:29
IdentityGridLevelIterator(const GridImp *identityGrid, int level)
Constructor.
Definition: identitygridleveliterator.hh:32
IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool endDummy)
Constructor which create the end iterator.
Definition: identitygridleveliterator.hh:43
static constexpr int codimension
Definition: identitygridleveliterator.hh:27
bool equals(const IdentityGridLevelIterator &i) const
equality
Definition: identitygridleveliterator.hh:60
Entity dereference() const
dereferencing
Definition: identitygridleveliterator.hh:55