3 #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
4 #define DUNE_ALBERTA_HIERARCHICITERATOR_HH
25 template<
class Gr
idImp >
31 typedef typename GridImp::template Codim<0>::Entity
Entity;
32 typedef typename GridImp::ctype
ctype;
62 return entity_.impl().equals( other.entity_.impl() );
74 return entity_.impl().level();
79 const GridImp &
grid ()
const
81 return entity_.impl().grid();
97 template<
class Gr
idImp >
101 startLevel_( actLevel ),
102 maxlevel_( maxLevel )
106 template<
class Gr
idImp >
112 startLevel_( elementInfo.level() ),
113 maxlevel_( maxLevel )
115 increment( elementInfo );
119 template<
class Gr
idImp >
122 : entity_( other.entity_ ),
123 startLevel_( other.startLevel_ ),
124 maxlevel_( other.maxlevel_ )
128 template<
class Gr
idImp >
132 entity_ = other.entity_;
133 startLevel_ = other.startLevel_;
134 maxlevel_ = other.maxlevel_;
139 template<
class Gr
idImp >
142 increment( entity_.impl().elementInfo() );
145 template<
class Gr
idImp >
149 assert( !elementInfo ==
false );
150 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() )
152 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() == 1) )
153 elementInfo = elementInfo.father();
154 if( elementInfo.level() > startLevel_ )
155 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 );
157 entity_.impl().clearElement();
160 entity_.impl().setElement( elementInfo.child( 0 ), 0 );
provides a wrapper for ALBERTA's el_info structure
Include standard header files.
Definition: agrid.hh:58
Definition: hierarchiciterator.hh:27
GridImp::template Codim< 0 >::Entity Entity
Definition: hierarchiciterator.hh:31
const GridImp & grid() const
obtain a reference to the grid
Definition: hierarchiciterator.hh:79
EntityImp::ElementInfo ElementInfo
Definition: hierarchiciterator.hh:37
int level() const
ask for level of entities
Definition: hierarchiciterator.hh:72
AlbertaGridHierarchicIterator()
Definition: hierarchiciterator.hh:39
void increment()
increment
Definition: hierarchiciterator.hh:140
GridImp::ctype ctype
Definition: hierarchiciterator.hh:32
EntityObject::ImplementationType EntityImp
Definition: hierarchiciterator.hh:35
bool equals(const This &other) const
equality
Definition: hierarchiciterator.hh:60
This & operator=(const This &other)
assignment operator
Definition: hierarchiciterator.hh:130
MakeableInterfaceObject< Entity > EntityObject
Definition: hierarchiciterator.hh:34
Entity & dereference() const
dereferencing
Definition: hierarchiciterator.hh:66
Wrapper class for entities.
Definition: common/entity.hh:64
InterfaceType::Implementation ImplementationType
Definition: common/grid.hh:1093