1#ifndef DUNE_MULTIDOMAINGRID_SUBDOMAINGRID_GEOMETRY_HH
2#define DUNE_MULTIDOMAINGRID_SUBDOMAINGRID_GEOMETRY_HH
4#include <dune/grid/common/geometry.hh>
12template<
int mydim,
int coorddim,
typename Gr
idImp>
16 template<
int,
int,
typename>
17 friend class EntityWrapperBase;
19 template<
int,
int,
typename>
20 friend class EntityWrapper;
22 template<
typename,
typename,
typename>
23 friend class IntersectionWrapper;
27 typedef typename GridImp::ctype ctype;
28 static const int dimension = GridImp::dimension;
29 static const int dimensionworld = GridImp::dimensionworld;
30 static const int mydimension = mydim;
31 static const int coorddimension = coorddim;
35 typedef FieldVector<ctype,coorddimension> GlobalCoords;
36 typedef FieldVector<ctype,mydimension> LocalCoords;
37 typedef typename GridImp::HostGrid::Traits::template Codim<dimension-mydim>::Geometry HostGeometry;
41 typedef typename HostGeometry::JacobianInverseTransposed JacobianInverseTransposed;
42 typedef typename HostGeometry::JacobianTransposed JacobianTransposed;
44 GeometryType type()
const {
45 return _hostGeometry.type();
49 return _hostGeometry.corners();
53 return _hostGeometry.affine();
56 GlobalCoords corner(
int i)
const {
57 return _hostGeometry.corner(i);
60 GlobalCoords global(
const LocalCoords& local)
const {
61 return _hostGeometry.global(local);
64 LocalCoords local(
const GlobalCoords& global)
const {
65 return _hostGeometry.local(global);
68 bool checkInside(
const LocalCoords& local)
const {
69 return _hostGeometry.checkInside(local);
72 ctype integrationElement(
const LocalCoords& local)
const {
73 return _hostGeometry.integrationElement(local);
76 ctype volume()
const {
77 return _hostGeometry.volume();
80 GlobalCoords center()
const {
81 return _hostGeometry.center();
84 const JacobianTransposed
85 jacobianTransposed(
const LocalCoords& local)
const {
86 return _hostGeometry.jacobianTransposed(local);
89 const JacobianInverseTransposed
90 jacobianInverseTransposed(
const LocalCoords& local)
const {
91 return _hostGeometry.jacobianInverseTransposed(local);
96 const HostGeometry _hostGeometry;
98 GeometryWrapper(
const HostGeometry& hostGeometry)
99 : _hostGeometry(hostGeometry)