5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH
19 template<
class Gr
id >
31 template<
class Gr
idImp>
39 constexpr static int dim = GridImp::dimension;
41 constexpr static int dimworld = GridImp::dimensionworld;
44 typedef typename GridImp::ctype ctype;
46 typedef typename GridImp::HostGridType::LeafGridView::Intersection HostLeafIntersection;
59 const HostLeafIntersection& hostIntersection)
60 : identityGrid_(identityGrid)
61 , hostIntersection_(hostIntersection)
65 HostLeafIntersection&& hostIntersection)
66 : identityGrid_(identityGrid)
67 , hostIntersection_(
std::move(hostIntersection))
72 return hostIntersection_ == other.hostIntersection_;
91 return hostIntersection_.boundary();
100 return hostIntersection_.centerUnitOuterNormal();
105 return hostIntersection_.neighbor();
110 return hostIntersection_.boundarySegmentIndex();
115 return hostIntersection_.conforming();
120 return hostIntersection_.type();
130 return LocalGeometry( hostIntersection_.geometryInInside() );
137 return LocalGeometry( hostIntersection_.geometryInOutside() );
144 return Geometry( hostIntersection_.geometry() );
150 return hostIntersection_.indexInInside();
156 return hostIntersection_.indexInOutside();
161 FieldVector<ctype, GridImp::dimensionworld>
outerNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
162 return hostIntersection_.outerNormal(local);
166 FieldVector<ctype, GridImp::dimensionworld>
integrationOuterNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
167 return hostIntersection_.integrationOuterNormal(local);
171 FieldVector<ctype, GridImp::dimensionworld>
unitOuterNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
172 return hostIntersection_.unitOuterNormal(local);
181 const GridImp* identityGrid_;
183 HostLeafIntersection hostIntersection_;
190 template<
class Gr
idImp>
198 constexpr static int dim = GridImp::dimension;
200 constexpr static int dimworld = GridImp::dimensionworld;
203 typedef typename GridImp::ctype ctype;
205 typedef typename GridImp::HostGridType::LevelGridView::Intersection HostLevelIntersection;
218 const HostLevelIntersection& hostIntersection)
219 : identityGrid_(identityGrid)
220 , hostIntersection_(hostIntersection)
224 HostLevelIntersection&& hostIntersection)
225 : identityGrid_(identityGrid)
226 , hostIntersection_(
std::move(hostIntersection))
231 return hostIntersection_ == other.hostIntersection_;
251 return hostIntersection_.boundary();
260 return hostIntersection_.centerUnitOuterNormal();
265 return hostIntersection_.neighbor();
270 return hostIntersection_.boundarySegmentIndex();
275 return hostIntersection_.conforming();
280 return hostIntersection_.type();
290 return LocalGeometry( hostIntersection_.geometryInInside() );
297 return LocalGeometry( hostIntersection_.geometryInOutside() );
304 return Geometry( hostIntersection_.geometry() );
310 return hostIntersection_.indexInInside();
316 return hostIntersection_.indexInOutside();
321 FieldVector<ctype, dimworld>
outerNormal (
const FieldVector<ctype, dim-1>& local)
const {
322 return hostIntersection_.outerNormal(local);
327 return hostIntersection_.integrationOuterNormal(local);
331 FieldVector<ctype, dimworld>
unitOuterNormal (
const FieldVector<ctype, dim-1>& local)
const {
332 return hostIntersection_.unitOuterNormal(local);
337 const GridImp* identityGrid_;
339 HostLevelIntersection hostIntersection_;
The IdentityGridLeafIterator class.
The IdentityGridEntity class.
Include standard header files.
Definition: agrid.hh:60
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
provides access to host grid objects from GeometryGrid
Definition: identitygrid.hh:37
Definition: identitygridintersectioniterator.hh:84
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition: identitygridintersectioniterator.hh:29
Specialization for codim-0-entities.
Definition: identitygridentity.hh:205
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition: identitygridintersections.hh:33
Entity inside() const
Definition: identitygridintersections.hh:77
IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection &&hostIntersection)
Definition: identitygridintersections.hh:64
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: identitygridintersections.hh:99
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition: identitygridintersections.hh:51
Geometry geometry() const
Definition: identitygridintersections.hh:142
Entity outside() const
Definition: identitygridintersections.hh:84
LocalGeometry geometryInOutside() const
Definition: identitygridintersections.hh:135
bool boundary() const
return true if intersection is with boundary.
Definition: identitygridintersections.hh:90
GeometryType type() const
Geometry type of an intersection.
Definition: identitygridintersections.hh:119
FieldVector< ctype, dimworld > NormalVector
Definition: identitygridintersections.hh:53
LocalGeometry geometryInInside() const
Definition: identitygridintersections.hh:128
bool conforming() const
Return true if this is a conforming intersection.
Definition: identitygridintersections.hh:114
IdentityGridLeafIntersection(const GridImp *identityGrid, const HostLeafIntersection &hostIntersection)
Definition: identitygridintersections.hh:58
size_t boundarySegmentIndex() const
return the boundary segment index
Definition: identitygridintersections.hh:109
bool equals(const IdentityGridLeafIntersection &other) const
Definition: identitygridintersections.hh:70
FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal
Definition: identitygridintersections.hh:161
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition: identitygridintersections.hh:155
FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal multiplied by the integration element
Definition: identitygridintersections.hh:166
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition: identitygridintersections.hh:104
FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return unit outer normal
Definition: identitygridintersections.hh:171
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition: identitygridintersections.hh:149
GridImp::template Codim< 1 >::Geometry Geometry
Definition: identitygridintersections.hh:50
GridImp::template Codim< 0 >::Entity Entity
Definition: identitygridintersections.hh:52
Definition: identitygridintersections.hh:192
Geometry geometry() const
Definition: identitygridintersections.hh:302
GridImp::template Codim< 0 >::Entity Entity
Definition: identitygridintersections.hh:211
IdentityGridLevelIntersection(const GridImp *identityGrid, const HostLevelIntersection &hostIntersection)
Definition: identitygridintersections.hh:217
GridImp::template Codim< 1 >::Geometry Geometry
Definition: identitygridintersections.hh:209
bool equals(const IdentityGridLevelIntersection &other) const
Definition: identitygridintersections.hh:229
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition: identitygridintersections.hh:264
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: identitygridintersections.hh:259
bool conforming() const
Return true if this is a conforming intersection.
Definition: identitygridintersections.hh:274
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition: identitygridintersections.hh:309
FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal
Definition: identitygridintersections.hh:321
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition: identitygridintersections.hh:210
FieldVector< ctype, dimworld > NormalVector
Definition: identitygridintersections.hh:212
bool boundary() const
return true if intersection is with boundary.
Definition: identitygridintersections.hh:250
FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal multiplied by the integration element
Definition: identitygridintersections.hh:326
LocalGeometry geometryInOutside() const
Definition: identitygridintersections.hh:295
LocalGeometry geometryInInside() const
Definition: identitygridintersections.hh:288
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition: identitygridintersections.hh:315
FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return unit outer normal
Definition: identitygridintersections.hh:331
size_t boundarySegmentIndex() const
return the boundary segment index
Definition: identitygridintersections.hh:269
Entity outside() const
Definition: identitygridintersections.hh:243
Entity inside() const
Definition: identitygridintersections.hh:236
GeometryType type() const
Geometry type of an intersection.
Definition: identitygridintersections.hh:279
IdentityGridLevelIntersection(const GridImp *identityGrid, HostLevelIntersection &&hostIntersection)
Definition: identitygridintersections.hh:223