diff --git a/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp b/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp index 6d4af4f02..8ac1337e0 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp @@ -169,6 +169,7 @@ struct GroupProductionProperties { std::string name; ProductionCMode gconprod_cmode = ProductionCMode::NONE; + ProductionCMode active_cmode = ProductionCMode::NONE; ExceedAction exceed_action = ExceedAction::NONE; UDAValue oil_target; UDAValue water_target; @@ -190,6 +191,7 @@ struct GroupProductionProperties { { serializer(name); serializer(gconprod_cmode); + serializer(active_cmode); serializer(exceed_action); oil_target.serializeOp(serializer); water_target.serializeOp(serializer); diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp index 62f97fa3c..81ad3fe8a 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp @@ -219,6 +219,7 @@ Group::GroupProductionProperties Group::GroupProductionProperties::serializeObje Group::GroupProductionProperties result("Group123"); result.name = "Group123"; result.gconprod_cmode = ProductionCMode::PRBL; + result.active_cmode = ProductionCMode::PRBL; result.exceed_action = ExceedAction::WELL; result.oil_target = UDAValue(1.0); result.water_target = UDAValue(2.0); @@ -236,6 +237,7 @@ Group::GroupProductionProperties Group::GroupProductionProperties::serializeObje bool Group::GroupProductionProperties::operator==(const GroupProductionProperties& other) const { return this->name == other.name && + this->active_cmode == other.active_cmode && this->gconprod_cmode == other.gconprod_cmode && this->exceed_action == other.exceed_action && this->oil_target == other.oil_target && @@ -439,7 +441,7 @@ bool Group::updateParent(const std::string& parent) { Group::ProductionControls Group::productionControls(const SummaryState& st) const { Group::ProductionControls pc; - pc.cmode = this->production_properties.gconprod_cmode; + pc.cmode = this->production_properties.active_cmode; pc.exceed_action = this->production_properties.exceed_action; pc.oil_target = UDA::eval_group_uda(this->production_properties.oil_target, this->m_name, st, this->udq_undefined); pc.water_target = UDA::eval_group_uda(this->production_properties.water_target, this->m_name, st, this->udq_undefined); diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp index 8b8fb0eca..e390b4ed0 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp @@ -367,6 +367,7 @@ namespace { auto group_ptr = std::make_shared(this->getGroup(group_name, handlerContext.currentStep)); Group::GroupProductionProperties production(group_name); production.gconprod_cmode = controlMode; + production.active_cmode = controlMode; production.oil_target = oil_target; production.gas_target = gas_target; production.water_target = water_target;