Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
HierarchicFaceIterator< GridType > Class Template Reference

A hierarchical iterator for faces. More...

#include <dune/fufem/facehierarchy.hh>

Inheritance diagram for HierarchicFaceIterator< GridType >:
Inheritance graph

Classes

struct  ChildFaceIterator
 

Public Types

enum  PositionFlag { begin , end }
 
using FaceType = Face< GridType >
 Face type that can be stored independently of the iterator.
 
typedef std::forward_iterator_tag iterator_category
 
typedef typename std::remove_const< V >::type value_type
 
typedef D difference_type
 
typedef V * pointer
 
typedef R reference
 
typedef T DerivedType
 
typedef V Value
 
typedef V * Pointer
 
typedef D DifferenceType
 
typedef R Reference
 

Public Member Functions

 HierarchicFaceIterator (const GridType &grid, const FaceType &fatherFace, const int maxLevel, PositionFlag flag)
 
void increment ()
 Increment the iterator.
 
bool equals (const HierarchicFaceIterator &other) const
 Compare to other iterator.
 
const FaceTypedereference () const
 Dereference the iterator.
 
const Element element () const
 Get element of current face.
 
int index () const
 Get index of current face within element.
 
constexpr Reference operator* () const
 
constexpr Pointer operator-> () const
 
constexpr DerivedTypeoperator++ ()
 
constexpr DerivedType operator++ (int)
 

Protected Member Functions

void incrementFrom (const Element &e)
 
bool findChildInBack ()
 

Protected Attributes

const GridType & grid_
 
int maxLevel_
 
const FaceTypefatherFace_
 
FaceType face_
 
std::vector< ChildFaceIteratorstack_
 

Detailed Description

template<class GridType>
class HierarchicFaceIterator< GridType >

A hierarchical iterator for faces.

Starting from a start face the iterator performs a depth-first search for elements e containing a subface in the hierarchic element tree.

Subfaces are computed using the (semi-)topological information provided by geometryInFather() and the subentity embedding of the reference elements. Thus you can also use the iterator for grids with parametrized boundaries.

If an element contains no subface the subtree of its descendents is skipped. Hence the overall complexity for iterating over all subfaces is O(r n ) where 'r' is the maximal number of children obtained by refining an element and 'n' is the number of subfaces.

The memory requirement is O(maxLevel-level(start face)).

Member Typedef Documentation

◆ FaceType

template<class GridType >
using HierarchicFaceIterator< GridType >::FaceType = Face<GridType>

Face type that can be stored independently of the iterator.

Member Enumeration Documentation

◆ PositionFlag

template<class GridType >
enum HierarchicFaceIterator::PositionFlag
Enumerator
begin 
end 

Constructor & Destructor Documentation

◆ HierarchicFaceIterator()

template<class GridType >
HierarchicFaceIterator< GridType >::HierarchicFaceIterator ( const GridType &  grid,
const FaceType fatherFace,
const int  maxLevel,
PositionFlag  flag 
)
inline

Member Function Documentation

◆ dereference()

template<class GridType >
const FaceType & HierarchicFaceIterator< GridType >::dereference ( ) const
inline

Dereference the iterator.

◆ element()

template<class GridType >
const Element HierarchicFaceIterator< GridType >::element ( ) const
inline

Get element of current face.

◆ equals()

template<class GridType >
bool HierarchicFaceIterator< GridType >::equals ( const HierarchicFaceIterator< GridType > &  other) const
inline

Compare to other iterator.

Only end iterators will compare equal.

◆ findChildInBack()

template<class GridType >
bool HierarchicFaceIterator< GridType >::findChildInBack ( )
inlineprotected

◆ increment()

template<class GridType >
void HierarchicFaceIterator< GridType >::increment ( )
inline

Increment the iterator.

◆ incrementFrom()

template<class GridType >
void HierarchicFaceIterator< GridType >::incrementFrom ( const Element &  e)
inlineprotected

◆ index()

template<class GridType >
int HierarchicFaceIterator< GridType >::index ( ) const
inline

Get index of current face within element.

Member Data Documentation

◆ face_

template<class GridType >
FaceType HierarchicFaceIterator< GridType >::face_
protected

◆ fatherFace_

template<class GridType >
const FaceType& HierarchicFaceIterator< GridType >::fatherFace_
protected

◆ grid_

template<class GridType >
const GridType& HierarchicFaceIterator< GridType >::grid_
protected

◆ maxLevel_

template<class GridType >
int HierarchicFaceIterator< GridType >::maxLevel_
protected

◆ stack_

template<class GridType >
std::vector<ChildFaceIterator> HierarchicFaceIterator< GridType >::stack_
protected

The documentation for this class was generated from the following file: