Skip to content
Snippets Groups Projects
Commit c5e5a9c2 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Fix scaling of the FD gradient used for testing

The formula for the FD gradient never took the distance between
the two Lagrange points into account, even though the gradient
of an interpolation function clearly depends on it.

(cherry picked from commit 7f326ded)
parent e3c98486
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,10 @@ void testDerivativeOfInterpolatedPosition()
}
// Scale the finite difference gradient with the interval length
for (auto& parDer : fdGrad)
parDer /= intervalLength;
// Compute analytical velocity vector gradient
RodLocalStiffness<OneDGrid,double>::interpolationVelocityDerivative(q[i], q[j], s, intervalLength, grad);
......
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