From fa24394f690e2129a5f52eb1ea1f9f35065d1888 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 7 Oct 2020 16:45:19 +0200 Subject: [PATCH] Establish group <-> group relationship when loading from restartfile --- .../eclipse/EclipseState/Schedule/Schedule.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index e938b9bd0..941a2be06 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -1545,6 +1545,19 @@ namespace { for (const auto& rst_group : rst_state.groups) this->addGroup(rst_group.name, report_step, unit_system); + for (std::size_t group_index = 0; group_index < rst_state.groups.size(); group_index++) { + const auto& rst_group = rst_state.groups[group_index]; + + if (rst_group.parent_group == 0) + continue; + + if (rst_group.parent_group == rst_state.header.max_groups_in_field) + continue; + + const auto& parent_group = rst_state.groups[rst_group.parent_group - 1]; + this->addGroupToGroup(parent_group.name, rst_group.name, report_step); + } + for (const auto& rst_well : rst_state.wells) { Opm::Well well(rst_well, report_step, unit_system, udq_undefined); std::vector rst_connections;