From 11602873c91896e7582a6cc46cfd437a04acab51 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Mon, 31 Oct 2011 17:40:36 +0100
Subject: [PATCH] Remove assertion

---
 src/samplefunctional.hh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/samplefunctional.hh b/src/samplefunctional.hh
index a6a2d553..70d92c71 100644
--- a/src/samplefunctional.hh
+++ b/src/samplefunctional.hh
@@ -174,8 +174,19 @@ void minimise(Functional const J, typename Functional::SmallVector &x,
       dverb << "## Directional derivative (as per subdifferential of "
                "restriction): " << D[1] << " (coordinates of the restriction)"
             << std::endl;
-      assert(D[1] <=
-             0); // We should not be minimising in this direction otherwise
+      /*
+        It is possible that this differs quite a lot from the
+        directional derivative computed in the descentDirection()
+        method:
+
+        If phi is nonsmooth at x, so that the directional
+        derivatives jump, and |x| is computed to be too small or too
+        large globally or locally, the locally computed
+        subdifferential and the globally computed subdifferential
+        will no longer coincide!
+
+        The assertion D[1] <= 0 may thus fail.
+      */
     }
 
     int count;
-- 
GitLab