Only log messages about failed timesteps on one processes.

This OPM_THROW was introduced lately and results in all processes
logging the failure. With this commit the message is logged only once.
This commit is contained in:
Markus Blatt 2016-12-16 11:30:04 +01:00
parent 5730e4f56a
commit 51dabf36f2

View File

@ -150,7 +150,13 @@ namespace Opm
} while ( (!converged && (iteration <= maxIter())) || (iteration < minIter())); } while ( (!converged && (iteration <= maxIter())) || (iteration < minIter()));
if (!converged) { if (!converged) {
OPM_THROW(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations."); if (model_->terminalOutputEnabled()) {
OPM_THROW(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations.");
}
else
{
OPM_THROW_NOLOG(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations.");
}
} }
// Do model-specific post-step actions. // Do model-specific post-step actions.