Commit Graph

41 Commits

Author SHA1 Message Date
Joakim Hove
23faea7b81
Merge pull request #1996 from wito/required-keywords
Required and Prohibited Keywords
2020-10-07 09:06:42 +02:00
Williham Williham Totland
90d980a4f6 Adds manipulation of the ParseContext to tests. 2020-10-06 09:58:46 +02:00
Williham Williham Totland
7aba0cd976 Implements required and prohibited keywords. 2020-10-05 13:34:35 +02:00
Williham Williham Totland
7a8347f1ab Unifies interface of OpmInputError::OpmInputError() 2020-10-05 08:26:51 +02:00
Joakim Hove
8c351440e8 Mkae sure fmtlib is not a dependency in the public api 2020-09-30 18:17:57 +02:00
Joakim Hove
0512ab88b4 ParseContext will throw OpmInputError 2020-09-29 15:37:14 +02:00
Williham Williham Totland
9a66acbb5d Extends OpmInputError to be initialisable from an existing exception. 2020-09-28 13:16:45 +02:00
Williham Williham Totland
742c90cabc Extends Opm::OpmInputError::OpmInputError() to accept additional format arguments. 2020-09-28 13:16:45 +02:00
Joakim Hove
719af02142 Add custom exception OpmInputError 2020-09-22 13:48:26 +02:00
Joakim Hove
5444eade2f Use std::shared_ptr<Python> for Python argument in Schedule 2020-03-31 10:26:55 +02:00
Joakim Hove
50fb51d56e Add Python arg to Schedule constructor 2020-03-27 12:43:18 +01:00
Bård Skaflestad
19ecc3d30e Consider Active Phases When Initializing Satfunc Endpoints
This commit passes the run's notion of its active phases, an object
of type Opm::Phases, through to the initialisation layer for the
saturation functions' scaling properties.  In particular, this
allows us to discriminate between the phases and to not index into
tables or properties that would not be appropriate (e.g., maximum
gas saturation (SGU) in a simulation run without active gas).

Moreover, we now have enough information to know to look for SOF2 in
two-phase run using family II saturation function keywords.  These
changes are necessary in order to extend Flow's support for the
FILLEPS output request to two-phase runs.
2020-01-29 16:34:15 +01:00
Joakim Hove
ecb5fce19b
Only active cells (#1298)
Use FieldProps implementation for 3D properties
2020-01-13 15:46:06 +01:00
Joakim Hove
198b208258 Test use of FieldPropsManager in WellConnections 2019-11-29 16:42:29 +01:00
Atgeirr Flø Rasmussen
5f8d24c431 Add tests for WFOAM. 2019-07-03 12:39:35 +02:00
Joakim Hove
65b629e423 Add ParseContext::PARSE_LONG_KEYWORD
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.
2019-02-04 17:17:00 +01:00
Joakim Hove
23cbe9035b Add separate - non BOOST - test program to test exit(1) 2019-01-04 16:52:10 +01:00
Joakim Hove
2cd6fa2f49 Add overloads without ParseContext and ErrorGuard - update all tests 2019-01-04 13:59:28 +01:00
Joakim Hove
ad001df804 Add small class ErrorGuard to manage errors from parsing 2019-01-03 11:54:48 +01:00
Joakim Hove
8d33ec55bd Add ParseContext error handler EXIT1 for user error 2018-11-25 11:53:34 +01:00
Joakim Hove
d70b86484d White space 2018-11-25 08:56:20 +01:00
Tor Harald Sandve
95179f393c Fix vappars and dr[sv]dt logic
The simulator should either use VAPPERS or dr[sv]dt, both the
combination drsdt and drvdt is allowed.
2018-11-05 13:38:42 +01:00
Joakim Hove
c938765224 Ability to ignore named keywords in ParseContext 2018-10-08 18:07:21 +02:00
Jostein Alvestad
9cf9bf310d Added changes to serialize IGPR and SGRP and write to restart file
Well info at correct step for save & load RESTART

Retrieve number of wells and completions at the beginning of the
simulated step. Otherwise a well introduced at the same time step as the
report will be included - even though there doesn't exist any simulated
data yet.

This issue would trigger a throw if WRFTPLT was added at the same time
step as a well is introduced in the schedule section.

Removed one DATES item in FIRST_SIM.DATA. The
EclipseReadWriteWellStateData in test_Restart compared state at T1,
which did not include any well data as it was. No other tests were
affected.

Added new implementation of serialize_ICON

The new function has been added to the file WriteRestartHelpers, and
intended to take over for the local function 'serialize_ICON' in
`restartIO.cpp` when `restartIO::save()` is to be updated.  The purpose
of the new implementation is to be compatible with Eclipse.

Handle wildcard in group keywords

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.

Add key string to RestartKey

Pass dimension information for extra fields in restart

Verify that the extra container has THPRES
2018-09-19 16:01:54 +02:00
Lars Petter Øren Hauge
fcbcc9cda4 Add INVALID_NAME to GCONPROD, GCONINJE & GEFAC 2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
675858f1e0 Handle wildcard in group keywords
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.
2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
427833b089 Add INVALID_WELLS to WECON & WEFAC 2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
ba573b5834 Add INVALID_WELLS to WELOPEN & WELTARG 2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
6a8e7a9a05 Add INVALID_WELL context to WPOLYMER & WSOLVENT 2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
580a64563f Add INVALID_WELL context to W(INJ)TEMP
Handle well template (e.g. W*) in the .DATA file for WTEMP and WINJTEMP
and add INVALID_WELL_CONTEXT
2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
ba107498a1 Add INVALID_WELL context for WCONINJ(E/H) 2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
183fd4eabb Add INVALID_WELL context for WCONPROD
Handle invalid wellpatterns for WCONPROD.

Given a deck with:

----
WELSPECS
  'PROD' 'G1'  10 10 8400 'OIL' /
/
COMPDAT
  'PROD' 10 10 3 3 'OPEN' 1* 1* 0.5 /
/
WCONPROD
  'SOMETHINGELSE' 'OPEN' 'ORAT' 20000 4* 1000 /
 /
----

OPM will now by default abort and inform the user that no well match
"SOMETHINGELSE".
2018-05-14 09:26:22 +02:00
Lars Petter Øren Hauge
f2cb5fe9de Add INVALID_WELL parse context
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".
2018-05-14 09:26:21 +02:00
Joakim Hove
c904c6bf98 Added action argument to ParseContext::addKey() 2018-02-19 14:52:21 +01:00
Steinar Foss
5d9f529637 PARSE_EXtRA_RECORDS: added more info to error msg. 2018-01-17 10:27:37 +01:00
Steinar Foss
ab716c6036 added extra test function Handle_extra_records_2. 2018-01-16 17:15:37 +01:00
Steinar Foss
5ef8d22a48 IGNORE_EXTRA_RECORDS changed to PARSE_EXTRA_RECORDS.
...
2018-01-16 16:58:29 +01:00
Steinar Foss
e85162703e Added ParseContext::IGNORE_EXTRA_RECORDS
...

...

...

...

...
2018-01-16 16:58:29 +01:00
Joakim Hove
22074a46bf Added one-argument ParseContext constructor. 2017-12-03 08:38:27 +01:00
Joakim Hove
612e255d4f Extracted Schedule and SummaryConfig, 2017-10-24 09:27:42 +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