From bb23993556496ecf4477792b0456ff8143ac4012 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 1 Sep 2021 21:36:13 +0200 Subject: [PATCH] Add GPMaint::State member to GroupState --- opm/simulators/wells/GroupState.cpp | 9 +++++++++ opm/simulators/wells/GroupState.hpp | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/opm/simulators/wells/GroupState.cpp b/opm/simulators/wells/GroupState.cpp index 531f8f867..f663f5e99 100644 --- a/opm/simulators/wells/GroupState.cpp +++ b/opm/simulators/wells/GroupState.cpp @@ -237,6 +237,15 @@ Group::InjectionCMode GroupState::injection_control(const std::string& gname, Ph return group_iter->second; } +//------------------------------------------------------------------------- + +GPMaint::State& GroupState::gpmaint(const std::string& gname) { + if (!this->gpmaint_state.has(gname)) + this->gpmaint_state.add(gname, GPMaint::State{}); + return this->gpmaint_state[gname]; +} + + //------------------------------------------------------------------------- namespace { diff --git a/opm/simulators/wells/GroupState.hpp b/opm/simulators/wells/GroupState.hpp index 3ed810852..e8504963b 100644 --- a/opm/simulators/wells/GroupState.hpp +++ b/opm/simulators/wells/GroupState.hpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include namespace Opm { @@ -75,6 +77,8 @@ public: std::size_t collect(double * data) const; std::size_t distribute(const double * data); + GPMaint::State& gpmaint(const std::string& gname); + template void communicate_rates(const Comm& comm) @@ -165,6 +169,7 @@ private: std::map, Group::InjectionCMode> injection_controls; + WellContainer gpmaint_state; }; }