From 63f732d522d42127ad252dd00ee12c1e72c6d70d Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Fri, 28 Oct 2011 18:50:46 +0200
Subject: [PATCH] Re-enable fastQuadratic with safety=0

The problem was that our local coordinate system became very small
---
 src/samplefunctional.hh | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/samplefunctional.hh b/src/samplefunctional.hh
index 63849e74..f4b95091 100644
--- a/src/samplefunctional.hh
+++ b/src/samplefunctional.hh
@@ -165,16 +165,12 @@ void minimise(const Functional J, const typename Functional::SmallVector x,
            0); // We should not be minimising in this direction otherwise
   }
 
-  // WARNING:
-  // Using fastquadratic appears to be a very bad idea if D[1] is exactly zero.
-  // Huge steps that lead us back to where we came from are the result.
-  Bisection bisection(
-      0.0,    // acceptError: Stop if the search interval has
-              // become smaller than this number
-      1.0,    // acceptFactor: ?
-      1e-12,  // requiredResidual: ?
-      false,  // fastQuadratic
-      1e-14); // safety: acceptance factor for inexact minimization
+  Bisection bisection(0.0,   // acceptError: Stop if the search interval has
+                             // become smaller than this number
+                      1.0,   // acceptFactor: ?
+                      1e-12, // requiredResidual: ?
+                      true,  // fastQuadratic
+                      0); // safety: acceptance factor for inexact minimization
   int count;
   // FIXME: The value of x_old should not matter if the factor is 1.0, correct?
   double const stepsize = bisection.minimize(JRest, 0.0, 1.0, count);
-- 
GitLab