dune-geometry  2.3.1
mockgeometry.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 
4 #ifndef DUNE_GEOMETRY_MOCKGEOMETRY_HH
5 #define DUNE_GEOMETRY_MOCKGEOMETRY_HH
6 
7 #include <cstddef>
8 
9 #include <dune/common/deprecated.hh>
10 #include <dune/common/fmatrix.hh>
11 #include <dune/geometry/type.hh>
14 
15 namespace Dune {
16 
18 
32  template<class ctype, std::size_t mydim, std::size_t coorddim>
33  class MockGeometry :
35  mydim, GenericGeometry::DefaultGeometryTraits<ctype, coorddim, coorddim>
36  >
37  {
39  Traits;
41 
42  // Hide members of BasicGeometry that are not part of Dune::Geometry
43  using typename Base::JacobianInverseTransposed;
44 
45  public:
47  typedef FieldMatrix<ctype, coorddim, mydim> Jacobian;
49  typedef FieldMatrix<ctype, mydim, coorddim> JacobianTransposed;
50 
52  DUNE_DEPRECATED_MSG( "MockGeometry is deprecated; use MultiLinearGeometry instead." )
55  template<class CoordVector>
56  DUNE_DEPRECATED_MSG( "MockGeometry is deprecated; use MultiLinearGeometry instead." )
57  MockGeometry(const GeometryType &type, const CoordVector &coords) :
58  Base(type, coords)
59  { }
61  template<int fatherdim>
62  DUNE_DEPRECATED_MSG( "MockGeometry is deprecated; use MultiLinearGeometry instead." )
63  MockGeometry(const MockGeometry<ctype, fatherdim, coorddim> &father,
64  int i) :
65  Base(static_cast<const GenericGeometry::BasicGeometry<
66  fatherdim,
67  GenericGeometry::DefaultGeometryTraits<ctype, coorddim, coorddim>
68  > &>(father),
69  i)
70  { }
71 
74  (const typename Base::LocalCoordinate &local) const
75  { return Base::jacobianTransposed(local); }
78  (const typename Base::LocalCoordinate &local) const
79  { return Base::jacobianInverseTransposed(local); }
80  };
81 
82 } // namespace Dune
83 
84 #endif // DUNE_GEOMETRY_MOCKGEOMETRY_HH
default settings for BasicGeometry
Definition: geometrytraits.hh:113
FieldMatrix< ctype, mydim, coorddim > JacobianTransposed
type of jacobian transposed
Definition: mockgeometry.hh:49
A unique label for each type of element that can occur in a grid.
Jacobian jacobianInverseTransposed(const typename Base::LocalCoordinate &local) const
Return inverse of transposed of Jacobian.
Definition: mockgeometry.hh:78
JacobianTransposed jacobianTransposed(const typename Base::LocalCoordinate &local) const
Return the transposed of the Jacobian.
Definition: mockgeometry.hh:74
const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) const
Compute the transpose of the Jacobian matrix of the transformation from the reference element into th...
Definition: geometry.hh:452
GeometryType type() const
Return the topological type of this geometry.
Definition: geometry.hh:395
FieldVector< ctype, mydimension > LocalCoordinate
Type used for parameter coordinates.
Definition: geometry.hh:271
Grid-independent geometry.
Definition: mockgeometry.hh:33
Jacobian JacobianInverseTransposed
Definition: geometry.hh:313
generic implementation of DUNE geometries
Definition: geometry.hh:252
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:24
FieldMatrix< ctype, coorddim, mydim > Jacobian
type of jacobian (also of jacobian inverse transposed)
Definition: mockgeometry.hh:47
const JacobianInverseTransposed & jacobianInverseTransposed(const LocalCoordinate &local) const
Compute the transpose of the inverse Jacobian matrix of the transformation from the reference element...
Definition: geometry.hh:459
LocalCoordinate local(const GlobalCoordinate &global) const
Map global to local coordinates.
Definition: geometry.hh:419
CoordTraits::ctype ctype
Type used for coordinate components.
Definition: geometry.hh:268