diff --git a/opm/simulators/wells/ALQState.cpp b/opm/simulators/wells/ALQState.cpp index 50921fe439..7037c67116 100644 --- a/opm/simulators/wells/ALQState.cpp +++ b/opm/simulators/wells/ALQState.cpp @@ -41,6 +41,12 @@ ALQState ALQState::serializationTestObject() return result; } +template +void ALQState::insert(const std::string& wname) +{ + this->current_alq_.emplace(wname, 0.0); +} + template Scalar ALQState::get(const std::string& wname) const { diff --git a/opm/simulators/wells/ALQState.hpp b/opm/simulators/wells/ALQState.hpp index 111e4397ed..404d5118de 100644 --- a/opm/simulators/wells/ALQState.hpp +++ b/opm/simulators/wells/ALQState.hpp @@ -37,6 +37,7 @@ public: Scalar get(const std::string& wname) const; void update_default(const std::string& wname, Scalar value); + void insert(const std::string& wname); void set(const std::string& wname, Scalar value); bool oscillation(const std::string& wname) const; void update_count(const std::string& wname, bool increase); diff --git a/opm/simulators/wells/WellState.hpp b/opm/simulators/wells/WellState.hpp index 4310995d49..bba0872c8e 100644 --- a/opm/simulators/wells/WellState.hpp +++ b/opm/simulators/wells/WellState.hpp @@ -277,6 +277,10 @@ public: void shutWell(int well_index); void stopWell(int well_index); + void switchToProducer(const std::string& name) { + alq_state.insert(name); + } + /// The number of phases present. int numPhases() const {