From 20aa82e3cf2b4eeb94735b04b7707a49a787d30d Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Thu, 23 Feb 2012 23:39:57 +0100
Subject: [PATCH] Soften assertion; Add a note

---
 dune/tectonic/myblockproblem.hh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh
index 2ff07f0e..a74eda92 100644
--- a/dune/tectonic/myblockproblem.hh
+++ b/dune/tectonic/myblockproblem.hh
@@ -130,8 +130,10 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
 
     Interval<double> D;
     psi.subDiff(0, D);
-    if (D[1] >= 0)
-      assert(false);
+    if (D[1] > 0) {
+      assert(false); // NOTE: Numerical instability can actually get us here
+      return 0;
+    }
 
     int bisectionsteps = 0;
     Bisection bisection(0.0, 1.0, 1e-12, true, 0);                      // TODO
-- 
GitLab