Add GPMaint::State member to GroupState

This commit is contained in:
Joakim Hove 2021-09-01 21:36:13 +02:00
parent fcdb4c33ea
commit bb23993556
2 changed files with 14 additions and 0 deletions

View File

@ -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 {

View File

@ -26,6 +26,8 @@
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.hpp>
#include <opm/simulators/wells/WellContainer.hpp>
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<class Comm>
void communicate_rates(const Comm& comm)
@ -165,6 +169,7 @@ private:
std::map<std::pair<Phase, std::string>, Group::InjectionCMode> injection_controls;
WellContainer<GPMaint::State> gpmaint_state;
};
}