3 #ifndef DUNE_GEOGRID_INTERSECTIONITERATOR_HH
4 #define DUNE_GEOGRID_INTERSECTIONITERATOR_HH
18 template<
class Gr
id,
class HostIntersectionIterator >
19 class IntersectionIterator
21 typedef typename remove_const< Grid >::type::Traits Traits;
23 typedef GeoGrid::Intersection< Grid, typename HostIntersectionIterator::Intersection > IntersectionImpl;
25 typedef typename Traits::template Codim< 0 >::EntityPointerImpl EntityPointerImpl;
26 typedef typename Traits::template Codim< 0 >::Geometry ElementGeometry;
31 typedef typename Traits::template Codim< 0 >::EntityPointer
EntityPointer;
33 template<
class Entity >
35 const HostIntersectionIterator &hostIterator )
36 : hostIterator_( hostIterator ),
41 : hostIterator_( other.hostIterator_ ),
47 hostIterator_ = other.hostIterator_;
48 Grid::getRealImplementation( intersection_ ) = Grid::getRealImplementation( other.intersection_ );
54 return (hostIterator_ == other.hostIterator_);
65 if( !intersectionImpl() )
66 intersectionImpl().
initialize( *hostIterator_ );
71 IntersectionImpl &intersectionImpl ()
const
73 return Grid::getRealImplementation( intersection_ );
76 HostIntersectionIterator hostIterator_;
84 #endif // #ifndef DUNE_GEOGRID_INTERSECTIONITERATOR_HH
IntersectionIterator(const Entity &inside, const HostIntersectionIterator &hostIterator)
Definition: geometrygrid/intersectioniterator.hh:34
void initialize(const HostIntersection &hostIntersection)
Definition: geometrygrid/intersection.hh:186
IntersectionIterator(const IntersectionIterator &other)
Definition: geometrygrid/intersectioniterator.hh:40
DUNE-conform implementation of the entityThis class merely changes the template parameters of the ent...
Definition: geometrygrid/entity.hh:49
Traits::template Codim< 0 >::EntityPointer EntityPointer
Definition: geometrygrid/intersectioniterator.hh:31
Definition: geometrygrid/intersection.hh:20
Grid abstract base classThis class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
Definition: common/grid.hh:386
bool equals(const IntersectionIterator &other) const
Definition: geometrygrid/intersectioniterator.hh:52
IntersectionIterator & operator=(const IntersectionIterator &other)
Definition: geometrygrid/intersectioniterator.hh:45
const Intersection & dereference() const
Definition: geometrygrid/intersectioniterator.hh:63
Dune::Intersection< Grid, IntersectionImpl > Intersection
Definition: geometrygrid/intersectioniterator.hh:29
void invalidate()
Definition: geometrygrid/intersection.hh:180
void increment()
Definition: geometrygrid/intersectioniterator.hh:57
Definition: geometrygrid/entity.hh:60