mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Changes made as requested
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user