Ensure that WOPT is added to SummaryConfig when requesting ROEW
This commit is contained in:
parent
f7cb068f66
commit
60920dd487
@ -725,6 +725,7 @@ inline void keywordR2R( SummaryConfig::keyword_list& /* list */,
|
||||
|
||||
inline void keywordR( SummaryConfig::keyword_list& list,
|
||||
const DeckKeyword& deck_keyword,
|
||||
const Schedule& schedule,
|
||||
const TableManager& tables,
|
||||
const ParseContext& parseContext,
|
||||
ErrorGuard& errors ) {
|
||||
@ -749,6 +750,11 @@ inline void keywordR( SummaryConfig::keyword_list& list,
|
||||
regions.push_back( region );
|
||||
}
|
||||
|
||||
// See comment on function roew() in Summary.cpp for this weirdness.
|
||||
if (keyword.rfind("ROEW", 0) == 0)
|
||||
keywordW(list, "WOPT", {}, schedule);
|
||||
|
||||
|
||||
auto param = SummaryConfigNode {
|
||||
keyword, SummaryConfigNode::Category::Region, deck_keyword.location()
|
||||
}
|
||||
@ -1054,7 +1060,7 @@ inline void keywordMISC( SummaryConfig::keyword_list& list,
|
||||
case Cat::Group: return keywordG( list, parseContext, errors, keyword, schedule );
|
||||
case Cat::Field: return keywordF( list, keyword );
|
||||
case Cat::Block: return keywordB( list, keyword, dims );
|
||||
case Cat::Region: return keywordR( list, keyword, tables, parseContext, errors );
|
||||
case Cat::Region: return keywordR( list, keyword, schedule, tables, parseContext, errors );
|
||||
case Cat::Connection: return keywordC( list, parseContext, errors, keyword, schedule, dims);
|
||||
case Cat::Segment: return keywordS( list, parseContext, errors, keyword, schedule );
|
||||
case Cat::Node: return keyword_node( list, node_names, parseContext, errors, keyword );
|
||||
|
@ -1187,9 +1187,10 @@ ROEW_REG
|
||||
|
||||
RHPV_REG
|
||||
/
|
||||
|
||||
)";
|
||||
const auto& summary_config = createSummary(deck_string);
|
||||
BOOST_CHECK_EQUAL(summary_config.size(), 15U);
|
||||
BOOST_CHECK_EQUAL(summary_config.size(), 15 + 4);
|
||||
BOOST_CHECK(summary_config.hasKeyword("RPR__REG"));
|
||||
BOOST_CHECK(summary_config.hasKeyword("ROPT_REG"));
|
||||
BOOST_CHECK(summary_config.hasKeyword("RRPV_REG"));
|
||||
@ -1210,11 +1211,11 @@ RHPV_REG
|
||||
BOOST_CHECK( reg_iter != fip_regions.end() );
|
||||
|
||||
|
||||
auto wkeywords = summary_config.keywords("W*");
|
||||
BOOST_CHECK(wkeywords.empty());
|
||||
|
||||
auto rpr = summary_config.keywords("RP*");
|
||||
BOOST_CHECK_EQUAL(rpr.size(), 3U);
|
||||
|
||||
// See comment on the roew() function in Summary.cpp for this uglyness.
|
||||
BOOST_CHECK(summary_config.hasKeyword("WOPT"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( WOPRL ) {
|
||||
|
Loading…
Reference in New Issue
Block a user