From c1e10d81ba79010e8536c459528f9ae480e51500 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 6 Jan 2021 15:10:05 +0100 Subject: [PATCH] Use ScheduleState to access nupcol --- opm/simulators/wells/BlackoilWellModel_impl.hpp | 4 ++-- opm/simulators/wells/StandardWell_impl.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index b9bda118b..5a62dea28 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -1391,7 +1391,7 @@ namespace Opm { { const int reportStepIdx = ebosSimulator_.episodeIndex(); const Group& fieldGroup = schedule().getGroup("FIELD", reportStepIdx); - const int nupcol = schedule().getNupcol(reportStepIdx); + const int nupcol = schedule()[reportStepIdx].nupcol(); const int iterationIdx = ebosSimulator_.model().newtonMethod().numIterations(); // This builds some necessary lookup structures, so it must be called @@ -1977,7 +1977,7 @@ namespace Opm { { const int reportStepIdx = ebosSimulator_.episodeIndex(); - const int nupcol = schedule().getNupcol(reportStepIdx); + const int nupcol = schedule()[reportStepIdx].nupcol(); const int iterationIdx = ebosSimulator_.model().newtonMethod().numIterations(); // don't switch group control when iterationIdx > nupcol // to avoid oscilations between group controls diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index ab94038c9..492c2fab2 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -2715,7 +2715,7 @@ namespace Opm const GasLiftOpt& glo = schedule.glo(report_step_idx); const int iteration_idx = ebos_simulator.model().newtonMethod().numIterations(); if (glo.all_newton()) { - const int nupcol = schedule.getNupcol(report_step_idx); + const int nupcol = schedule[report_step_idx].nupcol(); if (this->glift_debug) { const std::string msg = fmt::format( "LIFTOPT item4 == YES, it = {}, nupcol = {} --> GLIFT optimize = {}",