1#ifndef DUNE_MULTIDOMAINGRID_LOCALGEOMETRY_HH
2#define DUNE_MULTIDOMAINGRID_LOCALGEOMETRY_HH
4#include <dune/grid/common/geometry.hh>
11template<
int mydim,
int coorddim,
typename Gr
idImp>
12class LocalGeometryWrapper
15 template<
int,
int,
typename>
16 friend class EntityWrapper;
18 template<
typename,
typename>
19 friend class IntersectionWrapper;
21 template<
typename,
typename,
typename,
typename>
22 friend class SubDomainInterface;
26 typedef typename GridImp::ctype ctype;
27 static const int dimension = GridImp::dimension;
28 static const int dimensionworld = GridImp::dimensionworld;
29 static const int mydimension = mydim;
30 static const int coorddimension = coorddim;
34 typedef typename GridImp::HostGrid::Traits::template Codim<dimension-mydim>::LocalGeometry HostLocalGeometry;
38 typedef typename HostLocalGeometry::GlobalCoordinate GlobalCoordinate;
39 typedef typename HostLocalGeometry::LocalCoordinate LocalCoordinate;
40 typedef typename HostLocalGeometry::Volume Volume;
41 typedef typename HostLocalGeometry::JacobianInverseTransposed JacobianInverseTransposed;
42 typedef typename HostLocalGeometry::JacobianTransposed JacobianTransposed;
43 typedef typename HostLocalGeometry::JacobianInverse JacobianInverse;
44 typedef typename HostLocalGeometry::Jacobian Jacobian;
46 GeometryType type()
const {
47 return _wrappedLocalGeometry.type();
51 return _wrappedLocalGeometry.corners();
55 return _wrappedLocalGeometry.affine();
58 GlobalCoordinate corner(
int i)
const {
59 return _wrappedLocalGeometry.corner(i);
62 GlobalCoordinate global(
const LocalCoordinate& local)
const {
63 return _wrappedLocalGeometry.global(local);
66 LocalCoordinate local(
const GlobalCoordinate& global)
const {
67 return _wrappedLocalGeometry.local(global);
70 bool checkInside(
const LocalCoordinate& local)
const {
71 return _wrappedLocalGeometry.checkInside(local);
74 Volume integrationElement(
const LocalCoordinate& local)
const {
75 return _wrappedLocalGeometry.integrationElement(local);
78 Volume volume()
const {
79 return _wrappedLocalGeometry.volume();
82 GlobalCoordinate center()
const {
83 return _wrappedLocalGeometry.center();
86 JacobianTransposed jacobianTransposed(
const LocalCoordinate& local)
const {
87 return _wrappedLocalGeometry.jacobianTransposed(local);
90 JacobianInverseTransposed jacobianInverseTransposed(
const LocalCoordinate& local)
const {
91 return _wrappedLocalGeometry.jacobianInverseTransposed(local);
94 Jacobian jacobian(
const LocalCoordinate& local)
const
96 return _wrappedLocalGeometry.jacobian(local);
99 JacobianInverse jacobianInverse(
const LocalCoordinate& local)
const
101 return _wrappedLocalGeometry.jacobianInverse(local);
106 const HostLocalGeometry _wrappedLocalGeometry;
108 LocalGeometryWrapper(
const HostLocalGeometry& wrappedLocalGeometry)
109 : _wrappedLocalGeometry(wrappedLocalGeometry)