From c5788af428b5c9ecf6fc6b974a6cc0b10d6bd639 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Sun, 25 Sep 2011 17:43:14 +0000
Subject: [PATCH] fix another place where simplex grids where hardcoded

[[Imported from SVN: r7848]]
---
 dune/gfe/localgeodesicfefunction.hh | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/dune/gfe/localgeodesicfefunction.hh b/dune/gfe/localgeodesicfefunction.hh
index d47d8ab5..fd6b2765 100644
--- a/dune/gfe/localgeodesicfefunction.hh
+++ b/dune/gfe/localgeodesicfefunction.hh
@@ -598,21 +598,12 @@ public:
         Dune::FieldMatrix<ctype, embeddedDim, dim> result(0);
         
         // get translation part
-        for (int i=0; i<translationCoefficients_.size(); i++) {
-         
-            // get derivative of shape function
-            Dune::FieldVector<ctype,dim> sfDer;
-            if (i==0)
-                sfDer = -1;
-            else
-                for (int j=0; j<dim; j++)
-                    sfDer[j] = (i-1)==j;
-            
-            for (int j=0; j<3; j++)
-                result[j].axpy(translationCoefficients_[i][j], sfDer);
-            
-        }
+        std::vector<Dune::FieldMatrix<ctype,1,dim> > sfDer(translationCoefficients_.size());
+        localFiniteElement_.localBasis().evaluateJacobian(local, sfDer);
         
+        for (int i=0; i<translationCoefficients_.size(); i++)
+            for (int j=0; j<3; j++)
+                result[j].axpy(translationCoefficients_[i][j], sfDer[i][0]);
         
         // get orientation part
         Dune::FieldMatrix<ctype,4,dim> qResult = orientationFEFunction_->evaluateDerivative(local);
-- 
GitLab