Section keyword 'SUMMARY' was incorrectly identified as UDQ a keyword

This commit is contained in:
Joakim Hove
2019-03-29 13:14:43 +01:00
parent 5734923b1e
commit 598b5b1ff4
2 changed files with 18 additions and 2 deletions

View File

@@ -597,8 +597,16 @@ SummaryConfig::SummaryConfig( const Deck& deck,
ErrorGuard& errors,
const GridDims& dims) {
SUMMARYSection section( deck );
for( auto& x : section )
handleKW( this->keywords, x, schedule, tables, parseContext, errors, dims);
// The kw_iter++ hoops is to skip the initial 'SUMMARY' keyword.
auto kw_iter = section.begin();
if (kw_iter != section.end())
kw_iter++;
for(; kw_iter != section.end(); ++kw_iter) {
const auto& kw = *kw_iter;
handleKW( this->keywords, kw, schedule, tables, parseContext, errors, dims);
}
if( section.hasKeyword( "ALL" ) )
this->merge( { ALL_keywords, schedule, tables, parseContext, errors, dims} );

View File

@@ -160,6 +160,14 @@ BOOST_AUTO_TEST_CASE(wells_all) {
names.begin(), names.end() );
}
BOOST_AUTO_TEST_CASE(EMPTY) {
auto deck = createDeck_no_wells( "" );
EclipseState state( deck );
Schedule schedule(deck, state.getInputGrid(), state.get3DProperties(), state.runspec());
SummaryConfig conf(deck, schedule, state.getTableManager());
BOOST_CHECK_EQUAL( conf.size(), 0 );
}
BOOST_AUTO_TEST_CASE(wells_missingI) {
ParseContext parseContext;
ErrorGuard errors;