diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index 7806ea5ac..da495f39e 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -1108,7 +1108,12 @@ namespace Opm { GLiftWellStateMap &glift_well_state_map) { - GasLiftStage2 glift {this->phaseUsage(), ebosSimulator_, deferred_logger, this->wellState(), + GasLiftStage2 glift {this->ebosSimulator_.episodeIndex(), + this->ebosSimulator_.vanguard().grid().comm(), + this->phaseUsage(), + ebosSimulator_.vanguard().schedule(), + ebosSimulator_.vanguard().summaryState(), + deferred_logger, this->wellState(), prod_wells, glift_wells, glift_well_state_map}; glift.runOptimize(); } diff --git a/opm/simulators/wells/GasLiftStage2.hpp b/opm/simulators/wells/GasLiftStage2.hpp index 351a7ed94..53e6f4f1d 100644 --- a/opm/simulators/wells/GasLiftStage2.hpp +++ b/opm/simulators/wells/GasLiftStage2.hpp @@ -51,7 +51,6 @@ namespace Opm { template class GasLiftStage2 { - using Simulator = GetPropType; using GasLiftSingleWell = ::Opm::GasLiftSingleWell; using GLiftOptWells = std::map>; using GLiftProdWells = std::map *>; @@ -71,8 +70,11 @@ namespace Opm static const int Gas = BlackoilPhases::Vapour; public: GasLiftStage2( + const int report_step_idx, + const Communication& comm, const PhaseUsage& phase_usage, - const Simulator &ebos_simulator, + const Schedule& schedule, + const SummaryState& summary_state, DeferredLogger &deferred_logger, WellState &well_state, GLiftProdWells &prod_wells, @@ -131,7 +133,6 @@ namespace Opm DeferredLogger &deferred_logger_; - const Simulator &ebos_simulator_; WellState &well_state_; GLiftProdWells &prod_wells_; GLiftOptWells &stage1_wells_; @@ -148,7 +149,6 @@ namespace Opm bool debug_; int max_iterations_ = 1000; //int time_step_idx_; - int nonlinear_iteration_idx_; struct OptimizeState { OptimizeState( GasLiftStage2 &parent_, const Group &group_ ) : diff --git a/opm/simulators/wells/GasLiftStage2_impl.hpp b/opm/simulators/wells/GasLiftStage2_impl.hpp index bcd398985..33c008729 100644 --- a/opm/simulators/wells/GasLiftStage2_impl.hpp +++ b/opm/simulators/wells/GasLiftStage2_impl.hpp @@ -36,8 +36,11 @@ namespace Opm { template GasLiftStage2:: GasLiftStage2( + const int report_step_idx, + const Communication& comm, const PhaseUsage& phase_usage, - const Simulator &ebos_simulator, + const Schedule& schedule, + const SummaryState& summary_state, DeferredLogger &deferred_logger, WellState &well_state, GLiftProdWells &prod_wells, @@ -45,24 +48,20 @@ GasLiftStage2( GLiftWellStateMap &state_map ) : deferred_logger_{deferred_logger}, - ebos_simulator_{ebos_simulator}, well_state_{well_state}, prod_wells_{prod_wells}, stage1_wells_{glift_wells}, well_state_map_{state_map}, - report_step_idx_{ebos_simulator_.episodeIndex()}, - summary_state_{ebos_simulator_.vanguard().summaryState()}, - schedule_{ebos_simulator.vanguard().schedule()}, + report_step_idx_{report_step_idx}, + summary_state_{summary_state}, + schedule_{schedule}, phase_usage_{phase_usage}, glo_{schedule_.glo(report_step_idx_)}, - comm_{ebos_simulator.vanguard().grid().comm()}, + comm_{comm}, debug_{false} { // this->time_step_idx_ // = this->ebos_simulator_.model().newtonMethod().currentTimeStep(); - this->nonlinear_iteration_idx_ - = this->ebos_simulator_.model().newtonMethod().numIterations(); - } /********************************************