1 #ifndef DUNE_GEOGRID_INTERSECTIONITERATOR_HH
2 #define DUNE_GEOGRID_INTERSECTIONITERATOR_HH
19 template<
class Gr
id >
20 class LeafIntersectionIterator;
22 template<
class Gr
id >
23 class LevelIntersectionIterator;
30 template<
class Traits >
33 typedef typename Traits::HostIntersectionIterator HostIntersectionIterator;
35 typedef typename Traits::GridTraits GridTraits;
41 typedef typename GridTraits::template Codim< 0 >::EntityPointer
EntityPointer;
44 typedef typename Traits::IntersectionImpl IntersectionImpl;
46 typedef typename GridTraits::template Codim< 0 >::EntityPointerImpl EntityPointerImpl;
47 typedef typename GridTraits::template Codim< 0 >::Geometry ElementGeometry;
50 template<
class Entity >
52 const HostIntersectionIterator &hostIterator )
53 : hostIterator_( hostIterator ),
54 intersection_( IntersectionImpl( inside.geometry() ) )
58 : hostIterator_( other.hostIterator_ ),
59 intersection_( IntersectionImpl(
Grid::getRealImplementation( other.intersection_ ) ) )
64 hostIterator_ = other.hostIterator_;
65 Grid::getRealImplementation( intersection_ ) = Grid::getRealImplementation( other.intersection_ );
71 return (hostIterator_ == other.hostIterator_);
77 intersectionImpl().invalidate();
82 if( !intersectionImpl() )
83 intersectionImpl().initialize( *hostIterator_ );
88 IntersectionImpl &intersectionImpl ()
const
90 return Grid::getRealImplementation( intersection_ );
93 HostIntersectionIterator hostIterator_;
102 template<
class Gr
id >
105 typedef typename remove_const< Grid >::type::Traits
GridTraits;
110 typedef typename GridTraits::HostGrid::Traits::LeafIntersectionIterator
119 template<
class Gr
id >
132 template<
class Entity >
134 const HostIntersectionIterator &hostIterator )
135 :
Base( inside, hostIterator )
144 template<
class Gr
id >
147 typedef typename remove_const< Grid >::type::Traits
GridTraits;
152 typedef typename GridTraits::HostGrid::Traits::LevelIntersectionIterator
161 template<
class Gr
id >
174 template<
class Entity >
176 const HostIntersectionIterator &hostIterator )
177 :
Base( inside, hostIterator )
185 #endif // #ifndef DUNE_GEOGRID_INTERSECTIONITERATOR_HH