NewtonIterationBlackoilInterleaved: added flag to allow to ignore solver convergence

failure.
This commit is contained in:
Robert Kloefkorn 2016-05-27 12:55:46 +02:00
parent decdd3185f
commit 7dd76cc967
2 changed files with 4 additions and 1 deletions

View File

@ -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.");
}

View File

@ -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;
}
};