mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
NewtonIterationBlackoilInterleaved: added flag to allow to ignore solver convergence
failure.
This commit is contained in:
parent
decdd3185f
commit
7dd76cc967
@ -486,7 +486,7 @@ namespace Opm
|
||||
iterations_ = result.iterations;
|
||||
|
||||
// Check for failure of linear solver.
|
||||
if (!result.converged) {
|
||||
if (!parameters_.ignoreConvergenceFailure_ && !result.converged) {
|
||||
OPM_THROW(LinearSolverProblem, "Convergence failure for linear solver.");
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ namespace Opm
|
||||
int linear_solver_verbosity_;
|
||||
bool newton_use_gmres_;
|
||||
bool require_full_sparsity_pattern_;
|
||||
bool ignoreConvergenceFailure_;
|
||||
|
||||
NewtonIterationBlackoilInterleavedParameters() { reset(); }
|
||||
// read values from parameter class
|
||||
@ -57,6 +58,7 @@ namespace Opm
|
||||
linear_solver_restart_ = param.getDefault("linear_solver_restart", linear_solver_restart_);
|
||||
linear_solver_verbosity_ = param.getDefault("linear_solver_verbosity", linear_solver_verbosity_);
|
||||
require_full_sparsity_pattern_ = param.getDefault("require_full_sparsity_pattern", require_full_sparsity_pattern_);
|
||||
ignoreConvergenceFailure_ = param.getDefault("linear_solver_ignoreconvergencefailure", ignoreConvergenceFailure_);
|
||||
}
|
||||
|
||||
// set default values
|
||||
@ -68,6 +70,7 @@ namespace Opm
|
||||
linear_solver_restart_ = 40;
|
||||
linear_solver_verbosity_ = 0;
|
||||
require_full_sparsity_pattern_ = false;
|
||||
ignoreConvergenceFailure_ = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user