With this commit the code to evaluate UDQ values has been extended/refactored in
many ways:
- There is an increased awarenwss of variable type, i.e. a well related UDQ
versus a field related UDQ. The variable type flows through the AST, and it
is verified that the expression to evaluate and the target variable are of
compatible types.
- Have added support for UDQ field variables and UDQ group variables.
- The UDQSet type and the UDQDefine::eval() have been refactored to multiplex
on all the UDQ types, and the specialized UDQWellSet has been removed.
currently, this keyword is basically ignored: setting the unit system
of a file to something different than the deck unit system will cause
`Opm::checkDeck()` to produce a warning.
Differentiate between the input type, as specified in the json configuration
file, and the internal native type used to store data. This is a many-to-one
mapping, where e.g. both the input types STRING and RAW_STRING map to the
internal datatype std::string.
Additional changes:
- Have removed several ParserItem() constructors.
- The size_type::SINGLE is default for a ParserItem, and not set explicitly in
the generated ParserKeywords.cpp file.
- Have removed a call to boost::lexical_cast<> - just use std::to_string()
The records are norally terminated on the first unquoted '/', but for the UDQ
and ACTIONX keywords the data sections of a keyword contain mathematical
expressions which can contain '/' literals. This commit adds a per-keyword
ability to terminate the records on the last '/' instead of the first '/'.
This commit introduces Parse Context keys that govern the parser's
behaviour in the case of a simulation run using dynamic sizes that
happen to exceed the maximum sizes declared in the RUNSPEC keyword
WELLDIMS. The default action for these keys is DELAYED_EXIT1, which
reflects the fact that it is impossible to create ECLIPSE-compatible
restart files if the run exceeds those maximum sizes.
The ParserContext error mode PARSE_LONG_KEYWORD is used to handle keywords
longer than 8 characters. The lenient option is to only consider the first 8
characters.
Added function getGroups(pattern) to allow records with wildcard.
Included the functionality for GCONPROD, GCONINJE and GEFAC - currently
the only group keywords that should accept wildcards.
Handle invalid wellpatterns for COMPDAT.
Given a deck with:
----
WELSPECS
'PROD' 'G1' 10 10 8400 'OIL' /
/
COMPDAT
'SOMETHINGELSE' 10 10 3 3 'OPEN' 1* 1* 0.5 /
/
----
OPM will now by default abort and inform the user that no well match
"SOMETHINGELSE".
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.
Pass eclGridProperties from EclipseState to Completions in order to set
default saturation table. Most changes are due to interface change in
Schedule(...)
Work around a weakness of older boosts by forcing C locale if
std::locale throws.
The real solution is to not have broken locales, but this should make it
slightly easier to get the JSON keywords compiled.
Redesign of ParserItem so that its sum type nature no longer mandates
indirection, but rather a tag check on all operations. Because of this,
ParserRecords can now store ParserItems directly, and iterators are no
longer iterators to pointers, but behave like normal vector iterators.
Replaces the internal inheritance + unique_ptr scheme to a flat sum type
similar scheme that uses a tag to determine which operations are legal,
rather than using the indirection itself as a tag.