-Added exception TooManyIterations

-Combined log messages from NonLinearSolver_impl.hpp and AdaptiveTimeStepping_impl.hpp
This commit is contained in:
Rohith Nair
2017-05-23 16:34:36 +02:00
parent e5732ea0a7
commit c12665e04f
2 changed files with 4 additions and 10 deletions

View File

@@ -24,6 +24,7 @@
#define OPM_NONLINEARSOLVER_IMPL_HEADER_INCLUDED
#include <opm/autodiff/NonlinearSolver.hpp>
#include </data/DataExchange/Rohith/opm_dev/opm-common/opm/common/Exceptions.hpp>
#include <opm/common/Exceptions.hpp>
#include <opm/common/ErrorMacros.hpp>
@@ -162,11 +163,8 @@ namespace Opm
if (!converged) {
failureReport_ += report;
std::string msg = "Failed to complete a time step within " + std::to_string(maxIter()) + " iterations.";
if (model_->terminalOutputEnabled()) {
OpmLog::problem(msg);
}
OPM_THROW_NOLOG(Opm::NumericalProblem, msg);
std::string msg = "Solver convergence failure - Failed to complete a time step within " + std::to_string(maxIter()) + " iterations.";
OPM_THROW_NOLOG(Opm::TooManyIterations, msg);
}
// Do model-specific post-step actions.