From 93c7ba6b9267f79adbf0bf7581353d984fdea5ce Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 26 Oct 2021 11:02:29 +0200 Subject: [PATCH 1/2] communicate inj_surface_rates --- opm/simulators/wells/GroupState.cpp | 1 + opm/simulators/wells/GroupState.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/opm/simulators/wells/GroupState.cpp b/opm/simulators/wells/GroupState.cpp index ae7be4672..b85186235 100644 --- a/opm/simulators/wells/GroupState.cpp +++ b/opm/simulators/wells/GroupState.cpp @@ -38,6 +38,7 @@ bool GroupState::operator==(const GroupState& other) const { this->inj_potentials == other.inj_potentials && this->inj_rein_rates == other.inj_rein_rates && this->inj_vrep_rate == other.inj_vrep_rate && + this->inj_surface_rates == other.inj_surface_rates && this->m_grat_sales_target == other.m_grat_sales_target && this->injection_controls == other.injection_controls; } diff --git a/opm/simulators/wells/GroupState.hpp b/opm/simulators/wells/GroupState.hpp index 2c53e618b..525265cc9 100644 --- a/opm/simulators/wells/GroupState.hpp +++ b/opm/simulators/wells/GroupState.hpp @@ -112,6 +112,7 @@ public: iterateContainer(inj_red_rates, func); iterateContainer(inj_resv_rates, func); iterateContainer(inj_rein_rates, func); + iterateContainer(inj_surface_rates, func); }; // Compute the size of the data. From b9f16018ac97a2f9841dcf87938e3558ec5df068 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Thu, 28 Oct 2021 14:17:33 +0200 Subject: [PATCH 2/2] remove unused inj_potentials --- opm/simulators/wells/GroupState.cpp | 19 ------------------- opm/simulators/wells/GroupState.hpp | 4 ---- 2 files changed, 23 deletions(-) diff --git a/opm/simulators/wells/GroupState.cpp b/opm/simulators/wells/GroupState.cpp index b85186235..702a08589 100644 --- a/opm/simulators/wells/GroupState.cpp +++ b/opm/simulators/wells/GroupState.cpp @@ -35,7 +35,6 @@ bool GroupState::operator==(const GroupState& other) const { this->prod_red_rates == other.prod_red_rates && this->inj_red_rates == other.inj_red_rates && this->inj_resv_rates == other.inj_resv_rates && - this->inj_potentials == other.inj_potentials && this->inj_rein_rates == other.inj_rein_rates && this->inj_vrep_rate == other.inj_vrep_rate && this->inj_surface_rates == other.inj_surface_rates && @@ -203,23 +202,6 @@ bool GroupState::has_grat_sales_target(const std::string& gname) const { //------------------------------------------------------------------------- -void GroupState::update_injection_potentials(const std::string& gname, const std::vector& potentials) { - if (potentials.size() != this->num_phases) - throw std::logic_error("Wrong number of phases"); - - this->inj_potentials[gname] = potentials; -} - -const std::vector& GroupState::injection_potentials(const std::string& gname) const { - auto group_iter = this->inj_potentials.find(gname); - if (group_iter == this->inj_potentials.end()) - throw std::logic_error("No such group"); - - return group_iter->second; -} - -//------------------------------------------------------------------------- - bool GroupState::has_production_control(const std::string& gname) const { auto group_iter = this->production_controls.find(gname); if (group_iter == this->production_controls.end()) @@ -322,7 +304,6 @@ std::string GroupState::dump() const dump_groupmap(root, "prod_red_rates", this->prod_red_rates); dump_groupmap(root, "inj_red_rates", this->inj_red_rates); dump_groupmap(root, "inj_resv_rates", this->inj_resv_rates); - dump_groupmap(root, "inj_potentials", this->inj_potentials); dump_groupmap(root, "inj_rein_rates", this->inj_rein_rates); dump_groupmap(root, "vrep_rate", this->inj_vrep_rate); dump_groupmap(root, "grat_sales_target", this->m_grat_sales_target); diff --git a/opm/simulators/wells/GroupState.hpp b/opm/simulators/wells/GroupState.hpp index 525265cc9..98ee3994f 100644 --- a/opm/simulators/wells/GroupState.hpp +++ b/opm/simulators/wells/GroupState.hpp @@ -60,9 +60,6 @@ public: void update_injection_rein_rates(const std::string& gname, const std::vector& rates); const std::vector& injection_rein_rates(const std::string& gname) const; - void update_injection_potentials(const std::string& gname, const std::vector& potentials); - const std::vector& injection_potentials(const std::string& gname) const; - void update_injection_vrep_rate(const std::string& gname, double rate); double injection_vrep_rate(const std::string& gname) const; @@ -173,7 +170,6 @@ private: std::map> inj_red_rates; std::map> inj_surface_rates; std::map> inj_resv_rates; - std::map> inj_potentials; std::map> inj_rein_rates; std::map inj_vrep_rate; std::map m_grat_sales_target;