3#ifndef DUNE_GRID_GEOMETRYREFERENCE_HH
4#define DUNE_GRID_GEOMETRYREFERENCE_HH
22 template<
int mydim,
int cdim,
class Gr
id >
23 class GlobalGeometryReference;
25 template<
int mydim,
int cdim,
class Gr
id >
26 class LocalGeometryReference;
33 namespace FacadeOptions
36 template<
int mydim,
int cdim,
class Gr
idImp,
template<
int,
int,
class >
class GeometryImp >
37 struct StoreGeometryReference;
39 template<
int mydim,
int cdim,
class Gr
id >
40 struct StoreGeometryReference< mydim, cdim, Grid, GlobalGeometryReference >
42 static const bool v =
false;
45 template<
int mydim,
int cdim,
class Gr
id >
46 struct StoreGeometryReference< mydim, cdim, Grid, LocalGeometryReference >
48 static const bool v =
false;
58 template<
class Implementation >
59 class GeometryReference
61 typedef GeometryReference< Implementation > This;
64 static const int mydimension = Implementation::mydimension;
65 static const int coorddimension = Implementation::coorddimension;
67 typedef typename Implementation::ctype ctype;
69 typedef typename Implementation::LocalCoordinate LocalCoordinate;
70 typedef typename Implementation::GlobalCoordinate GlobalCoordinate;
72 typedef typename Implementation::JacobianInverseTransposed JacobianInverseTransposed;
73 typedef typename Implementation::JacobianTransposed JacobianTransposed;
75 explicit GeometryReference (
const Implementation &impl )
81 bool affine()
const {
return impl().affine(); }
83 int corners ()
const {
return impl().corners(); }
84 GlobalCoordinate corner (
int i )
const {
return impl().corner( i ); }
85 GlobalCoordinate center ()
const {
return impl().center(); }
87 GlobalCoordinate global (
const LocalCoordinate &local )
const
89 return impl().global( local );
92 LocalCoordinate local (
const GlobalCoordinate &global )
const
94 return impl().local( global );
97 ctype integrationElement (
const LocalCoordinate &local )
const
99 return impl().integrationElement( local );
102 ctype volume ()
const {
return impl().volume(); }
104 const JacobianTransposed &jacobianTransposed (
const LocalCoordinate &local )
const
106 return impl().jacobianTransposed( local );
109 const JacobianInverseTransposed &jacobianInverseTransposed (
const LocalCoordinate &local )
const
111 return impl().jacobianInverseTransposed( local );
114 const Implementation &impl ()
const {
return *impl_; }
117 const Implementation *impl_;
125 template<
int mydim,
int cdim,
class Gr
id >
126 class GlobalGeometryReference
127 :
public GeometryReference< typename remove_const< Grid >::type::Traits::template Codim< remove_const< Grid >::type::dimension - mydim >::GeometryImpl >
129 typedef typename remove_const< Grid >::type::Traits::template Codim< remove_const< Grid >::type::dimension - mydim >::GeometryImpl Implementation;
132 GlobalGeometryReference (
const Implementation &impl )
133 : GeometryReference< Implementation >( impl )
142 template<
int mydim,
int cdim,
class Gr
id >
143 class LocalGeometryReference
144 :
public GeometryReference< typename remove_const< Grid >::type::Traits::template Codim< remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl >
146 typedef typename remove_const< Grid >::type::Traits::template Codim< remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl Implementation;
149 LocalGeometryReference (
const Implementation &impl )
150 : GeometryReference< Implementation >( impl )
159 template<
class Implementation >
160 const int GeometryReference< Implementation >::mydimension;
162 template<
class Implementation >
163 const int GeometryReference< Implementation >::coorddimension;
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Wrapper and interface classes for element geometries.
Dune namespace.
Definition: alignment.hh:14
static const bool v
Whether to store by reference.
Definition: geometry.hh:49
A unique label for each type of element that can occur in a grid.
Traits for type conversions and type information.