Commit Graph

61 Commits

Author SHA1 Message Date
Arne Morten Kvarving
f25f7e77f5 add serialization template to SummaryNode 2020-03-12 12:11:01 +01:00
Arne Morten Kvarving
6a2c036582 add serialization template to SummaryConfig
remove accessors that was only required for the external serialization
support
2020-03-10 13:09:08 +01:00
Arne Morten Kvarving
8fbff44d22 make SummaryConfig constructible from variables
also add accessors and equality operator
2020-01-08 09:58:20 +01:00
Arne Morten Kvarving
d9c7260784 make SummaryNode default constructible 2020-01-08 09:58:10 +01:00
Steinar Foss
4b5ef93293 added enum class FuncType for ASTNode.
ActionParserNode takes functype arg.

ActionParser getfunc.

ASTNode constr take func_type-arg.

ASTNode: throws exception if not FunctionType well.

FuncType: expanded list.

ActionParser: gettype distnguishes types.

ACTIONX.cpp: added test with group*.

parseKeywordCategory made public.

ActionParser: uses parseCategory.
2019-12-04 16:24:58 +01:00
Joakim Hove
f17eefcaf7 Add Location member to SummaryNode instances 2019-11-11 15:31:36 +01:00
Bård Skaflestad
70daf0f2c8 Decouple SummaryConfig From LibECL
This commit reimplements the SummaryNode class in order not to use
the ecl::smspec_node class from LibECL.  Consequently, we remove
class SummaryConfig's binding to LibECL.

Class SummaryNode maintains the same information as before.  We also
implement a "named constructor" strategy to assign data members that
only make sense for a subset of the node categories.  The previous
member function 'type' is renamed to 'category' to identify the
attachment category (e.g., Well, Group, Field, Block, Region).  In
turn, we introduce a new 'type' member function to identify the
parameter kind (e.g, pressure, rate, cumulative total, well count)
represented by a given node.  We furthermore capture whether or not
the node is a user defined quantity (i.e., a UDQ).

We reimplement the keyword classifier operations that are currently
needed as free functions named 'is_*()' in SummaryConfig.cpp.

Note that in addition to the renamed member functions of class
SummaryNode, this commit also switches the summary key strategy for
block parameters.  Rather than capturing the 'ijk' values
individually as "BOSAT:3,3,6", we now store the equivalent global
(Cartesian) index (i.e., as "BOSAT:523").  Code that directly
constructs block parameter keys must be updated accordingly.

Chase the API change in the 'Summary' constructor and update unit
tests as needed.
2019-09-30 13:59:34 +02:00
Joakim Hove
5734923b1e Add size() method to SummaryConfig class 2019-03-29 15:40:37 +01:00
Joakim Hove
2cd6fa2f49 Add overloads without ParseContext and ErrorGuard - update all tests 2019-01-04 13:59:28 +01:00
Joakim Hove
bf52e6d123 Added ErrorGuard& arguments to library 2019-01-03 13:14:40 +01:00
Joakim Hove
f414f5b8ad Adapt to C++ changes in libecl 2018-11-26 17:30:09 +01:00
Joakim Hove
5aa0bfadf0 Use plain C api for smspec_nodes 2018-09-07 13:56:04 +02:00
Joakim Hove
a580259d99 Changed summaryconfig constructor. 2017-09-25 10:05:09 +02:00
Joakim Hove
6b3db2f9fe Removed EclipseState::getSchedule( ) calls. 2017-09-24 01:46:05 +02:00
Jørgen Kvalsvik
e884b0664c Redesign cmake
Tune the makefile according to new principles, which adds a few bells
and whistles and for clarity.

Synopsis:

* The dependency on opm-common is completely gone. This is reflected in
  travis and appveyor as well. No non-kitware cmake modules are used.
* Directories are flattened, quite a bit - source code is located in the
  lib/ directory if it belongs to opm-parser, and external/ if third
  party.
* The sibling build feature is implemented through cmake's
  export(PACKAGE) rather than implicitly looking through source files.
* Targets explicitly set required public and private include
  directories, compile options and definitions, which cmake will handle
  and propagate
* opm-parser-config.cmake for downstream users is now provided.
* Dependencies are set up using targets. In the future, when cmake 3.x+
  can be used, these should be either targets from newer Find modules,
  or interface libraries.
* Fewer system specific assumptions are coded in, instead we assume
  cmake or users set up system specific details.
* All module wide configuration and looking up libraries is handled in
  the root makefile - all sub directories only set up libraries and
  compile options for the module in question.
* Targets are defined and links handled transitively because cmake now
  is told about them. ${module_LIBRARIES} variables are gone.

This is largely guided by the principles outlined in
https://rix0r.nl/blog/2015/08/13/cmake-guide/

Most source files are just moved - if they have some content change then
it's nothing more than include fixes or similar in order to make them
compile.
2017-06-01 15:29:23 +02:00
Joakim Hove
430b216027 Merge pull request #1069 from jijordre/field_oil_efficiency
Add unit test for field oil efficiency (aka FOE)
2017-06-01 12:06:27 +02:00
Jens Ivar Jørdre
699f84f009 Add unit test for field oil efficiency (aka FOE) 2017-05-31 11:33:21 +02:00
Joakim Hove
5565bead86 Fixed mismerge. 2017-05-31 11:14:07 +02:00
Joakim Hove
3d66efa262 Handle meta keyword PERFORMA.
When adding a ECL_SMSPEC_MISC_TYPE we protect against adding metakeyword
like 'PERFORMA' and 'ALL'.
2017-05-31 09:44:03 +02:00
Joakim Hove
4ce5681a21 SummaryConfig will internalize MISC keywords. 2017-05-31 09:44:02 +02:00
Joakim Hove
b9823a4c2e Changed region expansion in Rxxx SUMAMRY keywords.
If the region keywords from the SUMMARY section, like e.g. RPR, are
specified without explicit region numbers a summary key is added for all
region values from 1..NTFIP, irrespective of which region values are
actually present.
2017-05-25 23:39:45 +02:00
Joakim Hove
9e0495dfee Added FWIP as WIP dependency. 2017-02-07 14:35:37 +01:00
Joakim Hove
5ea448ac93 Check required restart fields for summary. 2017-02-07 11:16:28 +01:00
Jørgen Kvalsvik
6295435dd4 FMWSET expansion
FMWSET should, similar to ALL and GMWSET, expand to a set of field
property counting keywords.
2016-12-13 13:11:46 +01:00
Jørgen Kvalsvik
155e6d1cb5 GMWSET expansion
GMWSET should, similar to ALL, expand to a set of group property
counting keywords.
2016-12-13 12:55:09 +01:00
Jørgen Kvalsvik
ba824ac606 Don't choke on numerical aquifer keywords 2016-12-13 12:26:15 +01:00
Jørgen Kvalsvik
cba116fe59 Don't choke on analytical aquifers 2016-12-13 12:19:59 +01:00
Jørgen Kvalsvik
46de9696f7 Do not add FIELD group to summary 2016-11-02 10:19:15 +01:00
Jørgen Kvalsvik
f9cb516b99 Remove DeckPtr+ParserPtr aliases
Remove the deprecated DeckPtr and ParserPtr aliases and removes
shared_ptr<Deck> and friends from all interfaces.
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
0059446147 Make Completion+CompletionSet no longer use shared_ptr 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
239ef7a34c Remove shared_ptr typedef in TimeMap 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
1906bf4d16 Make EclipseGrid no longer use shared_ptr 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
b3dbd6f930 Return const ref from getSchedule 2016-10-19 20:38:27 +02:00
Joakim Hove
c42d2a7022 Added simple test for hasKeyword. 2016-09-19 20:18:51 +02:00
Pål Grønås Drange
b359e9c0fb transmult is member, use ref's, use proper constructor of EclipseState 2016-08-05 15:07:15 +02:00
Jørgen Kvalsvik
d98215ae40 [Summary] W-keywords accept patterns
The W-family of keywords accept a pattern to expand, rather than just
names or defaulted-all. This is the actual behaviour, according to the
manual.
2016-07-18 14:46:00 +02:00
Jørgen Kvalsvik
3f98a747df Connection keywords support well matching
Looking up well keywords uses the well matching algorithm. This covers
all cases supplied by the eclipse documentation, and extends it slightly
by also allowing matching.
2016-07-15 14:40:27 +02:00
Jørgen Kvalsvik
a84327ca25 Fix warnings in SummaryConfig 2016-07-13 23:40:09 +02:00
Jørgen Kvalsvik
590e3d2efe ALL_keywords in tests non-constexpr (MSVC compat)
Windows' compiler complains that {} yields a non-const expr for the
std::initializer_list, meaning compilation breaks. Changed to a const
static instead so that MSVC is happy.
2016-07-11 14:59:02 +02:00
Jørgen Kvalsvik
e1befcc03f SummaryConfig: don't register duplicate entries
By using the ALL keyword or by denoting the same keyword multiple times,
there would be corresponding multiple entries in the SUMMARY file.
Address this by removing duplicate entries from the list of smspec
nodes.
2016-07-04 16:47:20 +02:00
Jørgen Kvalsvik
c998b35647 Reindentation 2016-07-04 16:47:19 +02:00
Jørgen Kvalsvik
27eeb9f85e Refactor SummaryConfig internals
The internal helper functions have been redesign. The initial ambition
was to create small, composable functions by-value functions and have
the high-level algorithm, which is essentially (concat . map handler
[kwlist]). However, MSVC breaking and therefore poor development speed
of utility libraries mandates adjusting the approach a bit.

The major change here is the "return value" of the helper functions
being passed by-reference to all helpers, which will append the elements
they generate onto the collection.
2016-07-04 16:47:04 +02:00
Jørgen Kvalsvik
daf833e3ba Minor control flow simplification 2016-07-04 13:15:25 +02:00
Jørgen Kvalsvik
3d01da1f4c ALL keyword SummaryConfig as parse-then-merge
Generalises the SummaryConfig internal representation building by no
longer special casing the ALL keyword in the loop, but rather explicitly
look it up, analyse the expanded list as a new and isolated deck, and
then merge the results.
2016-07-04 13:10:57 +02:00
Jørgen Kvalsvik
4f8ad8a533 SummaryConfig::merge
Combine two Summary configs, essentially concatenating the underlying
vectors.
2016-07-04 12:02:43 +02:00
Jørgen Kvalsvik
ffc94fc0b2 SummaryConfig: anon namespace; private ALL list
Some minor hygiene, not exposing some highly internal detail. The list
of keywords ALL expands to is duplicated rather than acessible via a
method, but:

1. this is highly likely never an interesting list of applications
2. it's really only useful for testing **AND** is unlikely to change
3. unclutters the header files slightly
2016-07-04 11:47:22 +02:00
Liu Ming
9e0398c134 add comma. 2016-07-04 08:55:32 +08:00
Joakim Hove
d3f415c5aa ParseContext treatment of unknown wells/groups. 2016-07-01 17:04:58 +02:00
Joakim Hove
433b8ce73e Removed unused filter/remove functionality. 2016-07-01 17:04:58 +02:00
Kjell W. Kongsvik
03710ad799 Simplified key/name retrival from summary 2016-06-29 10:21:13 +02:00