DUNE-FEM (unstable)

intersectioniterator.hh
1#ifndef DUNE_FEM_GRIDPART_IDGRIDPART_INTERSECTIONITERATOR_HH
2#define DUNE_FEM_GRIDPART_IDGRIDPART_INTERSECTIONITERATOR_HH
3
4#include <type_traits>
5#include <utility>
6
7#include <dune/grid/common/intersectioniterator.hh>
8
9#include <dune/fem/gridpart/idgridpart/intersection.hh>
10
11namespace Dune
12{
13
14 namespace Fem
15 {
16
17 // IdIntersectionIterator
18 // ----------------------
19
20 template< class GridFamily >
21 class IdIntersectionIterator
22 {
23 typedef IdIntersectionIterator< GridFamily > ThisType;
24
25 typedef typename std::remove_const< GridFamily >::type::Traits Traits;
26
27 typedef typename Traits::HostGridPartType::IntersectionIteratorType HostIntersectionIteratorType;
28
29 typedef IdIntersection< const GridFamily > IntersectionImplType;
30
31 public:
33 typedef typename Traits::ExtraData ExtraData;
34
35 IdIntersectionIterator () = default;
36
37 IdIntersectionIterator ( ExtraData data, HostIntersectionIteratorType hostIterator )
38 : data_( std::move( data ) ),
39 hostIterator_( std::move( hostIterator ) )
40 {}
41
42 bool equals ( const ThisType &other ) const
43 {
44 return hostIterator_ == other.hostIterator_;
45 }
46
47 void increment ()
48 {
49 ++hostIterator_;
50 }
51
52 Intersection dereference () const
53 {
54 return IntersectionImplType( data(), *hostIterator_ );
55 }
56
57 const ExtraData &data () const { return data_; }
58
59 protected:
60 ExtraData data_;
61 HostIntersectionIteratorType hostIterator_;
62 };
63
64 } // namespace Fem
65
66} // namespace Dune
67
68#endif // #ifndef DUNE_FEM_GRIDPART_IDGRIDPART_INTERSECTIONITERATOR_HH
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: intersection.hh:164
constexpr auto equals
Function object for performing equality comparison.
Definition: hybridutilities.hh:572
Dune namespace.
Definition: alignedallocator.hh:13
STL namespace.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 27, 22:29, 2024)