From bf29a12fd54b565b02acee4373c1bdf2075ff06f Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Wed, 11 Jan 2012 16:34:36 +0000 Subject: [PATCH] remove some unnecessarily complex code [[Imported from SVN: r8364]] --- dune/gfe/cosseratenergystiffness.hh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/dune/gfe/cosseratenergystiffness.hh b/dune/gfe/cosseratenergystiffness.hh index bb194a25..72085da3 100644 --- a/dune/gfe/cosseratenergystiffness.hh +++ b/dune/gfe/cosseratenergystiffness.hh @@ -190,20 +190,13 @@ public: RT bendingEnergy(const Dune::FieldMatrix<double,dim,dim>& R, const Tensor3<double,3,3,3>& DR) const { - // The derivative of the third director - /** \brief There is no real need to have DR3 as a separate object */ - Dune::FieldMatrix<double,3,3> DR3; - for (int i=0; i<3; i++) - for (int j=0; j<3; j++) - DR3[i][j] = DR[i][2][j]; - - // left-multiply with R^T + // left-multiply the derivative of the third director (in DR[][2][]) with R^T Dune::FieldMatrix<double,3,3> RT_DR3; for (int i=0; i<3; i++) for (int j=0; j<3; j++) { RT_DR3[i][j] = 0; for (int k=0; k<3; k++) - RT_DR3[i][j] += R[k][i] * DR3[k][j]; + RT_DR3[i][j] += R[k][i] * DR[k][2][j]; } -- GitLab