OPM / opm-common

Common components for OPM, in particular build system (cmake).
http://www.opm-project.org
GNU General Public License v3.0
34 stars 111 forks source link

ACTIONX Improvement I #1243

Open joakim-hove opened 4 years ago

joakim-hove commented 4 years ago

The left hand side quantity in an ACTIONX expression can be of different types:

  1. Time quantity
  2. Region quantity
  3. Field quantity
  4. Group or well-list quantity
  5. Well quantity
  6. Well segment quantity
  7. Well connection quantity
  8. Well LGR quantity
  9. Aquifer quantity
  10. Block quantity

Currently all of these only have token type ecl_expr, and then there is some special case handling of the ecl_expr which has arguments - which is just assumed to be a well quantity. The well case is the most important for special casing, where the set of matching wells must be assembled so that it can be reused in a subsequent '?' expression.

The task is to introduce an enum which can enumerate the different quantity types listed here. The distinction can probably be made based on first character conventions - i.e. 'W' for Well quantites and 'B' for block properties. See: (???? - somewhere in the Summary code - could not find it now). The ASTnode should get a member variable of this new enum type.

atgeirr commented 4 years ago

What about well completion quantities, is that a concept we need as well?

joakim-hove commented 4 years ago

What about well completion quantities, is that a concept we need as well?

Not as in your 2019 bonus depends on it ;-)

joakim-hove commented 4 years ago

See: (???? - somewhere in the Summary code - could not find it now)

@bska: Is there currently a simple way in the summarycode to do:

auto enum_type = Summary::classify_variable( std::string& keyword );

to get weell, group, field, aquifer, ..... depending on the string?

bska commented 4 years ago

@bska: Is there currently a simple way in the summarycode to do:

auto enum_type = Summary::classify_variable( std::string& keyword );

to get well, group, field, aquifer, ..... depending on the string?

There is parseKeywordCategory(), but that function is (currently) private to SummaryConfig.cpp. We also have parseKeywordType if you need to take special action depending on distinctions between flow rates, cumulative totals, pressures, flow rate ratios or type counts (integers).

joakim-hove commented 4 years ago

Thak you - it is the parseKeywordCategory i am interested in;any objections to making it public?

bska commented 4 years ago

it is the parseKeywordCategory i am interested in;any objections to making it public?

No reservations. Are you prepared to deal intelligently with Category::Miscellaneous?