Adapt to make logging possible from ebos

This commit is contained in:
Tor Harald Sandve 2019-10-07 14:51:50 +02:00
parent 596cb21e20
commit a245f70283
2 changed files with 4 additions and 4 deletions
opm/models

View File

@ -614,6 +614,8 @@ protected:
*/ */
void beginIteration_() void beginIteration_()
{ {
// start with a clean message stream
endIterMsgStream_.str("");
const auto& comm = simulator_.gridView().comm(); const auto& comm = simulator_.gridView().comm();
bool succeeded = true; bool succeeded = true;
try { try {
@ -891,8 +893,6 @@ protected:
<< " error: " << error_ << " error: " << error_
<< endIterMsg().str() << "\n" << std::flush; << endIterMsg().str() << "\n" << std::flush;
} }
endIterMsgStream_.str("");
} }
/*! /*!

View File

@ -279,7 +279,7 @@ static inline void resetTerminal_(int signum)
* \param argv The array of the command line arguments * \param argv The array of the command line arguments
*/ */
template <class TypeTag> template <class TypeTag>
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, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
@ -303,7 +303,7 @@ static inline int start(int argc, char **argv)
int myRank = 0; int myRank = 0;
try try
{ {
int paramStatus = setupParameters_<TypeTag>(argc, const_cast<const char**>(argv)); int paramStatus = setupParameters_<TypeTag>(argc, const_cast<const char**>(argv), registerParams);
if (paramStatus == 1) if (paramStatus == 1)
return 1; return 1;
if (paramStatus == 2) if (paramStatus == 2)