From e4026b84e9af87dd7280d66c90318002178873b8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 12 Nov 2021 15:59:44 +0100 Subject: [PATCH] Made corrections to inspect_actionx_keyword() method --- src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index af4d543cc..ab56730ee 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -528,7 +528,10 @@ void Schedule::iterateScheduleSection(std::size_t load_start, std::size_t load_e void Schedule::inspect_actionx_keyword(const ScheduleGrid& grid, const DeckKeyword& keyword){ static std::unordered_set keyword_list = {"COMPDAT"}; - if(keyword_list.count(keyword.name())){ + if (keyword_list.count(keyword.name()) == 0) + return; + + if(keyword.name() == "COMPDAT"){ for (auto record : keyword){ const auto& itemI = record.getItem("I"); const auto& itemJ = record.getItem("J"); @@ -536,7 +539,7 @@ void Schedule::iterateScheduleSection(std::size_t load_start, std::size_t load_e bool defaulted_J = itemJ.defaultApplied(0) || itemJ.get(0) == 0; if (defaulted_I || defaulted_J) - throw std::logic_error(fmt::format("Defaulted grid coordinates not allowed: {}, {}", defaulted_I, defaulted_J)); + throw std::logic_error(fmt::format("Defaulted grid coordinates is not allowed for COMPDAT as part of ACTIONX")); const int I = itemI.get(0) - 1; const int J = itemJ.get(0) - 1;