dune-multidomaingrid 2.8
Loading...
Searching...
No Matches
intersectioniterator.hh
Go to the documentation of this file.
1#ifndef DUNE_MULTIDOMAINGRID_INTERSECTIONITERATOR_HH
2#define DUNE_MULTIDOMAINGRID_INTERSECTIONITERATOR_HH
3
4#include <dune/grid/common/intersectioniterator.hh>
5
7
9#include "intersection.hh"
10
11namespace Dune {
12
13namespace mdgrid {
14
15template<typename GridImp, typename HostIntersectionIterator_>
17
18 template<class, class, class>
19 friend class Dune::IntersectionIterator;
20
21 template<class, class>
22 friend class Dune::Intersection;
23
24 template<typename,typename,typename>
26
27 template<typename>
28 friend class LevelGridView;
29
30 template<typename>
31 friend class LeafGridView;
32
33 using HostIntersectionIterator = HostIntersectionIterator_;
34 using HostIntersection = typename HostIntersectionIterator::Intersection;
36 using Intersection = Dune::Intersection<GridImp,IntersectionWrapper>;
37
38protected:
39
41
42 explicit IntersectionIteratorWrapper(const HostIntersectionIterator& hostIterator)
43 : _hostIterator(hostIterator)
44 {}
45
46 explicit IntersectionIteratorWrapper(HostIntersectionIterator&& hostIterator)
47 : _hostIterator(std::move(hostIterator))
48 {}
49
50private:
51
52 const HostIntersectionIterator& hostIntersectionIterator() const {
53 return _hostIterator;
54 }
55
56 bool equals(const IntersectionIteratorWrapper& rhs) const {
57 return _hostIterator == rhs._hostIterator;
58 }
59
60 void increment() {
61 ++_hostIterator;
62 }
63
64 Intersection dereference() const {
65 return {IntersectionWrapper(*_hostIterator)};
66 }
67
68 HostIntersectionIterator _hostIterator;
69
70};
71
72} // namespace mdgrid
73
74} // namespace Dune
75
76#endif // DUNE_MULTIDOMAINGRID_INTERSECTIONITERATOR_HH
Definition: multidomaingrid.hh:8
Definition: intersectioniterator.hh:16
friend class subdomain::IntersectionIteratorWrapper
Definition: intersectioniterator.hh:25
IntersectionIteratorWrapper(HostIntersectionIterator &&hostIterator)
Definition: intersectioniterator.hh:46
IntersectionIteratorWrapper(const HostIntersectionIterator &hostIterator)
Definition: intersectioniterator.hh:42
Definition: gridview.hh:17
Definition: gridview.hh:63
Definition: intersection.hh:18
Definition: subdomaingrid/intersectioniterator.hh:19