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

Fix an index bug in evaluateFDDerivativeOfGradientWRTCoefficient

This change makes the localgeodesicfefunction test fail again.
So there must be a bug in the corresponding non-finite-difference
code.  Looking at simplex cases confirms me in this opinion.
But I don't find the bug...

[[Imported from SVN: r8463]]
parent f2092500
No related branches found
No related tags found
No related merge requests found
......@@ -549,18 +549,22 @@ evaluateFDDerivativeOfGradientWRTCoefficient(const Dune::FieldVector<ctype, dim>
result[j] = hPlus;
result[j] -= hMinus;
result[j] /= 2*eps;
}
for (int j=0; j<embeddedDim; j++) {
TargetSpace q = evaluate(local);
Dune::FieldVector<double,embeddedDim> foo;
for (int l=0; l<dim; l++) {
for (int k=0; k<embeddedDim; k++)
foo[k] = result[j][k][l];
foo[k] = result[k][j][l];
foo = q.projectOntoTangentSpace(foo);
for (int k=0; k<embeddedDim; k++)
result[j][k][l] = foo[k];
result[k][j][l] = foo[k];
}
......
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