diff --git a/dune/gfe/realtuple.hh b/dune/gfe/realtuple.hh index 2ef732db8331160e03d99d8f0135a991af529234..e8b5420b480920b2de1ac54619ab3f0ac26ffadb 100644 --- a/dune/gfe/realtuple.hh +++ b/dune/gfe/realtuple.hh @@ -3,6 +3,9 @@ #include <dune/common/array.hh> #include <dune/common/fvector.hh> + +#include <dune/istl/scaledidmatrix.hh> + #include <dune/gfe/tensor3.hh> #include <dune/gfe/symmetricmatrix.hh> @@ -36,6 +39,9 @@ public: /** \brief The global convexity radius of the Euclidean space */ static constexpr double convexityRadius = std::numeric_limits<double>::infinity(); + /** \brief The return type of the derivativeOfProjection method */ + typedef Dune::ScaledIdentityMatrix<T, N> DerivativeOfProjection; + /** \brief Default constructor */ RealTuple() {} @@ -158,6 +164,15 @@ public: return EmbeddedTangentVector(0); } + /** \brief Derivative of the projection from the embedding space onto the manifold + * + * For RealTuples this is simply the identity + */ + static DerivativeOfProjection derivativeOfProjection(const Dune::FieldVector<T,N>& p) + { + return Dune::ScaledIdentityMatrix<T,N>(1.0); + } + /** \brief The global coordinates, if you really want them */ const Dune::FieldVector<T,N>& globalCoordinates() const { return data_;