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