1#ifndef DUNE_FEM_GRIDPART_GEOGRIDPART_INTERSECTION_HH
2#define DUNE_FEM_GRIDPART_GEOGRIDPART_INTERSECTION_HH
18 template<
class Gr
idFamily >
21 typedef typename std::remove_const< GridFamily >::type::Traits Traits;
24 typedef typename std::remove_const< GridFamily >::type::ctype
ctype;
26 static const int dimension = std::remove_const< GridFamily >::type::dimension;
27 static const int dimensionworld = std::remove_const< GridFamily >::type::dimensionworld;
29 typedef typename Traits::template Codim< 0 >::Entity
Entity;
31 typedef typename Traits::template Codim< 1 >::Geometry
Geometry;
32 typedef typename Traits::template Codim< 1 >::LocalGeometry
LocalGeometry;
37 typedef typename Entity::Implementation EntityImplType;
38 typedef typename ElementGeometry::Implementation ElementGeometryImplType;
39 typedef typename Geometry::Implementation GeometryImplType;
41 typedef typename Traits::HostGridPartType HostGridPartType;
42 typedef typename HostGridPartType::IntersectionType HostIntersectionType;
49 insideGeo_( insideGeo.impl() ),
120 FieldVector< ctype, dimensionworld >
123 auto refElement = referenceElement< ctype, dimension>( insideGeo_.type() );
126 typedef typename ElementGeometryImplType::JacobianInverseTransposed JacobianInverseTransposed;
127 const JacobianInverseTransposed &jit = insideGeo_.jacobianInverseTransposed( x );
128 const FieldVector< ctype, dimension > &refNormal = refElement.integrationOuterNormal(
indexInInside() );
130 FieldVector< ctype, dimensionworld > normal;
131 jit.mv( refNormal, normal );
132 normal *=
ctype( 1 ) / jit.det();
136 FieldVector< ctype, dimensionworld >
137 outerNormal (
const FieldVector< ctype, dimension-1 > &local )
const
139 auto refElement = referenceElement< ctype, dimension>( insideGeo_.type() );
142 typedef typename ElementGeometryImplType::JacobianInverseTransposed JacobianInverseTransposed;
143 const JacobianInverseTransposed &jit = insideGeo_.jacobianInverseTransposed( x );
144 const FieldVector< ctype, dimension > &refNormal = refElement.integrationOuterNormal(
indexInInside() );
146 FieldVector< ctype, dimensionworld > normal;
147 jit.mv( refNormal, normal );
151 FieldVector< ctype, dimensionworld >
154 FieldVector< ctype, dimensionworld > normal =
outerNormal( local );
155 normal *= (
ctype( 1 ) / normal.two_norm());
167 assert( coordFunction_ );
168 return *coordFunction_;
173 return hostIntersection_;
178 ElementGeometryImplType insideGeo_;
179 HostIntersectionType hostIntersection_;
Definition: bindguard.hh:11
Definition: cornerstorage.hh:234
Definition: geogridpart/intersection.hh:20
FieldVector< ctype, dimensionworld > unitOuterNormal(const FieldVector< ctype, dimension-1 > &local) const
Definition: geogridpart/intersection.hh:152
bool neighbor() const
Definition: geogridpart/intersection.hh:73
static const int dimensionworld
Definition: geogridpart/intersection.hh:27
std::remove_const< GridFamily >::type::ctype ctype
Definition: geogridpart/intersection.hh:24
bool conforming() const
Definition: geogridpart/intersection.hh:68
LocalGeometry geometryInInside() const
Definition: geogridpart/intersection.hh:88
Entity outside() const
Definition: geogridpart/intersection.hh:58
int indexInInside() const
Definition: geogridpart/intersection.hh:110
int boundaryId() const
Definition: geogridpart/intersection.hh:78
GeoIntersection(const CoordFunctionType &coordFunction, const ElementGeometry &insideGeo, HostIntersectionType hostIntersection)
Definition: geogridpart/intersection.hh:47
FieldVector< ctype, dimensionworld > centerUnitOuterNormal() const
Definition: geogridpart/intersection.hh:159
FieldVector< ctype, dimensionworld > outerNormal(const FieldVector< ctype, dimension-1 > &local) const
Definition: geogridpart/intersection.hh:137
const CoordFunctionType & coordFunction() const
Definition: geogridpart/intersection.hh:165
LocalGeometry geometryInOutside() const
Definition: geogridpart/intersection.hh:93
Traits::template Codim< 0 >::Entity Entity
Definition: geogridpart/intersection.hh:29
bool boundary() const
Definition: geogridpart/intersection.hh:63
Traits::template Codim< 1 >::LocalGeometry LocalGeometry
Definition: geogridpart/intersection.hh:32
Geometry geometry() const
Definition: geogridpart/intersection.hh:98
const HostIntersectionType & hostIntersection() const
Definition: geogridpart/intersection.hh:171
Traits::CoordFunctionType CoordFunctionType
Definition: geogridpart/intersection.hh:34
GeometryType type() const
Definition: geogridpart/intersection.hh:105
Entity inside() const
Definition: geogridpart/intersection.hh:53
int indexInOutside() const
Definition: geogridpart/intersection.hh:115
FieldVector< ctype, dimensionworld > integrationOuterNormal(const FieldVector< ctype, dimension-1 > &local) const
Definition: geogridpart/intersection.hh:121
Traits::template Codim< 0 >::Geometry ElementGeometry
Definition: geogridpart/intersection.hh:30
static const int dimension
Definition: geogridpart/intersection.hh:26
Traits::template Codim< 1 >::Geometry Geometry
Definition: geogridpart/intersection.hh:31
size_t boundarySegmentIndex() const
Definition: geogridpart/intersection.hh:83