From 0dcb31cae5e7a7107c5ba39bd4c48b44cd6e8a0e Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Thu, 8 Oct 2020 08:15:32 +0200 Subject: [PATCH] Use Group constructor when loading from restart file --- src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 941a2be06..cfb420f67 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -1542,8 +1542,10 @@ namespace { double udq_undefined = 0; const auto report_step = rst_state.header.report_step - 1; - for (const auto& rst_group : rst_state.groups) - this->addGroup(rst_group.name, report_step, unit_system); + for (const auto& rst_group : rst_state.groups) { + auto group = Group{ rst_group, this->groups.size(), static_cast(report_step), udq_undefined, unit_system }; + this->addGroup(group, report_step); + } for (std::size_t group_index = 0; group_index < rst_state.groups.size(); group_index++) { const auto& rst_group = rst_state.groups[group_index];