1#ifndef DUNE_FEM_GRIDPART_IDGRIDPART_GEOMETRY_HH
2#define DUNE_FEM_GRIDPART_IDGRIDPART_GEOMETRY_HH
17 template<
int,
int,
class >
class IdGeometry;
18 template<
int,
int,
class >
class IdLocalGeometry;
24 template<
class Traits >
25 struct IdBasicGeometry
27 typedef typename Traits::HostGeometryType HostGeometryType;
29 static const int mydimension = HostGeometryType::mydimension;
30 static const int coorddimension = HostGeometryType::coorddimension;
32 typedef typename HostGeometryType::ctype ctype;
33 typedef FieldVector< ctype, mydimension > LocalVector;
36 typedef typename HostGeometryType::JacobianTransposed JacobianTransposed;
37 typedef typename HostGeometryType::JacobianInverseTransposed JacobianInverseTransposed;
39 typedef typename HostGeometryType::Jacobian Jacobian;
40 typedef typename HostGeometryType::JacobianInverse JacobianInverse;
42 IdBasicGeometry (
const HostGeometryType &hostGeometry )
43 : hostGeometry_( hostGeometry )
46 operator bool ()
const {
return bool( hostGeometry_ ); }
48 GeometryType type ()
const {
return hostGeometry_.type(); }
49 bool affine ()
const {
return hostGeometry_.affine(); }
51 int corners ()
const {
return hostGeometry_.corners(); }
52 GlobalVector corner (
const int i )
const {
return hostGeometry_.corner( i ); }
53 GlobalVector center ()
const {
return hostGeometry_.center(); }
55 GlobalVector global (
const LocalVector &local )
const {
return hostGeometry_.global( local ); }
56 LocalVector local (
const GlobalVector &global )
const {
return hostGeometry_.local( global ); }
58 ctype integrationElement (
const LocalVector &local )
const {
return hostGeometry_.integrationElement( local ); }
59 ctype volume ()
const {
return hostGeometry_.volume(); }
61 JacobianTransposed jacobianTransposed (
const LocalVector &local )
const
63 return hostGeometry_.jacobianTransposed( local );
66 JacobianInverseTransposed jacobianInverseTransposed (
const LocalVector &local )
const
68 return hostGeometry_.jacobianInverseTransposed( local );
71 Jacobian jacobian (
const LocalVector &local )
const
73 return hostGeometry_.jacobian( local );
76 JacobianInverse jacobianInverse (
const LocalVector &local )
const
78 return hostGeometry_.jacobianInverse( local );
82 HostGeometryType hostGeometry_;
90 template<
int mydim,
class Gr
idFamily >
91 struct IdGeometryTraits
93 typedef typename std::remove_const< GridFamily >::type::Traits::HostGridPartType HostGridPartType;
95 static const int dimension = HostGridPartType::dimension;
96 static const int mydimension = mydim;
97 static const int codimension = dimension - mydimension;
99 typedef typename HostGridPartType::template Codim< codimension >::GeometryType HostGeometryType;
107 template<
int mydim,
int cdim,
class Gr
idFamily >
109 :
public IdBasicGeometry< IdGeometryTraits< mydim, GridFamily > >
111 typedef IdBasicGeometry< IdGeometryTraits< mydim, GridFamily > > Base;
114 typedef typename Base::HostGeometryType HostGeometryType;
119 IdGeometry (
const HostGeometryType &hostGeometry )
120 : Base( hostGeometry )
129 template<
int mydim,
class Gr
idFamily >
130 struct IdLocalGeometryTraits
132 typedef typename std::remove_const< GridFamily >::type::Traits::HostGridPartType HostGridPartType;
134 static const int dimension = HostGridPartType::dimension;
135 static const int mydimension = mydim;
136 static const int codimension = dimension - mydimension;
138 typedef typename HostGridPartType::template Codim< codimension >::LocalGeometryType HostGeometryType;
146 template<
int mydim,
int cdim,
class Gr
idFamily >
147 class IdLocalGeometry
148 :
public IdBasicGeometry< IdLocalGeometryTraits< mydim, GridFamily > >
150 typedef IdBasicGeometry< IdLocalGeometryTraits< mydim, GridFamily > > Base;
153 typedef typename Base::HostGeometryType HostGeometryType;
158 IdLocalGeometry (
const HostGeometryType &hostGeometry )
159 : Base( hostGeometry )
Wrapper and interface classes for element geometries.
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Dune namespace.
Definition: alignedallocator.hh:13