From 08f8a381b0725191d95a89819f57bf23f8baa791 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 11 Nov 2020 07:10:08 +0100 Subject: [PATCH] Update INTEHEAD[51] value based on presence of GCONPROD / GCONINJE --- src/opm/output/eclipse/CreateInteHead.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/opm/output/eclipse/CreateInteHead.cpp b/src/opm/output/eclipse/CreateInteHead.cpp index 6151eb132..dedc2cf5c 100755 --- a/src/opm/output/eclipse/CreateInteHead.cpp +++ b/src/opm/output/eclipse/CreateInteHead.cpp @@ -106,16 +106,22 @@ namespace { if (report_step == std::size_t{0}) { return gctrl; } + bool have_gconprod = false; + bool have_gconinje = false; for (const auto& group_name : sched.groupNames(lookup_step)) { const auto& group = sched.getGroup(group_name, lookup_step); - if (group.isProductionGroup()) { - gctrl = 1; + if (group.isProductionGroup()) { + have_gconprod = true; } - if (group.isInjectionGroup()) { - gctrl = 2; + if (group.isInjectionGroup()) { + have_gconinje = true; } } + if (have_gconinje) + gctrl = 2; + else if (have_gconprod) + gctrl = 1; // Index for group control return gctrl;