diff --git a/dune/tectonic/minimisation.hh b/dune/tectonic/minimisation.hh index d1b421e6e9a781f1eab3b7b7cd0a149b7a4e453e..78f291cdd70ce9c48387de4066ca91b9539a8948 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); } }