From 71e747715586dfedf70dca31934d6eb85036e0bd Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Thu, 25 Jan 2018 17:11:25 +0100
Subject: [PATCH] [newton] Pass current solution to newtonBeginStep

---
 dumux/nonlinear/newtoncontroller.hh | 5 +++--
 dumux/nonlinear/newtonmethod.hh     | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh
index 4a793a7b4d..ff5713aec1 100644
--- a/dumux/nonlinear/newtoncontroller.hh
+++ b/dumux/nonlinear/newtoncontroller.hh
@@ -206,7 +206,7 @@ public:
      * \param u The initial solution
      */
     template<class SolutionVector>
-    void newtonBegin(const SolutionVector &u)
+    void newtonBegin(const SolutionVector& u)
     {
         numSteps_ = 0;
     }
@@ -214,7 +214,8 @@ public:
     /*!
      * \brief Indicates the beginning of a Newton iteration.
      */
-    void newtonBeginStep()
+    template<class SolutionVector>
+    void newtonBeginStep(const SolutionVector& u)
     {
         lastShift_ = shift_;
         if (numSteps_ == 0)
diff --git a/dumux/nonlinear/newtonmethod.hh b/dumux/nonlinear/newtonmethod.hh
index 139ff4163e..812702a252 100644
--- a/dumux/nonlinear/newtonmethod.hh
+++ b/dumux/nonlinear/newtonmethod.hh
@@ -102,7 +102,7 @@ public:
             {
                 // notify the controller that we're about to start
                 // a new timestep
-                controller_->newtonBeginStep();
+                controller_->newtonBeginStep(uCurrentIter);
 
                 // make the current solution to the old one
                 if (controller_->newtonNumSteps() > 0)
-- 
GitLab