1#ifndef DUNE_FEM_GRIDPART_IDGRIDPART_INTERSECTION_HH
2#define DUNE_FEM_GRIDPART_IDGRIDPART_INTERSECTION_HH
7#include <dune/fem/gridpart/idgridpart/geometry.hh>
18 template<
class Gr
idFamily >
21 typedef typename std::remove_const< GridFamily >::type::Traits Traits;
23 typedef typename Traits::HostGridPartType HostGridPartType;
26 typedef typename std::remove_const< GridFamily >::type::ctype ctype;
28 static const int dimension = std::remove_const< GridFamily >::type::dimension;
29 static const int dimensionworld = std::remove_const< GridFamily >::type::dimensionworld;
31 typedef typename Traits::template Codim< 0 >::Entity Entity;
32 typedef typename Traits::template Codim< 1 >::Geometry Geometry;
33 typedef typename Traits::template Codim< 1 >::LocalGeometry LocalGeometry;
35 typedef typename Traits::ExtraData ExtraData;
40 typedef typename HostGridPartType::IntersectionType HostIntersectionType;
43 IdIntersection () =
default;
45 IdIntersection ( ExtraData data, HostIntersectionType hostIntersection )
46 : data_(
std::move( data ) ),
47 hostIntersection_(
std::move( hostIntersection ) )
50 Entity inside ()
const
52 return Entity( EntityImpl( data(), hostIntersection().inside() ) );
55 Entity outside ()
const
57 return Entity( EntityImpl( data(), hostIntersection().outside() ) );
60 bool boundary ()
const
62 return hostIntersection().boundary();
67 return hostIntersection().conforming();
70 int twistInSelf()
const
72 return hostIntersection().impl().twistInSelf();
75 int twistInNeighbor()
const
77 return hostIntersection().impl().twistInNeighbor();
80 bool neighbor ()
const
82 return hostIntersection().neighbor();
85 int boundaryId ()
const
87 return hostIntersection().boundaryId();
90 size_t boundarySegmentIndex ()
const
92 return hostIntersection().boundarySegmentIndex();
95 LocalGeometry geometryInInside ()
const
97 return LocalGeometry( hostIntersection().geometryInInside() );
100 LocalGeometry geometryInOutside ()
const
102 return LocalGeometry( hostIntersection().geometryInOutside() );
105 Geometry geometry ()
const
107 return Geometry( hostIntersection().geometry() );
112 return hostIntersection().type();
115 int indexInInside ()
const
117 return hostIntersection().indexInInside();
120 int indexInOutside ()
const
122 return hostIntersection().indexInOutside();
125 FieldVector< ctype, dimensionworld >
126 integrationOuterNormal (
const FieldVector< ctype, dimension-1 > &local )
const
128 return hostIntersection().integrationOuterNormal( local );
131 FieldVector< ctype, dimensionworld >
132 outerNormal (
const FieldVector< ctype, dimension-1 > &local )
const
134 return hostIntersection().outerNormal( local );
137 FieldVector< ctype, dimensionworld >
138 unitOuterNormal (
const FieldVector< ctype, dimension-1 > &local )
const
140 return hostIntersection().unitOuterNormal( local );
143 FieldVector< ctype, dimensionworld > centerUnitOuterNormal ()
const
145 return hostIntersection().centerUnitOuterNormal();
148 const ExtraData &data ()
const {
return data_; }
150 const HostIntersectionType &hostIntersection ()
const
152 return hostIntersection_;
157 HostIntersectionType hostIntersection_;
EntityImp< cd, dim, GridImp > Implementation
type of underlying implementation
Definition: entity.hh:73
@ conforming
Output conforming data.
Definition: common.hh:73
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Dune namespace.
Definition: alignedallocator.hh:13