From 8bc3cec892fe4594789ef97b09d183facbb09166 Mon Sep 17 00:00:00 2001
From: Lisa Julia Nebel <lisa_julia.nebel@tu-dresden.de>
Date: Thu, 10 Jun 2021 11:13:45 +0200
Subject: [PATCH] Correct the calculation of the derivative of a
 LocalProjectedFEFunction for the general case

---
 dune/gfe/localprojectedfefunction.hh | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/dune/gfe/localprojectedfefunction.hh b/dune/gfe/localprojectedfefunction.hh
index 20d43d5e..237b0ab8 100644
--- a/dune/gfe/localprojectedfefunction.hh
+++ b/dune/gfe/localprojectedfefunction.hh
@@ -152,17 +152,7 @@ namespace Dune {
 
       auto derivativeOfProjection = TargetSpace::derivativeOfProjection(embeddedInterpolation);
 
-      typename LocalProjectedFEFunction<dim,ctype,LocalFiniteElement,TargetSpace>::DerivativeType result;
-
-      for (size_t i=0; i<result.N(); i++)
-        for (size_t j=0; j<result.M(); j++)
-        {
-          result[i][j] = 0;
-          for (size_t k=0; k<derivativeOfProjection.M(); k++)
-            result[i][j] += derivativeOfProjection[i][k]*derivative[k][j];
-        }
-
-      return result;
+      return derivativeOfProjection*derivative;
     }
 
     /** \brief Interpolate in an embedding Euclidean space, and project back onto the Riemannian manifold -- specialization for SO(3)
-- 
GitLab