Make sure R__xxx keywords are recognized in Summary writer

This commit is contained in:
Joakim Hove 2020-09-14 23:05:03 +02:00
parent 5557debd9c
commit 03f9a73f43
3 changed files with 10 additions and 1 deletions

View File

@ -2051,7 +2051,12 @@ namespace Evaluator {
bool Factory::isRegionValue()
{
auto pos = region_units.find(this->node_->keyword);
auto keyword = this->node_->keyword;
auto dash_pos = keyword.find("_");
if (dash_pos != std::string::npos)
keyword = keyword.substr(0, dash_pos);
auto pos = region_units.find(keyword);
if (pos == region_units.end())
return false;

View File

@ -283,6 +283,9 @@ SUMMARY
DATE
RPR__NUM
/
RUNSUM
FMWPA

View File

@ -99,6 +99,7 @@ BOOST_AUTO_TEST_CASE(RUN) {
const auto smry = EclIO::ESmry("SPE1CASE1");
const auto& time = smry.get("TIME");
const auto& press = smry.get("WOPR:PROD");
BOOST_CHECK( smry.hasKey("RPR__NUM:1"));
for (auto nstep = time.size(), time_index=0*nstep; time_index < nstep; time_index++) {
double seconds_elapsed = time[time_index] * 86400;