Skip to content
Snippets Groups Projects
Commit dbd788e5 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

bugfix in compute_dDR_dv: the result needs to be projected onto the tangent space of SO(3)

[[Imported from SVN: r8565]]
parent 07ec8dbd
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
#include "localgeodesicfefunction.hh"
#include <dune/gfe/rigidbodymotion.hh>
#include <dune/gfe/tensor3.hh>
#include <dune/gfe/orthogonalmatrix.hh>
template<class GridView, class LocalFiniteElement, int dim>
class CosseratEnergyLocalStiffness
......@@ -179,6 +180,26 @@ public: // for testing
for (int l=0; l<4; l++)
dDR_dv[i][j][k][v_i] += dd_dq[j][i][l] * derOfGradientWRTCoefficient[l+3][v_i+3][k];
// Project onto the tangent space at M(q)
Dune::FieldMatrix<double,3,3> Mtmp;
value.q.matrix(Mtmp);
OrthogonalMatrix<double,3> M(Mtmp);
for (int k=0; k<gridDim; k++)
for (int v_i=0; v_i<4; v_i++) {
Dune::FieldMatrix<double,3,3> unprojected;
for (int i=0; i<3; i++)
for (int j=0; j<3; j++)
unprojected[i][j] = dDR_dv[i][j][k][v_i];
Dune::FieldMatrix<double,3,3> projected = M.projectOntoTangentSpace(unprojected);
for (int i=0; i<3; i++)
for (int j=0; j<3; j++)
dDR_dv[i][j][k][v_i] = projected[i][j];
}
}
public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment