3#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
4#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
22 template<
class Implementation >
23 class GeometryReference
25 typedef GeometryReference< Implementation > This;
28 static const int mydimension = Implementation::mydimension;
29 static const int coorddimension = Implementation::coorddimension;
31 typedef typename Implementation::ctype ctype;
33 typedef typename Implementation::LocalCoordinate LocalCoordinate;
34 typedef typename Implementation::GlobalCoordinate GlobalCoordinate;
36 typedef typename Implementation::JacobianInverseTransposed JacobianInverseTransposed;
37 typedef typename Implementation::JacobianTransposed JacobianTransposed;
39 explicit GeometryReference (
const Implementation &impl )
45 bool affine()
const {
return impl().affine(); }
47 int corners ()
const {
return impl().corners(); }
48 GlobalCoordinate corner (
int i )
const {
return impl().corner( i ); }
49 GlobalCoordinate center ()
const {
return impl().center(); }
51 GlobalCoordinate global (
const LocalCoordinate &local )
const
53 return impl().global( local );
56 LocalCoordinate local (
const GlobalCoordinate &global )
const
58 return impl().local( global );
61 ctype integrationElement (
const LocalCoordinate &local )
const
63 return impl().integrationElement( local );
66 ctype volume ()
const {
return impl().volume(); }
68 JacobianTransposed jacobianTransposed (
const LocalCoordinate &local )
const
70 return impl().jacobianTransposed( local );
73 JacobianInverseTransposed jacobianInverseTransposed (
const LocalCoordinate &local )
const
75 return impl().jacobianInverseTransposed( local );
78 const Implementation &impl ()
const {
return *impl_; }
81 const Implementation *impl_;
88 template<
int mydim,
int cdim,
class Gr
id >
89 class LocalGeometryReference
90 :
public GeometryReference< typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl >
92 typedef typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl Implementation;
95 LocalGeometryReference (
const Implementation &impl )
96 : GeometryReference< Implementation >( impl )
105 template<
class Implementation >
106 const int GeometryReference< Implementation >::mydimension;
108 template<
class Implementation >
109 const int GeometryReference< Implementation >::coorddimension;
Wrapper and interface classes for element geometries.
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:180
Dune namespace.
Definition: alignedallocator.hh:14
A unique label for each type of element that can occur in a grid.
Traits for type conversions and type information.