diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index 570ac24c9..8841212cc 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -1600,7 +1600,8 @@ static const std::unordered_map< std::string, Opm::UnitSystem::measure> region_u {"RGIP" , Opm::UnitSystem::measure::gas_surface_volume }, {"RGIPL" , Opm::UnitSystem::measure::gas_surface_volume }, {"RGIPG" , Opm::UnitSystem::measure::gas_surface_volume }, - {"RWIP" , Opm::UnitSystem::measure::liquid_surface_volume } + {"RWIP" , Opm::UnitSystem::measure::liquid_surface_volume }, + {"RRPV" , Opm::UnitSystem::measure::geometric_volume } }; static const std::unordered_map< std::string, Opm::UnitSystem::measure> block_units = { diff --git a/src/opm/parser/eclipse/Parser/ParserKeyword.cpp b/src/opm/parser/eclipse/Parser/ParserKeyword.cpp index 5e4303fc0..b933253fb 100644 --- a/src/opm/parser/eclipse/Parser/ParserKeyword.cpp +++ b/src/opm/parser/eclipse/Parser/ParserKeyword.cpp @@ -707,9 +707,18 @@ void set_dimensions( ParserItem& item, else if( m_deckNames.count( std::string(name) ) ) return true; - else if (hasMatchRegex()) - return std::regex_match( name.begin(), name.end(), m_matchRegex); + else if (hasMatchRegex()) { + bool match = std::regex_match( name.begin(), name.end(), m_matchRegex); + if (match) + return true; + } + // Last desperate attempt - go through the deckNames list and + // interpret the elements as a regular expression. + for (const auto& deck_name : this->m_deckNames) { + if (std::regex_match(name.begin(), name.end(), std::regex(deck_name))) + return true; + } return false; } diff --git a/src/opm/parser/eclipse/share/keywords/000_Eclipse100/R/REGION_PROBE b/src/opm/parser/eclipse/share/keywords/000_Eclipse100/R/REGION_PROBE index 2488df51f..a52f990b9 100644 --- a/src/opm/parser/eclipse/share/keywords/000_Eclipse100/R/REGION_PROBE +++ b/src/opm/parser/eclipse/share/keywords/000_Eclipse100/R/REGION_PROBE @@ -5,6 +5,8 @@ ], "comment": "Tracer keywords where the 2nd letter is a 'T' should be compounded with the tracer name", "deck_names": [ + "RRPV_[0-9A-Z][0-9A-Z][0-9A-Z]", + "ROEW_[0-9A-Z][0-9A-Z][0-9A-Z]", "ROSAT", "ROIP", "ROIPL", diff --git a/tests/parser/SummaryConfigTests.cpp b/tests/parser/SummaryConfigTests.cpp index 4bdf4d645..f93d692dc 100644 --- a/tests/parser/SummaryConfigTests.cpp +++ b/tests/parser/SummaryConfigTests.cpp @@ -1178,11 +1178,19 @@ RPR__REG ROPT_REG / + +RRPV_REG +/ + +ROEW_REG +/ )"; const auto& summary_config = createSummary(deck_string); - BOOST_CHECK_EQUAL(summary_config.size(), 6U); + BOOST_CHECK_EQUAL(summary_config.size(), 12U); BOOST_CHECK(summary_config.hasKeyword("RPR__REG")); BOOST_CHECK(summary_config.hasKeyword("ROPT_REG")); + BOOST_CHECK(summary_config.hasKeyword("RRPV_REG")); + BOOST_CHECK(summary_config.hasKeyword("ROEW_REG")); BOOST_CHECK(!summary_config.hasKeyword("RPR")); BOOST_CHECK(!summary_config.match("BPR*")); BOOST_CHECK(summary_config.match("RPR*"));