mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
-Added exception TooManyIterations
-Combined log messages from NonLinearSolver_impl.hpp and AdaptiveTimeStepping_impl.hpp
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user