From 5ff696538936571557429ea8630d83362a386944 Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@mi.fu-berlin.de> Date: Fri, 21 Oct 2011 14:00:01 +0000 Subject: [PATCH] don't let the class inherit from gridfunction because there is no derivative type implemented for functions with values in manifolds [[Imported from SVN: r7985]] --- dune/gfe/globalgeodesicfefunction.hh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dune/gfe/globalgeodesicfefunction.hh b/dune/gfe/globalgeodesicfefunction.hh index a85e0de5..70e370bd 100644 --- a/dune/gfe/globalgeodesicfefunction.hh +++ b/dune/gfe/globalgeodesicfefunction.hh @@ -8,16 +8,14 @@ #include <dune/gfe/localgeodesicfefunction.hh> -#include <dune/fufem/functions/virtualgridfunction.hh> - /** \brief Global geodesic finite element function. * * \tparam B - The global basis type. * \tparam TargetSpace - The manifold that this functions takes its values in. - * \tparam CoefficientType - The coefficient vector type. */ -template<class B, class TargetSpace, class CoefficientType> -GlobalGeodesicFEFunction : public VirtualGridFunction<typename Basis::GridView::Grid, TargetSpace> { +template<class B, class TargetSpace> +class GlobalGeodesicFEFunction +{ public: typedef B Basis; @@ -38,15 +36,16 @@ public: //! Create global function by a global basis and the corresponding coefficient vector - GlobalGeodesicFEFunction(const Basis& basis, const CoefficientType& coefficients) : + GlobalGeodesicFEFunction(const Basis& basis, const std::vector<TargetSpace>& coefficients) : basis_(basis), coefficients_(coefficients) {} + /** \brief Evaluate the function at local coordinates. */ void evaluateLocal(const Element& element, const Dune::FieldVector<ctype,gridDim>& local, TargetSpace& out) const { - int numOfBasisFct = basis_.getLocalFiniteElement(element).size(); + int numOfBaseFct = basis_.getLocalFiniteElement(element).localBasis().size(); // Extract local coefficients std::vector<TargetSpace> localCoeff(numOfBaseFct); @@ -63,7 +62,7 @@ public: void evaluateDerivativeLocal(const Element& element, const Dune::FieldVector<ctype,gridDim>& local, Dune::FieldMatrix<ctype, embeddedDim, gridDim>& out) const { - int numOfBasisFct = basis_.getLocalFiniteElement(element).size(); + int numOfBaseFct = basis_.getLocalFiniteElement(element).localBasis().size(); // Extract local coefficients std::vector<TargetSpace> localCoeff(numOfBaseFct); @@ -88,6 +87,6 @@ private: //! The global basis const Basis& basis_; //! The coefficient vector - const CoefficientType& coefficients_; + const std::vector<TargetSpace>& coefficients_; }; #endif -- GitLab