Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
GlobalIntersectionIterator< GridView, Impl > Class Template Reference

Base class for iterators on intersections of a grid view. More...

#include <dune/fufem/globalintersectioniterator.hh>

Inheritance diagram for GlobalIntersectionIterator< GridView, Impl >:
Inheritance graph

Public Types

enum  PositionFlag { begin , end }
 
typedef IntersectionIterator::Intersection Intersection
 The type of objects we are iterating over.
 

Public Member Functions

 GlobalIntersectionIterator (const GridView &gridView, PositionFlag flag)
 Create begin or end iterator for given grid view.
 
 GlobalIntersectionIterator (const GridView &gridView, const ElementIterator &eIt, const ElementIterator &endEIt)
 Create iterator for given grid view.
 
 GlobalIntersectionIterator (const GlobalIntersectionIterator &other)
 Copy constructor.
 
 ~GlobalIntersectionIterator ()
 
void increment ()
 Increment the pointer to the next intersection.
 
bool equals (const GlobalIntersectionIterator &other) const
 
const Intersectiondereference () const
 
const GlobalIntersectionIteratoroperator= (const GlobalIntersectionIterator &other)
 
bool containsInsideSubentity (int subEntity, int codim) const
 

Protected Member Functions

void updateIntersection (const Intersection &intersection)
 Update the stored intersection if we have to.
 
void initialIncrement ()
 Find first valid intersection.
 
const Impl & asImpl () const
 
Impl & asImpl ()
 

Protected Attributes

GridView gridView_
 
ElementIterator eIt_
 
ElementIterator endEIt_
 
IntersectionIterator * nIt_
 
Intersection intersection_
 The intersection corresponding to the actual global intersection iterator. It is only set if dereferencing the intersection iterator is returning a temporary.
 

Detailed Description

template<class GridView, class Impl>
class GlobalIntersectionIterator< GridView, Impl >

Base class for iterators on intersections of a grid view.

Template Parameters
GridViewThe grid view on which this boundary patch lives
ImplThe Implementation derived from this class (CRTP).

The derived class Impl has to provide two methods

bool skipElement(const Element& e) bool skipIntersection(const Intersection& e)

that specify which elements and intersections should be skipped. It must call intitialIncrement() in its constructor in order to find the first valid intersection.

Deprecated:
This class is deprecated and will be removed after 2.11. Use Dune::Fufem::IntersectionSetIterator instead.

Member Typedef Documentation

◆ Intersection

template<class GridView , class Impl >
typedef IntersectionIterator::Intersection GlobalIntersectionIterator< GridView, Impl >::Intersection

The type of objects we are iterating over.

Member Enumeration Documentation

◆ PositionFlag

template<class GridView , class Impl >
enum GlobalIntersectionIterator::PositionFlag
Enumerator
begin 
end 

Constructor & Destructor Documentation

◆ GlobalIntersectionIterator() [1/3]

template<class GridView , class Impl >
GlobalIntersectionIterator< GridView, Impl >::GlobalIntersectionIterator ( const GridView &  gridView,
PositionFlag  flag 
)
inline

Create begin or end iterator for given grid view.

The iterator does not necessarily point to a valid intersection after creation! In order to guarantee this you must call initialIncrement() from the constructor in the derived class. This can not be done here since it requires the skipXYZ() methods of the derived class that is not yet initialized.

Parameters
gridViewIterate over the intersections of this grid view
flagCreate begin or end iterator for PositionFlag = begin or end, respectively.

◆ GlobalIntersectionIterator() [2/3]

template<class GridView , class Impl >
GlobalIntersectionIterator< GridView, Impl >::GlobalIntersectionIterator ( const GridView &  gridView,
const ElementIterator &  eIt,
const ElementIterator &  endEIt 
)
inline

Create iterator for given grid view.

The iterator does not necessarily point to a valid intersection after creation! In order to guarantee this you must call initialIncrement() from the constructor in the derived class. This can not be done here since it requires the skipXYZ() methods of the derived class that is not yet initialized.

Parameters
gridViewIterate over the intersections of this grid view
eItElement iterator to the first element to consider
endEItElement iterator after the last element to consider

◆ GlobalIntersectionIterator() [3/3]

template<class GridView , class Impl >
GlobalIntersectionIterator< GridView, Impl >::GlobalIntersectionIterator ( const GlobalIntersectionIterator< GridView, Impl > &  other)
inline

Copy constructor.

Parameters
otherCopy from this iterator

◆ ~GlobalIntersectionIterator()

template<class GridView , class Impl >
GlobalIntersectionIterator< GridView, Impl >::~GlobalIntersectionIterator ( )
inline

Member Function Documentation

◆ asImpl() [1/2]

template<class GridView , class Impl >
Impl & GlobalIntersectionIterator< GridView, Impl >::asImpl ( )
inlineprotected

◆ asImpl() [2/2]

template<class GridView , class Impl >
const Impl & GlobalIntersectionIterator< GridView, Impl >::asImpl ( ) const
inlineprotected

◆ containsInsideSubentity()

template<class GridView , class Impl >
bool GlobalIntersectionIterator< GridView, Impl >::containsInsideSubentity ( int  subEntity,
int  codim 
) const
inline

◆ dereference()

template<class GridView , class Impl >
const Intersection & GlobalIntersectionIterator< GridView, Impl >::dereference ( ) const
inline

◆ equals()

template<class GridView , class Impl >
bool GlobalIntersectionIterator< GridView, Impl >::equals ( const GlobalIntersectionIterator< GridView, Impl > &  other) const
inline

◆ increment()

template<class GridView , class Impl >
void GlobalIntersectionIterator< GridView, Impl >::increment ( )
inline

Increment the pointer to the next intersection.

◆ initialIncrement()

template<class GridView , class Impl >
void GlobalIntersectionIterator< GridView, Impl >::initialIncrement ( )
inlineprotected

Find first valid intersection.

Checks if current intersection is valid and iterates to the first valid intersection if not. You must call this method in the constructor of the derived class!

◆ operator=()

template<class GridView , class Impl >
const GlobalIntersectionIterator & GlobalIntersectionIterator< GridView, Impl >::operator= ( const GlobalIntersectionIterator< GridView, Impl > &  other)
inline

◆ updateIntersection()

template<class GridView , class Impl >
void GlobalIntersectionIterator< GridView, Impl >::updateIntersection ( const Intersection intersection)
inlineprotected

Update the stored intersection if we have to.

Member Data Documentation

◆ eIt_

template<class GridView , class Impl >
ElementIterator GlobalIntersectionIterator< GridView, Impl >::eIt_
protected

◆ endEIt_

template<class GridView , class Impl >
ElementIterator GlobalIntersectionIterator< GridView, Impl >::endEIt_
protected

◆ gridView_

template<class GridView , class Impl >
GridView GlobalIntersectionIterator< GridView, Impl >::gridView_
protected

◆ intersection_

template<class GridView , class Impl >
Intersection GlobalIntersectionIterator< GridView, Impl >::intersection_
protected

The intersection corresponding to the actual global intersection iterator. It is only set if dereferencing the intersection iterator is returning a temporary.

◆ nIt_

template<class GridView , class Impl >
IntersectionIterator* GlobalIntersectionIterator< GridView, Impl >::nIt_
protected

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