3#ifndef DUNE_IDENTITYGRIDGEOMETRY_HH
4#define DUNE_IDENTITYGRIDGEOMETRY_HH
16 template<
int mydim,
int coorddim,
class Gr
idImp>
17 class IdentityGridGeometry :
18 public GeometryDefaultImplementation <mydim, coorddim, GridImp, IdentityGridGeometry>
22 typedef typename GridImp::ctype ctype;
28 enum {CodimInHostGrid = GridImp::HostGridType::dimension - mydim};
29 enum {DimensionWorld = GridImp::HostGridType::dimensionworld};
32 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridGeometryType;
33 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridLocalGeometryType;
35 typedef typename std::conditional<coorddim==DimensionWorld, HostGridGeometryType, HostGridLocalGeometryType>::type HostGridGeometry;
38 typedef typename HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed;
39 typedef typename HostGridGeometryType::JacobianTransposed JacobianTransposed;
44 IdentityGridGeometry(
const HostGridGeometry& hostGeometry)
45 : hostGeometry_(hostGeometry)
52 return hostGeometry_.type();
57 return hostGeometry_.affine();
61 int corners ()
const {
62 return hostGeometry_.corners();
67 const FieldVector<ctype, coorddim> corner (
int i)
const {
68 return hostGeometry_.corner(i);
74 FieldVector<ctype, coorddim> global (
const FieldVector<ctype, mydim>& local)
const {
75 return hostGeometry_.global(local);
81 jacobianTransposed (
const FieldVector<ctype, mydim>& local )
const {
82 return hostGeometry_.jacobianTransposed(local);
87 FieldVector<ctype, mydim> local (
const FieldVector<ctype, coorddim>& global)
const {
88 return hostGeometry_.local(global);
93 bool checkInside(
const FieldVector<ctype, mydim> &local)
const {
94 return hostGeometry_.checkInside(local);
100 ctype integrationElement (
const FieldVector<ctype, mydim>& local)
const {
101 return hostGeometry_.integrationElement(local);
106 JacobianInverseTransposed jacobianInverseTransposed (
const FieldVector<ctype, mydim>& local)
const {
107 return hostGeometry_.jacobianInverseTransposed(local);
111 HostGridGeometry hostGeometry_;
Wrapper and interface classes for element geometries.
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Dune namespace.
Definition: alignedallocator.hh:10
Traits for type conversions and type information.