diff --git a/opm/models/nonlinear/newtonmethod.hh b/opm/models/nonlinear/newtonmethod.hh index 75380906e..4a0938a8e 100644 --- a/opm/models/nonlinear/newtonmethod.hh +++ b/opm/models/nonlinear/newtonmethod.hh @@ -614,6 +614,8 @@ protected: */ void beginIteration_() { + // start with a clean message stream + endIterMsgStream_.str(""); const auto& comm = simulator_.gridView().comm(); bool succeeded = true; try { @@ -891,8 +893,6 @@ protected: << " error: " << error_ << endIterMsg().str() << "\n" << std::flush; } - - endIterMsgStream_.str(""); } /*! diff --git a/opm/models/utils/start.hh b/opm/models/utils/start.hh index 11fab3f71..ff9ddb595 100644 --- a/opm/models/utils/start.hh +++ b/opm/models/utils/start.hh @@ -279,7 +279,7 @@ static inline void resetTerminal_(int signum) * \param argv The array of the command line arguments */ template -static inline int start(int argc, char **argv) +static inline int start(int argc, char **argv, bool registerParams=true) { typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; @@ -303,7 +303,7 @@ static inline int start(int argc, char **argv) int myRank = 0; try { - int paramStatus = setupParameters_(argc, const_cast(argv)); + int paramStatus = setupParameters_(argc, const_cast(argv), registerParams); if (paramStatus == 1) return 1; if (paramStatus == 2)