1#ifndef DUNE_MULTIDOMAINGRID_SUBDOMAINGRID_LOCALGEOMETRY_HH
2#define DUNE_MULTIDOMAINGRID_SUBDOMAINGRID_LOCALGEOMETRY_HH
4#include <dune/grid/common/geometry.hh>
12template<
int mydim,
int coorddim,
typename Gr
idImp>
13class LocalGeometryWrapper
16 template<
int,
int,
typename>
17 friend class EntityWrapper;
19 template<
typename,
typename,
typename>
20 friend class IntersectionWrapper;
24 typedef typename GridImp::ctype ctype;
25 static const int dimension = GridImp::dimension;
26 static const int dimensionworld = GridImp::dimensionworld;
27 static const int mydimension = mydim;
28 static const int coorddimension = coorddim;
32 typedef FieldVector<ctype,coorddimension> GlobalCoords;
33 typedef FieldVector<ctype,mydimension> LocalCoords;
34 typedef typename GridImp::HostGrid::Traits::template Codim<dimension-mydim>::LocalGeometry HostLocalGeometry;
38 typedef typename HostLocalGeometry::JacobianInverseTransposed JacobianInverseTransposed;
39 typedef typename HostLocalGeometry::JacobianTransposed JacobianTransposed;
41 GeometryType type()
const {
42 return _hostLocalGeometry.type();
46 return _hostLocalGeometry.corners();
50 return _hostLocalGeometry.affine();
53 GlobalCoords corner(
int i)
const {
54 return _hostLocalGeometry.corner(i);
57 GlobalCoords global(
const LocalCoords& local)
const {
58 return _hostLocalGeometry.global(local);
61 LocalCoords local(
const GlobalCoords& global)
const {
62 return _hostLocalGeometry.local(global);
65 bool checkInside(
const LocalCoords& local)
const {
66 return _hostLocalGeometry.checkInside(local);
69 ctype integrationElement(
const LocalCoords& local)
const {
70 return _hostLocalGeometry.integrationElement(local);
73 ctype volume()
const {
74 return _hostLocalGeometry.volume();
77 GlobalCoords center()
const {
78 return _hostLocalGeometry.center();
81 const JacobianTransposed
82 jacobianTransposed(
const LocalCoords& local)
const {
83 return _hostLocalGeometry.jacobianTransposed(local);
86 const JacobianInverseTransposed
87 jacobianInverseTransposed(
const LocalCoords& local)
const {
88 return _hostLocalGeometry.jacobianInverseTransposed(local);
93 const HostLocalGeometry _hostLocalGeometry;
95 LocalGeometryWrapper(
const HostLocalGeometry& hostLocalGeometry)
96 : _hostLocalGeometry(hostLocalGeometry)