3#ifndef DUNE_GEOGRID_INTERSECTIONITERATOR_HH
4#define DUNE_GEOGRID_INTERSECTIONITERATOR_HH
6#include <dune/grid/geometrygrid/intersection.hh>
17 template<
class Gr
id,
class HostIntersectionIterator >
18 class IntersectionIterator
20 typedef typename std::remove_const< Grid >::type::Traits Traits;
22 typedef GeoGrid::Intersection< Grid, typename HostIntersectionIterator::Intersection > IntersectionImpl;
24 typedef typename Traits::template Codim< 0 >::Geometry ElementGeometry;
25 typedef typename Traits::template Codim< 0 >::GeometryImpl ElementGeometryImpl;
30 IntersectionIterator()
33 template<
class Entity >
34 IntersectionIterator (
const Entity &inside,
35 const HostIntersectionIterator &hostIterator )
36 : hostIterator_( hostIterator )
37 , insideGeo_( Grid::getRealImplementation( inside.geometry() ) )
40 IntersectionIterator (
const IntersectionIterator &other )
41 : hostIterator_( other.hostIterator_ )
42 , insideGeo_( other.insideGeo_ )
45 IntersectionIterator ( IntersectionIterator&& other )
46 : hostIterator_(
std::move( other.hostIterator_ ) )
47 , insideGeo_(
std::move( other.insideGeo_ ) )
50 IntersectionIterator &operator= (
const IntersectionIterator &other )
52 hostIterator_ = other.hostIterator_;
53 insideGeo_ = other.insideGeo_;
57 IntersectionIterator &operator= ( IntersectionIterator&& other )
59 hostIterator_ = std::move( other.hostIterator_ );
60 insideGeo_ = std::move( other.insideGeo_ );
64 bool equals (
const IntersectionIterator &other )
const
66 return (hostIterator_ == other.hostIterator_);
74 Intersection dereference ()
const
76 return IntersectionImpl( *hostIterator_, insideGeo_ );
81 HostIntersectionIterator hostIterator_;
82 ElementGeometryImpl insideGeo_;
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: intersection.hh:162
constexpr auto equals(T1 &&t1, T2 &&t2)
Equality comparison.
Definition: hybridutilities.hh:435
Dune namespace.
Definition: alignedallocator.hh:10