Changes made as requested

This commit is contained in:
Rohith Nair
2017-06-07 14:40:18 +02:00
parent c12665e04f
commit 348cb5e5a4

View File

@@ -60,9 +60,10 @@ namespace Opm {
{
if( verbose )
{
std::ostringstream message;
message << "Caught Exception: " << exception.what();
OpmLog::debug(message.str());
std::string message;
message = "Caught Exception: ";
message += exception.what();
OpmLog::debug(message);
}
}
}
@@ -227,6 +228,7 @@ namespace Opm {
}
SimulatorReport substepReport;
std::string cause_of_failure = "";
try {
substepReport = solver.step( substepTimer, state, well_state);
report += substepReport;
@@ -238,6 +240,7 @@ namespace Opm {
}
catch (const Opm::NumericalProblem& e) {
substepReport += solver.failureReport();
cause_of_failure = e.what();
detail::logException(e, solver_verbose_);
// since linearIterations is < 0 this will restart the solver
@@ -349,8 +352,8 @@ namespace Opm {
substepTimer.provideTimeStepEstimate( newTimeStep );
if( solver_verbose_ ) {
std::string msg;
msg = "Solver convergence failed, cutting timestep to "
+ std::to_string(unit::convert::to( substepTimer.currentStepLength(), unit::day )) + " days.\n";
msg = cause_of_failure + "\n Timestep chopped to "
+ std::to_string(unit::convert::to( substepTimer.currentStepLength(), unit::day )) + " days.\n";
OpmLog::problem(msg);
}
// reset states