5#ifndef DUNE_IDENTITYGRIDGEOMETRY_HH
6#define DUNE_IDENTITYGRIDGEOMETRY_HH
18 template<
int mydim,
int coorddim,
class Gr
idImp>
19 class IdentityGridGeometry :
20 public GeometryDefaultImplementation <mydim, coorddim, GridImp, IdentityGridGeometry>
24 typedef typename GridImp::ctype ctype;
30 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - mydim;
31 constexpr static int DimensionWorld = GridImp::HostGridType::dimensionworld;
34 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridGeometryType;
35 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridLocalGeometryType;
37 typedef typename std::conditional<coorddim==DimensionWorld, HostGridGeometryType, HostGridLocalGeometryType>::type HostGridGeometry;
40 typedef typename HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed;
41 typedef typename HostGridGeometryType::JacobianTransposed JacobianTransposed;
46 IdentityGridGeometry(
const HostGridGeometry& hostGeometry)
47 : hostGeometry_(hostGeometry)
54 return hostGeometry_.type();
59 return hostGeometry_.affine();
63 int corners ()
const {
64 return hostGeometry_.corners();
69 const FieldVector<ctype, coorddim> corner (
int i)
const {
70 return hostGeometry_.corner(i);
76 FieldVector<ctype, coorddim> global (
const FieldVector<ctype, mydim>& local)
const {
77 return hostGeometry_.global(local);
83 jacobianTransposed (
const FieldVector<ctype, mydim>& local )
const {
84 return hostGeometry_.jacobianTransposed(local);
89 FieldVector<ctype, mydim> local (
const FieldVector<ctype, coorddim>& global)
const {
90 return hostGeometry_.local(global);
95 bool checkInside(
const FieldVector<ctype, mydim> &local)
const {
96 return hostGeometry_.checkInside(local);
102 ctype integrationElement (
const FieldVector<ctype, mydim>& local)
const {
103 return hostGeometry_.integrationElement(local);
108 JacobianInverseTransposed jacobianInverseTransposed (
const FieldVector<ctype, mydim>& local)
const {
109 return hostGeometry_.jacobianInverseTransposed(local);
113 HostGridGeometry hostGeometry_;
Traits for type conversions and type information.
Wrapper and interface classes for element geometries.
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Dune namespace.
Definition: alignedallocator.hh:13