3#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
4#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
6#include <dune/grid/common/entityiterator.hh>
8#include <dune/grid/albertagrid/entitypointer.hh>
26 template<
class Gr
idImp >
35 typedef typename GridImp::ctype ctype;
38 typedef typename EntityObject::ImplementationType EntityImp;
40 typedef typename Base::ElementInfo ElementInfo;
47 const ElementInfo &elementInfo,
68 void increment ( ElementInfo elementInfo );
78 template<
class Gr
idImp >
82 startLevel_( actLevel ),
87 template<
class Gr
idImp >
90 const ElementInfo &elementInfo,
93 startLevel_( elementInfo.level() ),
100 template<
class Gr
idImp >
104 startLevel_( other.startLevel_ ),
105 maxlevel_( other.maxlevel_ )
109 template<
class Gr
idImp >
113 Base::operator=( other );
115 startLevel_ = other.startLevel_;
116 maxlevel_ = other.maxlevel_;
121 template<
class Gr
idImp >
124 increment( entityImp().elementInfo() );
127 template<
class Gr
idImp >
131 assert( !elementInfo ==
false );
132 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() )
134 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() == 1) )
135 elementInfo = elementInfo.father();
136 if( elementInfo.level() > startLevel_ )
137 entityImp().setElement( elementInfo.father().child( 1 ), 0 );
139 entityImp().clearElement();
142 entityImp().setElement( elementInfo.child( 0 ), 0 );
EntityPointer implementation for AlbertaGrid.
Definition: entitypointer.hh:29
const GridImp & grid() const
obtain a reference to the grid
Definition: entitypointer.hh:170
EntityImp & entityImp()
obtain reference to internal entity implementation
Definition: entitypointer.hh:155
int level() const
ask for level of entities
Definition: entitypointer.hh:147
Definition: hierarchiciterator.hh:29
void increment()
increment
Definition: hierarchiciterator.hh:122
This & operator=(const This &other)
assignment operator
Definition: hierarchiciterator.hh:111
Dune namespace.
Definition: alignment.hh:10
Static tag representing a codimension.
Definition: dimension.hh:22