From 5afeea1d8239290d0be8e0a355a2871cb8556cef Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Sun, 21 Jul 2013 21:18:55 +0200 Subject: [PATCH] [Algorit] Do away with an unnecessary cutoff --- dune/tectonic/minimisation.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dune/tectonic/minimisation.hh b/dune/tectonic/minimisation.hh index d1b421e6..78f291cd 100644 --- a/dune/tectonic/minimisation.hh +++ b/dune/tectonic/minimisation.hh @@ -39,11 +39,11 @@ void minimise(Functional const &J, typename Functional::SmallVector &x, for (size_t step = 0; step < steps; ++step) { SmallVector v; J.gradient(x, v); - v *= -1; - - if (v.two_norm() < 1e-14) // TODO: Make controllable + if (v.two_norm() == 0.0) return; + v *= -1; + descentMinimisation(J, x, v, bisection); } } -- GitLab