Commit Graph

6636 Commits

Author SHA1 Message Date
Steinar Foss
4761fe724b added keywords beginning w/ I, J, K and L.
added keyword JFUNCR.

added keywords KRNUN, KRNUMMF.

added keywords LANGMPL, LANGMUIR, LANGSOLV.

added keywords LGRCOPY, LGRFREE, LGRLOCK.

added keywords LGROFF, LGRON, LINKPERM.

added keywords LKRO, LKRORG, LKRORW.

added keywords LKRW, LKRWR, LOAD.
2019-10-20 10:53:29 +02:00
Markus Blatt
8488efde1f
Merge pull request #1126 from blattms/backport-of-pr-1125
Fix memory error during EclipseGrid creation with Actnum. (backport PR #1125)
2019-10-17 20:29:25 +02:00
Markus Blatt
3a89d05646 Fix memory error during EclipseGrid creation with Actnum.
We pass an int pointer to the function initCornerPointGrid.
With ACTNUM  this pointer was initialized with data pointer
of an int vector that we threw away before the function call
(otherwise it was null). To fix this we move the int-vector up one
scope.
2019-10-17 20:26:55 +02:00
Markus Blatt
0d3037383a
Merge pull request #1120 from blattms/backport-of-pr-1116
fixed: build using gcc 5 (ubuntu xenial) (backport of PR #1116
2019-10-17 13:25:35 +02:00
Arne Morten Kvarving
de67ce4083 fixed: build using gcc 5 (ubuntu xenial)
the tuple-from-initializer-list constructor is explicit.
2019-10-17 13:21:25 +02:00
Markus Blatt
0fadb026af
Merge pull request #1118 from blattms/backport-of-pr-1107
Decouple OPM Flow From Libecl  (Backport of pr #1107)
2019-10-17 13:08:52 +02:00
Bård Skaflestad
fe275a55fd Drop libecl From Python Setup
Suggested by [at]akva2.
2019-10-17 12:21:53 +02:00
Arne Morten Kvarving
a44febc314 remove libecl from buildsystem, jenkins and packaging 2019-10-17 12:21:53 +02:00
Bård Skaflestad
895c43dff0 Reimplement test_Restart in Terms of TimeStampUTC
Only affects the 'first_sim()' helper function.
2019-10-17 11:53:15 +02:00
Bård Skaflestad
e2ca798005 Reimplement test_EclipseIO in Terms of TimeStampUTC
Mostly just to provide a simple overload of the utility function

    ecl_util_make_date

from libecl.  The rest of the test code remains intact.
2019-10-17 11:53:15 +02:00
Bård Skaflestad
8fa07537fc Reimplement ScheduleTests in Terms of TimeStampUTC
Note that we have to reduce the year-range in the specific test

    createDeckWithDRSDTthenDRVDT

in order not to wrap around for system_clock.  This is a deficency of
the new time-service protocol.
2019-10-17 11:53:15 +02:00
Bård Skaflestad
7f9d250fd3 Reimplement TimeMap in Terms of TimeStampUTC 2019-10-17 11:53:15 +02:00
Bård Skaflestad
5eab9b003f Add Simple Time-Service Protocol
Mostly for converting between std::time_t and broken-down time
stamps.  Uses UTC and std::chrono::system_clock.  May wrap in as
little as 292 years, depending on the period of system_clock.

Intended to replace various timestamping utility functions from
libecl.  A comprehensive time-service protocol for Flow is much more
work than this, and will likely not be easily realized before we
have C++17 and its much expanded time/calendar library.
2019-10-17 11:53:15 +02:00
Bård Skaflestad
14625b3279 Defaulted Table Column: Don't Use 'ssize_t'
Instead, switch to 'int' for the 'before' and 'after' row indices.
The 'ssize_t' Posix type alias is not appropriate for this usage
since its range is only guaranteed to be [ -1 .. (1<<15)-1 ].
2019-10-17 11:53:15 +02:00
Bård Skaflestad
3cb23e6857 Reimplement 'test_EclipseIO' in Terms of Opm-Common Classes
In particular, use EGrid, ERst and EclFile as appropriate.
2019-10-17 11:53:15 +02:00
Markus Blatt
f8f1efc0ac
Merge pull request #1111 from blattms/backport-of-pr-1110
Allow building a module with dependencies installed (backport of #1110)
2019-10-16 13:56:12 +02:00
Markus Blatt
6d92c1f5de Allow building a module with dependencies installed but source lying around.
If you set CMAKE_INSTALL_PREFIX, have the dependencies installed there, but
the source of them lying around in the parent directory of the build
directory, then the build will fail starting with opm-models because
we assume that ../opm-material is a build directory and set opm-material_DIR
to it. CMake will complain about not finding opm-material-config.cmake or
Opm-materialConfig.cmake. With this commit we will only set opm-material_DIR
if the directory contains a file CMakeCache.txt (which should be the case in
a configured build directory.

Directory outline of the failing situation is
- ${CMAKE_INSTALL_PREFIX} # where all dependencies are installed
- parent_dir
|____ opm-common #source dir
|____ opm-material #source dir
|____ ...
|____ build #build directory for current module (e.g. opm-modules)

Change is tested with sibling build

- build
|___ opm-common #build dir
|___ opm-material #build dir
|___ ...

and the dune version of it

- parent_dir
|___ opm-common # source dir
    |____ build # build dir opm-common

|___ opm-material # source dir
    |____ build # build dir opm-material
...
2019-10-16 13:52:47 +02:00
Markus Blatt
c68ec9c28b
Merge pull request #1108 from blattms/backport-of-pr-1092
Update of ESmry, now supporting non-unified result files. (backport of PR #1092)
2019-10-16 09:47:38 +02:00
Torbjørn Skille
2dd6400d06 Update of ESmry, now supporting non-unified result files. 2019-10-16 09:12:02 +02:00
Markus Blatt
aa10ded01a
Merge pull request #1104 from blattms/backport-of-pr-1094
Make RestartKey default contructable. (Backport of #1094)
2019-10-14 22:13:54 +02:00
Markus Blatt
edaa5ae561 Make RestartKey default contructable.
Otherwise we cannot even resize a vector of it and this will be needed
for restart when getting rid off the global grid on all processes.
2019-10-14 21:46:43 +02:00
Markus Blatt
aa56a40e8d
Merge pull request #1103 from blattms/backport-pr-1088
Backport of pr #1088
2019-10-14 21:43:00 +02:00
Bård Skaflestad
2d7ba6a3c9 INTEHEAD Test: Initialize Maximum Number of Wells in Field
Fixes a warning about missing initializers.
2019-10-14 21:38:32 +02:00
Bård Skaflestad
6c397ff2a8 Make 'test_Restart' Mostly Independent of libecl
In particular, swith to using class EclIO::ERst to read the files
produced by RestartIO::save().
2019-10-14 21:29:27 +02:00
Bård Skaflestad
c83feddb28 Make 'test_Summary' Independent of LibeECL
This commit switches the 'test_Summary' unit test to use class ESmry
for inspecting the values output to disk by 'out::Summary'.  As a
consequence, we are not able to verify units of measure for the
parameters, at least not for the time being.  Moreover, class ESmry
exclusively uses the "i,j,k" sub-key for block-related parameters so
switch those to reference the IJK identifiers.

Finally, as class ESmry currently does not support reading separate
(multiple) summary files, switch the input decks to generate unified
output.
2019-10-14 21:29:27 +02:00
Bård Skaflestad
6d9deefb29 Make Most Unit Tests Independent of LibECL
This commit switches a set of OPM-Common's unit tests away from
using direct calls to libecl functions and into using base types
from OPM-Common itself (along with Boost.Filesystem).

In particular summary related queries are replaced by calls to ESmry
member functions (wrapped in libecl-like interfaces to minimise code
changes).  We disable checks on unit strings since ESmry currently
does not have a way of associating those with individual variables.
2019-10-14 21:29:27 +02:00
Bård Skaflestad
afaa99d3f4 Decouple Most of OPM-Common From LibECL
This commit takes a pass at the implementation files in opm-common
and removes references to libecl functions where practical.  In
particular we switch to using types from C++'s standard library (and
Boost.Filesystem) to achieve the effects of the interfaces being
replaced.

We also insert direct calls to Posix function fnmatch() to preserve
existing pattern matching behaviour (well lists and well templates).
2019-10-14 21:29:27 +02:00
Bård Skaflestad
c69a111e7a ESmry: Add Way of Retrieving Ministep Index at Start of Report Step
This commit introduces a new member function

    int ESmry::miniStepIdxAtReportStep(rptStep)

which returns the zero-based ministep corresponding to the start of
the given report step (one-based indexing).  This will simplify
decoupling a few unit tests from libecl.
2019-10-14 21:29:27 +02:00
Markus Blatt
112e698d0a
Merge pull request #1102 from blattms/backport-pr-1082
Backport PR #1082
2019-10-14 21:12:11 +02:00
Bård Skaflestad
7dffd9f2e7 Replace Writer for Summary/SMSPEC Files
This commit replaces the existing system for writing summary and
specification (SMSPEC) files with a new implementation based on
class EclOutput.  We package the evaluators of individual parameters
in a set of classes determined by the parameter's category which
each implement a virtual 'update()' function.  This update function
ultimately writes new values into a SummaryState object.

Add a factory-like system for instantiating the appropriate class
depending on a SummaryNode's 'category()'.  Also, add a helper class
for managing the parameters that a configured in a simulation
model's SUMMARY section in order to distinguish these from those
parameters that are merely needed for restart purposes.  The summary
class's 'eval()' function then becomes a loop over the evaluators
for parameters in SUMMARY followed by a loop over the evaluators for
restart vectors.

We reimplement the 'internal_store()' function in terms of an
std::vector of a helper structure 'MiniStep' which holds a ministep
ID (contiguous counter started at zero), a report step ID, and all
the evaluated parameters of this ministep.  The final write function
then consists of outputting those ministep structures that have
accumulated since the previous call to write().  If a simulation
does not call write at all, then this will accumulate all parameters
for all ministeps throughout the simulation history.

We create the SMSPEC file at most once, and write to it at most each
report step.  We create the summary file once (if unified) or at
each report step (if separate).
2019-10-14 20:47:36 +02:00
Bård Skaflestad
a3f2c115f1 SMSPEC: Temporarily Restore Unconditional RESTART Vector
Needed to ensure we create the same summary/specification files as
the existing system.  We will revert this change once the new system
is in place and we can afford to update the reference solutions.
2019-10-14 20:47:36 +02:00
Joakim Hove
32ac0034a7
Merge pull request #1091 from stefoss23/deck_keyword_vector
deckkeyword: new constructors takes (ParserKeyword, std::vector).
2019-10-11 20:04:50 +02:00
Steinar Foss
17f246c1a7 deckkeyword: new constructors takes (ParserKeyword, std::vector).
DeckKeyword: test for vector<int> data constructor.

DeckKeyword takes std::vector<int> and std::vector<double>.

...

...

...

...
2019-10-11 13:47:14 +02:00
Joakim Hove
d66f0a664c
Merge pull request #1067 from joakim-hove/box-grid
Consider active cells in BOX implementation
2019-10-11 10:57:39 +02:00
Joakim Hove
9af248f889
Merge pull request #1072 from stefoss23/python_deck_values
python: new DeckKeyword constructor takes DeckRecords
2019-10-11 10:57:14 +02:00
Joakim Hove
3c26314475
Merge pull request #1087 from bska/bypass-filleps-for-2p
INIT File: Bypass FILLEPS for Two-Phase Systems
2019-10-11 10:56:25 +02:00
Joakim Hove
12e2c9c545
Merge pull request #1081 from bska/prepare-new-summary-writer
Prepare New Summary Writer
2019-10-11 10:39:59 +02:00
Joakim Hove
79d3f236c2
Merge pull request #1086 from stefoss23/python_conn
Python: removed properties.py, shedule.py, parser_module.py and sunbeam.py
2019-10-11 08:42:07 +02:00
Joakim Hove
5c280ed72a
Merge pull request #1083 from joakim-hove/T
Keywords on starting with T
2019-10-11 08:39:19 +02:00
Joakim Hove
73cc9cff3a
Merge pull request #1085 from stefoss23/add_keywords_H
Adding keywords beginning w/ H and I.
2019-10-11 08:39:07 +02:00
Bård Skaflestad
c736e71e46 INIT File: Bypass FILLEPS for Two-Phase Systems
Flow's saturation function finalizers don't currently handle models
with fewer than three active phases.  Don't attempt to fill in
scaled endpoint vectors in this case, but issue a warning that we're
ignoring FILLEPS here.
2019-10-10 22:28:41 -05:00
Steinar Foss
92f69d7648 removed sunbeam.py. 2019-10-10 12:57:49 +02:00
Steinar Foss
bad1b1d3fb removed parser_module.py. 2019-10-10 12:56:51 +02:00
Steinar Foss
0e1339e648 removed all test suppoert for parser_module.py. 2019-10-10 12:54:22 +02:00
Steinar Foss
3cc205ee93 ELIMINATED 'properties.py'. 2019-10-10 12:54:22 +02:00
Steinar Foss
ad564ad651 python connection: exposed directly via pybind11.
python connection. added property pos.

removed shedule.py.

test_connection.py passed.

test_wells.py: test_completion passes.

removed opm.io.config.

renamed test_state2.py -> test_state.py.
2019-10-10 12:54:40 +02:00
Steinar Foss
39c1056c87 added keywords beginning w/ H and I.
added keywords HMWELCON, HMWPIMPLT.

added keyword HMxxxxxx.

added keywords HRFIN, HWKRO, HWKRORH.

added keywords HWKRORW, HWKRWM HWKRWR.

added keyword HWPCW.

added keywords HWSNUM, HWSOGCR, HWSOWCR.

added keyword HWSWCR.

added keywords HWSWL, HWSWLPC, HWSWU.

added keywords HXFIN, HYDRHEAD, HYFIN.

added keywords HYMOBGDR, HYST, HYSTCHCK.

added keyword HZFIN.

added keywords IHOST, IMBNUMMF, IMPCVD.

IMPLICIT, IMPORT, IMSPCVD.

added keywords INSPEC, INTPC, IONROCK.

added keywords IONXROCK, IONXSURF.

...
2019-10-09 15:29:48 +02:00
Joakim Hove
9f1858265a Create ParserKeywords in try catch block 2019-10-09 11:53:25 +02:00
Joakim Hove
5a9f5c0999 Keywords on starting with T 2019-10-09 08:10:50 +02:00
Bård Skaflestad
a5d943fd8f Unit System: Use Plural for TIME Names
The summary file must have DAYS (&c) for its TIME vector unit.  This
is a step towards enabling new summary writer functionality.

Update the RFT writer accordingly.
2019-10-08 23:25:48 -05:00