3#ifndef DUNE_ALBERTA_INTERSECTION_HH
4#define DUNE_ALBERTA_INTERSECTION_HH
6#include <dune/grid/common/intersection.hh>
8#include <dune/grid/albertagrid/transformation.hh>
10#include <dune/grid/albertagrid/geometry.hh>
20 template<
int codim,
int dim,
class Gr
idImp >
21 class AlbertaGridEntity;
28 template<
class Gr
id >
29 class AlbertaGridIntersectionBase
31 typedef AlbertaGridIntersectionBase< Grid > This;
39 typedef FieldVector< ctype, dimensionworld > NormalVector;
40 typedef FieldVector< ctype, dimension-1 > LocalCoordType;
42 typedef typename Grid::template Codim< 0 >::Entity Entity;
43 typedef typename Grid::template Codim< 0 >::EntityPointer EntityPointer;
45 typedef typename Grid::template Codim< 1 >::Geometry Geometry;
46 typedef typename Grid::template Codim< 1 >::LocalGeometry LocalGeometry;
48 typedef Alberta::ElementInfo< dimension > ElementInfo;
51 typedef AlbertaGridEntity< 0, dimension, Grid > EntityImp;
53 typedef typename Grid::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
54 typedef typename Grid::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
56 struct GlobalCoordReader;
57 struct LocalCoordReader;
60 AlbertaGridIntersectionBase (
const EntityImp &entity,
const int oppVertex );
62 EntityPointer inside ()
const;
64 bool boundary ()
const;
65 int boundaryId ()
const;
66 size_t boundarySegmentIndex ()
const;
68 int indexInInside ()
const;
72 NormalVector centerIntegrationOuterNormal ()
const;
73 NormalVector centerOuterNormal ()
const;
74 NormalVector centerUnitOuterNormal ()
const;
76 NormalVector integrationOuterNormal (
const LocalCoordType &local )
const;
77 NormalVector outerNormal (
const LocalCoordType &local )
const;
78 NormalVector unitOuterNormal (
const LocalCoordType &local )
const;
81 AlbertaTransformation transformation ()
const;
84 const Grid &grid ()
const;
85 const ElementInfo &elementInfo ()
const;
89 ElementInfo elementInfo_;
98 template<
class Gr
idImp >
99 class AlbertaGridLeafIntersection
100 :
public AlbertaGridIntersectionBase< GridImp >
102 typedef AlbertaGridLeafIntersection< GridImp > This;
103 typedef AlbertaGridIntersectionBase< GridImp > Base;
105 friend class AlbertaGridEntity< 0, GridImp::dimension, GridImp >;
108 typedef This ImplementationType;
110 static const int dimension = Base::dimension;
111 static const int dimensionworld = Base::dimensionworld;
113 typedef typename Base::NormalVector NormalVector;
114 typedef typename Base::LocalCoordType LocalCoordType;
116 typedef typename Base::Entity Entity;
117 typedef typename Base::EntityPointer EntityPointer;
119 typedef typename Base::Geometry Geometry;
120 typedef typename Base::LocalGeometry LocalGeometry;
122 typedef typename Base::ElementInfo ElementInfo;
125 typedef typename Base::EntityImp EntityImp;
127 typedef typename Base::GeometryImpl GeometryImpl;
128 typedef typename Base::LocalGeometryImpl LocalGeometryImpl;
130 typedef typename Base::GlobalCoordReader GlobalCoordReader;
131 typedef typename Base::LocalCoordReader LocalCoordReader;
135 using Base::elementInfo;
139 AlbertaGridLeafIntersection ( const EntityImp &entity, const int n );
141 AlbertaGridLeafIntersection ( const This &other );
143 This &operator= ( const This &other );
145 bool operator== ( const This &other ) const;
149 EntityPointer outside () const;
151 bool neighbor () const;
153 bool conforming () const;
155 LocalGeometry geometryInInside () const;
156 LocalGeometry geometryInOutside () const;
158 Geometry geometry () const;
160 int indexInOutside () const;
163 int twistInInside () const;
164 int twistInOutside () const;
167 using Base::oppVertex_;
170 mutable ElementInfo neighborInfo_;
@ dimension
The dimension of the grid.
Definition: grid.hh:400
@ dimensionworld
The dimension of the world the grid lives in.
Definition: grid.hh:406
ct ctype
Define type used for coordinates in grid module.
Definition: grid.hh:546
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
provides a wrapper for ALBERTA's el_info structure
Dune namespace.
Definition: alignment.hh:14