From a44f417b5ba7bb3d5a5fc36efc51e839d8bdea14 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Wed, 13 Jul 2011 08:21:08 +0000
Subject: [PATCH] bugfix for the full continuum case

[[Imported from SVN: r7558]]
---
 dune/gfe/cosseratenergystiffness.hh | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/dune/gfe/cosseratenergystiffness.hh b/dune/gfe/cosseratenergystiffness.hh
index 51ab17e0..dbf46d09 100644
--- a/dune/gfe/cosseratenergystiffness.hh
+++ b/dune/gfe/cosseratenergystiffness.hh
@@ -240,22 +240,14 @@ energy(const Entity& element,
         value.q.getFirstDerivativesOfDirectors(dd_dq);
         
         //
-        Tensor3<double,3,3,3> DR;
+        Tensor3<double,3,3,3> DR(0);
         for (int i=0; i<3; i++)
             for (int j=0; j<3; j++)
                 for (int k=0; k<gridDim; k++) {
-                    DR[i][j][k] = 0;
                     for (int l=0; l<4; l++)
                         DR[i][j][k] += dd_dq[i][j][l] * DR_quat[l][k];
                 }
         
-        // If the grid is only 2d we fill up the partial derivatives wrt z by zeros
-        for (int i=0; i<3; i++)
-            for (int j=0; j<3; j++)
-                DR[i][j][2] = 0;
-        
-            
-            
         // Add the local energy density
         energy += weight * thickness_ * quadraticMembraneEnergy(U);
         energy += weight * thickness_ * curvatureEnergy(DR);
-- 
GitLab