Reinforce maxStrictIter for the newton.

That was removed before in lieu of the fraction of cells that
violate CNV.
This change should make the results as before unless somebody changes
maxStrictIter or RelaxedMaxPvFraction
This commit is contained in:
Markus Blatt 2020-08-19 08:50:39 +02:00
parent f65eca3310
commit efe17780e2

View File

@ -731,7 +731,8 @@ namespace Opm {
cnvErrorPvFraction /= pvSum;
const double tol_mb = param_.tolerance_mb_;
const double tol_cnv = (cnvErrorPvFraction < param_.relaxed_max_pv_fraction_) ? param_.tolerance_cnv_relaxed_ : param_.tolerance_cnv_;
const bool use_relaxed = cnvErrorPvFraction < param_.relaxed_max_pv_fraction_ || iteration >= param_.max_strict_iter_;
const double tol_cnv = use_relaxed ? param_.tolerance_cnv_relaxed_ : param_.tolerance_cnv_;
// Finish computation
std::vector<Scalar> CNV(numComp);