From 31d003bbcbbb05a1be82b84a15ff4759991602b7 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Tue, 20 Sep 2016 11:12:47 +0200
Subject: [PATCH] In verbose mode, print a message if the initial iterate is
 accepted

Previously, if the subdifferential at the initial iterate would contain zero,
no message would be written at all.  This made it more difficult to follow
the programm output, because it was impossible to see how many times
the bisection method was called.
---
 dune/tnnmg/problem-classes/bisection.hh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dune/tnnmg/problem-classes/bisection.hh b/dune/tnnmg/problem-classes/bisection.hh
index f315f28..2a7d14b 100644
--- a/dune/tnnmg/problem-classes/bisection.hh
+++ b/dune/tnnmg/problem-classes/bisection.hh
@@ -74,7 +74,11 @@ class Bisection
             J.subDiff(x, DJ);
             ++count;
             if (DJ.containsZero(safety_))
+            {
+                if (verbosity > 0)
+                    std::cout << "Bisection: initial iterate " << x << " accepted, DJ = " << DJ << std::endl;
                 return x;
+            }
 
             // compute initial interval
             // if quadratic part is strictly positive we can compute one bound from the other
-- 
GitLab