From e5e7ff7287b75ff6b815213fe3face2b31f3cfee Mon Sep 17 00:00:00 2001 From: Vegard Kippe Date: Tue, 27 Jun 2023 13:40:24 +0200 Subject: [PATCH] Now using value (also default) from EQLDIMS item 2, unless --num-pressure-points-equil=N is specified on the command line. --- ebos/eclproblem.hh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 16da1e8e2..b2de7c04f 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -91,6 +91,8 @@ #include +#include + #include #include #include @@ -592,7 +594,7 @@ struct OutputMode { // Parameterize equilibration accuracy template struct NumPressurePointsEquil { - static constexpr int value = 2000; + static constexpr int value = ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue; }; @@ -821,7 +823,17 @@ public: this->maxTimeStepAfterWellEvent_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent); this->restartShrinkFactor_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclRestartShrinkFactor); this->maxFails_ = EWOMS_GET_PARAM(TypeTag, unsigned, MaxTimeStepDivisions); - this->numPressurePointsEquil_ = EWOMS_GET_PARAM(TypeTag, int, NumPressurePointsEquil); + + // The value N for this parameter is defined in the following order of presedence: + // 1. Command line value (--num-pressure-points-equil=N) + // 2. EQLDIMS item 2 + // Default value is defined in opm-common/src/opm/input/eclipse/share/keywords/000_Eclipse100/E/EQLDIMS + if (EWOMS_PARAM_IS_SET(TypeTag, int, NumPressurePointsEquil)) + { + this->numPressurePointsEquil_ = EWOMS_GET_PARAM(TypeTag, int, NumPressurePointsEquil); + } else { + this->numPressurePointsEquil_ = simulator.vanguard().eclState().getTableManager().getEqldims().getNumDepthNodesP(); + } RelpermDiagnostics relpermDiagnostics; relpermDiagnostics.diagnosis(vanguard.eclState(), vanguard.cartesianIndexMapper());