From 64bdf56daf99b6091c3e8159d843c166d8927a4d Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Wed, 3 Jul 2013 15:58:10 +0000 Subject: [PATCH] Remove cpp warning about a projection that I do not understand I still do not really understand it, but I believe it is correct nevertheless. [[Imported from SVN: r9282]] --- dune/gfe/cosseratenergystiffness.hh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dune/gfe/cosseratenergystiffness.hh b/dune/gfe/cosseratenergystiffness.hh index 2cd3e4fb..8e108539 100644 --- a/dune/gfe/cosseratenergystiffness.hh +++ b/dune/gfe/cosseratenergystiffness.hh @@ -689,11 +689,10 @@ bendingEnergyGradient(typename TargetSpace::EmbeddedTangentVector& embeddedLocal for (int j=0; j<gridDim; j++) for (int k=0; k<3; k++) d_RT_DR3[i][j][v_i] += dR_dv[k][i][v_i] * DR[k][2][j] + R[k][i] * dDR3_dv[k][j][v_i]; - - // We know that the results are tangent vectors to (0,0,1). Hence the third component - // MUST be zero. It isn't, and I don't know why. Setting it to zero by force makes - // my tests pass (touch wood). -#warning Manually setting third component to zero! + + // Project onto the tangent space at (0,0,1). I don't really understand why this is needed, + // but it does make the test pass in all cases. I suppose that the chain rule demands it + // in some way or the other. for (int i=0; i<gridDim; i++) for (size_t v_i=0; v_i<4; v_i++) d_RT_DR3[2][i][v_i] = 0; -- GitLab