Skip to content
Snippets Groups Projects
Commit be5e12fc authored by Elias Pipping's avatar Elias Pipping
Browse files

[Algorit] (minor) Rescale for numerical stability

parent 59f8d43e
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ void minimise(Functional const &J, typename Functional::LocalVector &x,
double const vnorm = v.two_norm();
if (vnorm <= 0.0)
return;
v *= -1;
v /= -vnorm; // normalise for numerical stability; note the minus
double const alpha = lineSearch(J, x, v, bisection);
Arithmetic::addProduct(x, alpha, v);
......
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