Add basic parsing support for ALxx summary keywords

This commit is contained in:
Joakim Hove 2021-01-24 07:18:17 +01:00
parent 10421f7430
commit 87b8b145b0
4 changed files with 33 additions and 6 deletions

View File

@ -424,6 +424,17 @@ inline void keywordAquifer( SummaryConfig::keyword_list& list,
const ParseContext& parseContext,
ErrorGuard& errors,
const DeckKeyword& keyword) {
/*
The keywords starting with AL take as arguments a list of Aquiferlists -
this is not supported at all.
*/
if (keyword.name().rfind("AL", 0) == 0) {
Opm::OpmLog::warning(Opm::OpmInputError::format("Unhandled summary keyword {keyword}\n"
"In {file} line {line}", keyword.location()));
return;
}
auto param = SummaryConfigNode {
keyword.name(), SummaryConfigNode::Category::Aquifer, keyword.location()
}

View File

@ -0,0 +1,11 @@
{
"name": "AQUIFER_PROBE_ANALYTIC_NAMED",
"sections": [
"SUMMARY"
],
"comment": "Analytical aquifiers",
"data": {
"value_type": "STRING"
},
"deck_name_regex": "AL.+"
}

View File

@ -53,6 +53,7 @@ set( keywords
000_Eclipse100/A/AQUFETP
000_Eclipse100/A/AQUFLUX
000_Eclipse100/A/AQUIFER_PROBE_ANALYTIC
000_Eclipse100/A/AQUIFER_PROBE_ANALYTIC_NAMED
000_Eclipse100/A/AQUIFER_PROBE_NUMERIC
000_Eclipse100/A/AQUNNC
000_Eclipse100/A/AQUNUM

View File

@ -284,12 +284,16 @@ BOOST_AUTO_TEST_CASE(blocks) {
}
BOOST_AUTO_TEST_CASE(aquifer) {
const auto input = "AAQR\n"
" 1 2 /\n"
"AAQT\n"
" 1 /\n"
"AAQP\n"
" 1 2 3/\n";
const auto input = R"(
ALQR -- This is completely ignored
'ALQ1' 'ALQ2' /
AAQR
1 2 /
AAQT
1 /
AAQP
1 2 3/
)";
const auto summary = createSummary( input );
const auto keywords = { "AAQP", "AAQP", "AAQP", "AAQR", "AAQR", "AAQT" };
const auto names = sorted_keywords( summary );