mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3303 from akva2/gasliftstage2_drop_simulator_param
GasLiftStage2: drop simulator param
This commit is contained in:
commit
8332909498
@ -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();
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ namespace Opm
|
||||
{
|
||||
template<class TypeTag>
|
||||
class GasLiftStage2 {
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>;
|
||||
using GLiftOptWells = std::map<std::string,std::unique_ptr<GasLiftSingleWell>>;
|
||||
using GLiftProdWells = std::map<std::string,const WellInterface<TypeTag> *>;
|
||||
@ -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_ ) :
|
||||
|
@ -36,8 +36,11 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
GasLiftStage2<TypeTag>::
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
/********************************************
|
||||
|
Loading…
Reference in New Issue
Block a user