Dune Core Modules (2.6.0)

identitygridintersectioniterator.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
4#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
5
8
9#include <dune/grid/common/intersection.hh>
10
15namespace Dune {
16
25 template<class GridImp>
27 {
28
29 enum {dim=GridImp::dimension};
30
31 enum {dimworld=GridImp::dimensionworld};
32
33 // The type used to store coordinates
34 typedef typename GridImp::ctype ctype;
35
36 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator HostLeafIntersectionIterator;
37
38 public:
39
41
43 {}
44
45 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,
46 const HostLeafIntersectionIterator& hostIterator)
47 : identityGrid_(identityGrid)
48 , hostIterator_(hostIterator)
49 {}
50
53 return hostIterator_ == other.hostIterator_;
54 }
55
56
58 void increment() {
59 ++hostIterator_;
60 }
61
64 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
65 }
66
67 private:
68 //**********************************************************
69 // private data
70 //**********************************************************
71
72 const GridImp* identityGrid_;
73 HostLeafIntersectionIterator hostIterator_;
74 };
75
76
77
78
80 template<class GridImp>
82 {
83 enum {dim=GridImp::dimension};
84
85 enum {dimworld=GridImp::dimensionworld};
86
87 // The type used to store coordinates
88 typedef typename GridImp::ctype ctype;
89
90 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator HostLevelIntersectionIterator;
91
92 public:
93
95
97 {}
98
99 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,
100 const HostLevelIntersectionIterator& hostIterator)
101 : identityGrid_(identityGrid)
102 , hostIterator_(hostIterator)
103 {}
104
107 return hostIterator_ == other.hostIterator_;
108 }
109
110
112 void increment() {
113 ++hostIterator_;
114 }
115
118 return IdentityGridLevelIntersection<GridImp>(identityGrid_,*hostIterator_);
119 }
120
121 private:
122
123
124 const GridImp* identityGrid_;
125 HostLevelIntersectionIterator hostIterator_;
126
127 };
128
129
130} // namespace Dune
131
132#endif
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition: identitygridintersectioniterator.hh:27
bool equals(const IdentityGridLeafIntersectionIterator &other) const
equality
Definition: identitygridintersectioniterator.hh:52
void increment()
prefix increment
Definition: identitygridintersectioniterator.hh:58
Intersection dereference() const
dereferencing
Definition: identitygridintersectioniterator.hh:63
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition: identitygridintersections.hh:31
Definition: identitygridintersectioniterator.hh:82
bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other) const
equality
Definition: identitygridintersectioniterator.hh:106
void increment()
prefix increment
Definition: identitygridintersectioniterator.hh:112
Intersection dereference() const
dereferencing
Definition: identitygridintersectioniterator.hh:117
Definition: identitygridintersections.hh:190
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: intersection.hh:162
The IdentityGridEntity class.
The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
Dune namespace.
Definition: alignedallocator.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)