dune-grid 3.0-git
identitygridleafiterator.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_IDENTITYGRIDLEAFITERATOR_HH
4#define DUNE_IDENTITYGRIDLEAFITERATOR_HH
5
7
12namespace Dune {
13
14
18 template<int codim, PartitionIteratorType pitype, class GridImp>
20 public Dune::IdentityGridEntityPointer<codim,GridImp,typename GridImp::HostGridType::template Codim<codim>::template Partition<pitype>::LeafIterator>
21 {
22 private:
23
24 // LevelIterator to the equivalent entity in the host grid
25 typedef typename GridImp::HostGridType::template Codim<codim>::template Partition<pitype>::LeafIterator HostGridLeafIterator;
26
28
29 public:
30
32 explicit IdentityGridLeafIterator(const GridImp* identityGrid) :
33 Base(identityGrid, identityGrid->hostgrid_->leafGridView().template begin<codim,pitype>())
34 {}
35
40 explicit IdentityGridLeafIterator(const GridImp* identityGrid, bool endDummy) :
41 Base(identityGrid, identityGrid->hostgrid_->leafGridView().template end<codim,pitype>())
42 {}
43
44
46 void increment() {
47 ++this->hostEntityPointer_;
48 }
49
50 };
51
52
53} // namespace Dune
54
55#endif
The IdentityGridEntityPointer class.
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:878
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 identitygridleafiterator.hh:21
IdentityGridLeafIterator(const GridImp *identityGrid, bool endDummy)
Constructor which create the end iterator.
Definition identitygridleafiterator.hh:40
IdentityGridLeafIterator(const GridImp *identityGrid)
Definition identitygridleafiterator.hh:32
void increment()
prefix increment
Definition identitygridleafiterator.hh:46