5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
27 template<
class Gr
idImp >
33 typedef typename GridImp::template Codim<0>::Entity
Entity;
34 typedef typename GridImp::ctype
ctype;
64 return entity_.impl().equals( other.entity_.impl() );
76 return entity_.impl().level();
81 const GridImp &
grid ()
const
83 return entity_.impl().grid();
99 template<
class Gr
idImp >
103 startLevel_( actLevel ),
104 maxlevel_( maxLevel )
108 template<
class Gr
idImp >
114 startLevel_( elementInfo.level() ),
115 maxlevel_( maxLevel )
121 template<
class Gr
idImp >
124 : entity_( other.entity_ ),
125 startLevel_( other.startLevel_ ),
126 maxlevel_( other.maxlevel_ )
130 template<
class Gr
idImp >
134 entity_ = other.entity_;
135 startLevel_ = other.startLevel_;
136 maxlevel_ = other.maxlevel_;
141 template<
class Gr
idImp >
144 increment( entity_.impl().elementInfo() );
147 template<
class Gr
idImp >
151 assert( !elementInfo ==
false );
152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() )
154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() == 1) )
155 elementInfo = elementInfo.father();
156 if( elementInfo.level() > startLevel_ )
157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 );
159 entity_.impl().clearElement();
162 entity_.impl().setElement( elementInfo.child( 0 ), 0 );
provides a wrapper for ALBERTA's el_info structure
Include standard header files.
Definition: agrid.hh:60
Definition: hierarchiciterator.hh:29
Entity & dereference() const
dereferencing
Definition: hierarchiciterator.hh:68
GridImp::template Codim< 0 >::Entity Entity
Definition: hierarchiciterator.hh:33
const GridImp & grid() const
obtain a reference to the grid
Definition: hierarchiciterator.hh:81
EntityImp::ElementInfo ElementInfo
Definition: hierarchiciterator.hh:39
int level() const
ask for level of entities
Definition: hierarchiciterator.hh:74
AlbertaGridHierarchicIterator()
Definition: hierarchiciterator.hh:41
void increment()
increment
Definition: hierarchiciterator.hh:142
GridImp::ctype ctype
Definition: hierarchiciterator.hh:34
EntityObject::ImplementationType EntityImp
Definition: hierarchiciterator.hh:37
bool equals(const This &other) const
equality
Definition: hierarchiciterator.hh:62
This & operator=(const This &other)
assignment operator
Definition: hierarchiciterator.hh:132
MakeableInterfaceObject< Entity > EntityObject
Definition: hierarchiciterator.hh:36
Wrapper class for entities.
Definition: common/entity.hh:66
InterfaceType::Implementation ImplementationType
Definition: common/grid.hh:1108