mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 04:23:48 -06:00
Merge pull request #2739 from blattms/fixed-relaxed-tol-logic
Finally fix selection for relaxed tolerance.
This commit is contained in:
commit
d55628bd8d
@ -729,7 +729,11 @@ namespace Opm {
|
||||
cnvErrorPvFraction /= pvSum;
|
||||
|
||||
const double tol_mb = param_.tolerance_mb_;
|
||||
const bool use_relaxed = cnvErrorPvFraction < param_.relaxed_max_pv_fraction_ || iteration >= param_.max_strict_iter_;
|
||||
// Default value of relaxed_max_pv_fraction_ is 1 and
|
||||
// max_strict_iter_ is 8. Hence only iteration chooses
|
||||
// whether to use relaxed or not.
|
||||
// To activate only fraction use fraction below 1 and iter 0.
|
||||
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
|
||||
|
@ -63,7 +63,7 @@ NEW_PROP_TAG(MaxInnerIterWells);
|
||||
SET_SCALAR_PROP(FlowModelParameters, DbhpMaxRel, 1.0);
|
||||
SET_SCALAR_PROP(FlowModelParameters, DwellFractionMax, 0.2);
|
||||
SET_SCALAR_PROP(FlowModelParameters, MaxResidualAllowed, 1e7);
|
||||
SET_SCALAR_PROP(FlowModelParameters, RelaxedMaxPvFraction, .0);
|
||||
SET_SCALAR_PROP(FlowModelParameters, RelaxedMaxPvFraction, 1.0);
|
||||
SET_SCALAR_PROP(FlowModelParameters, ToleranceMb, 1e-6);
|
||||
SET_SCALAR_PROP(FlowModelParameters, ToleranceCnv,1e-2);
|
||||
SET_SCALAR_PROP(FlowModelParameters, ToleranceCnvRelaxed, 1e9);
|
||||
|
Loading…
Reference in New Issue
Block a user