Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions opm/io/eclipse/SummaryNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace Opm::EclIO {

struct SummaryNode {
enum class Category {
Aquifer,
Well,
Group,
Field,
Expand Down
2 changes: 2 additions & 0 deletions src/opm/io/eclipse/SummaryNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace {

constexpr bool use_number(Opm::EclIO::SummaryNode::Category category) {
switch (category) {
case Opm::EclIO::SummaryNode::Category::Aquifer: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Block: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Connection: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Region: [[fallthrough]];
Expand All @@ -49,6 +50,7 @@ constexpr bool use_name(Opm::EclIO::SummaryNode::Category category) {
case Opm::EclIO::SummaryNode::Category::Segment: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Well:
return true;
case Opm::EclIO::SummaryNode::Category::Aquifer: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Block: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Field: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Miscellaneous: [[fallthrough]];
Expand Down
4 changes: 3 additions & 1 deletion src/opm/output/eclipse/Summary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,8 @@ inline std::vector<Opm::Well> find_wells( const Opm::Schedule& schedule,
return wells;
}

case Opm::EclIO::SummaryNode::Category::Block:
case Opm::EclIO::SummaryNode::Category::Aquifer: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Block: [[fallthrough]];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This corrects an oversight where [[fallthrough]] was originally omitted from this case.

case Opm::EclIO::SummaryNode::Category::Miscellaneous:
return {};
}
Expand All @@ -1346,6 +1347,7 @@ bool need_wells(const Opm::EclIO::SummaryNode& node) {
return true;
case Opm::EclIO::SummaryNode::Category::Region:
return std::regex_match(node.keyword, region_keyword_regex);
case Opm::EclIO::SummaryNode::Category::Aquifer: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Miscellaneous: [[fallthrough]];
case Opm::EclIO::SummaryNode::Category::Block:
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ FuncType Parser::get_func(const std::string& arg) {
using Cat = SummaryConfigNode::Category;
SummaryConfigNode::Category cat = parseKeywordCategory(arg);
switch (cat) {
case Cat::Aquifer: return FuncType::aquifer;
case Cat::Well: return FuncType::well;
case Cat::Group: return FuncType::group;
case Cat::Connection: return FuncType::well_connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ inline void keywordMISC( SummaryConfig::keyword_list& list,

std::string to_string(const SummaryConfigNode::Category cat) {
switch( cat ) {
case SummaryConfigNode::Category::Aquifer: return "Aquifer";
case SummaryConfigNode::Category::Well: return "Well";
case SummaryConfigNode::Category::Group: return "Group";
case SummaryConfigNode::Category::Field: return "Field";
Expand Down Expand Up @@ -828,6 +829,7 @@ SummaryConfigNode::Category parseKeywordCategory(const std::string& keyword) {
if (is_special(keyword)) { return Cat::Miscellaneous; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the keywords checked in is_special currently start with A; is this because aquifer keywords have not been supported, or is this because there are no keywords in SUMMARY that can start with A other than aquifer keywords?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this because there are no keywords in SUMMARY that can start with A other than aquifer keywords?

Until proven otherwise I would say it is like this - i.e. all legal SUMMARY keywords starting with 'A' are aquifer keywords.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this because aquifer keywords have not been supported, or is this because there are no keywords in SUMMARY that can start with A other than aquifer keywords?

Both. Flow does not create any kind of aquifer-related output—neither to the summary nor to the restart files. We have (very) limited support for reading parameters of the Fetkovich analytic model from a restart file—I needed that in a different project—but writing is unsupported at present. There is a lot of work ahead of us before we can reasonably claim to fully support aquifer workflows.

Writing restart data for aquifers is on my plate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I will at this time leave is_special() as is.


switch (keyword[0]) {
case 'A': return Cat::Aquifer;
case 'W': return Cat::Well;
case 'G': return Cat::Group;
case 'F': return Cat::Field;
Expand Down Expand Up @@ -897,6 +899,7 @@ std::string SummaryConfigNode::uniqueNodeKey() const
case SummaryConfigNode::Category::Miscellaneous:
return this->keyword();

case SummaryConfigNode::Category::Aquifer: [[fallthrough]];
case SummaryConfigNode::Category::Region: [[fallthrough]];
case SummaryConfigNode::Category::Block:
return this->keyword() + ':' + std::to_string(this->number());
Expand Down Expand Up @@ -929,6 +932,7 @@ bool operator==(const SummaryConfigNode& lhs, const SummaryConfigNode& rhs)
// Equal if associated to same named entity
return lhs.namedEntity() == rhs.namedEntity();

case SummaryConfigNode::Category::Aquifer: [[fallthrough]];
case SummaryConfigNode::Category::Region: [[fallthrough]];
case SummaryConfigNode::Category::Block:
// Equal if associated to same numeric entity
Expand Down Expand Up @@ -964,6 +968,7 @@ bool operator<(const SummaryConfigNode& lhs, const SummaryConfigNode& rhs)
// Ordering determined by namedEntityd entity
return lhs.namedEntity() < rhs.namedEntity();

case SummaryConfigNode::Category::Aquifer: [[fallthrough]];
case SummaryConfigNode::Category::Region: [[fallthrough]];
case SummaryConfigNode::Category::Block:
// Ordering determined by numeric entity
Expand Down