Commit Graph

11593 Commits

Author SHA1 Message Date
Joakim Hove
c660b2e4b4 Make SummaryState public member in msim class 2022-01-28 12:05:17 +01:00
Joakim Hove
4928782cf4 Add Schedule member to the msim class 2022-01-28 12:05:17 +01:00
Markus Blatt
325e559229 [cmake][bugfix] Test python/embedded python flags before source_hook.
If cmake is run with `-DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_ENABLE_PYTHON=OFF`
a cmake error was produced because the library would depend on
python/cxx/builtin_pybind11.cpp which would not be generated.

We fix this by doing the Python sanity check (deactivate embedded
python if python is disabled) before running source_hook that adds the
dependency.

Closes #2940
2022-01-27 15:21:33 +01:00
Markus Blatt
ba2065853a
Merge pull request #2943 from joakim-hove/setup-linker
Make sure env variable CC is set also if no ccache
2022-01-27 11:37:59 +01:00
Markus Blatt
1daa7d1df4 [bugfix] Make library list used for setup.py a comma separated list.
It is used verbatim in setup.py in the list that specifies the linker
flage. Hence it needs to comma separted instead of using a semicolon
as separator.

We also rename it to SETUP_PY_LINKAGE to indicate where it is used.

Closes #2947
2022-01-27 11:26:56 +01:00
Bård Skaflestad
7471cef938
Merge pull request #2944 from bska/chase-api-update-for-non-python
Update Signature for PyAction::run When !EMBEDDED_PYTHON
2022-01-26 21:12:44 +01:00
Bård Skaflestad
15abd2bd49 Update Signature for PyAction::run When !EMBEDDED_PYTHON
Otherwise, we get build errors of the form "no declaration matches"
2022-01-26 20:57:03 +01:00
Joakim Hove
07500d5f09 Set the CC environment variable also for non ccache situation 2022-01-26 12:20:43 +01:00
Joakim Hove
c0be54af92
Merge pull request #2939 from joakim-hove/pyaction-use-actionx
Pyaction use actionx
2022-01-26 08:29:27 +01:00
Joakim Hove
46b663218a Enable running normal ACTIONX keywords from PYACTION
The run() function invoked by PYACTION has got a new fifth argument which is a
callable the script should utilize to apply the keywords from an ACTIONX
keyword. The callable is implemented as C++ lambda which will run the
Schedule::iterateScheduleSection() method and make sure an updated
SimulatorUpdate variable can be passed back to the simulator.
2022-01-25 10:04:43 +01:00
Joakim Hove
4224e26321 Accept empty list of matching_wells when resolving '?' 2022-01-25 09:45:32 +01:00
Joakim Hove
45a6e4fb15 Add method Actions::has( action_name ) 2022-01-25 09:45:32 +01:00
Markus Blatt
5e5dd48cee
Merge pull request #2942 from joakim-hove/use-cmake-cxx-compiler
Use C++ compiler from cmake in setup.py
2022-01-24 21:52:57 +01:00
Joakim Hove
c1905359d9
Merge pull request #2941 from bska/consistent-kw-repr
Fix Several Name Inconsistencies in JSON Keyword Representation
2022-01-24 16:58:35 +01:00
Bård Skaflestad
6bb8855afd Fix RADFIN Keyword Representation
Previous version was a copy of RADFIN4 representation.
2022-01-24 16:42:53 +01:00
Joakim Hove
b3faf8abf2 Use C++ compiler from cmake in setup.py 2022-01-24 16:05:25 +01:00
Bård Skaflestad
1603100f0d Remove Extraneous JSON Input Files
There are no such keywords as 'RSSSPEC' (three 'S'-es) or 'DFLOWR'.
2022-01-24 15:51:50 +01:00
Bård Skaflestad
6dcdcaf08c Fix Keyword Names
Should match the name of the generator JSON input file.
2022-01-24 15:51:50 +01:00
Joakim Hove
8a0e1b21b9
Merge pull request #2932 from joakim-hove/pyaction-applyaction
Pyaction applyaction
2022-01-24 08:20:14 +01:00
Joakim Hove
9a80c00828
Merge pull request #2933 from blattms/rename-workarea.cpp-to-workarea.hpp
Renames header tests/WorkArea.cpp to tests/WorkArea.hpp
2022-01-23 10:54:07 +01:00
Bård Skaflestad
7d9c1b1aaf
Merge pull request #2938 from blattms/support-libfmt8
Cast enum classes to int when used in fmt::format.
2022-01-22 09:09:38 +01:00
Markus Blatt
034ea368b0 Cast enum classes to int when used in fmt::format.
This is needed for libfmt >= 8.1.0 as in that version the
cast to int was removed from inside the fmt::format call and an
assertion will fail:
```
In file included from /usr/include/fmt/format.h:48,
                 from /build/opm-common-2021.10/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp:22:
/usr/include/fmt/core.h: In instantiation of 'constexpr fmt::v8::detail::value<Context> fmt::v8::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; fmt::v8::detail::type <anonymous> = fmt::v8::detail::type::custom_type; T = Opm::UDQVarType&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]':
/usr/include/fmt/core.h:1855:77:   required from 'constexpr fmt::v8::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&}; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long unsigned int, Opm::UDQVarType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long unsigned int, Opm::UDQVarType}]'
/usr/include/fmt/core.h:1872:38:   required from 'constexpr fmt::v8::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<Args>::type>::type ...> fmt::v8::make_format_args(Args&& ...) [with Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&}]'
/usr/include/fmt/core.h:3119:44:   required from 'std::string fmt::v8::format(fmt::v8::format_string<T ...>, T&& ...) [with T = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType}; std::string = std::__cxx11::basic_string<char>; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType>]'
/build/opm-common-2021.10/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp:523:27:   required from here
/usr/include/fmt/core.h:1728:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1728 |       formattable,
      |       ^~~~~~~~~~~
/usr/include/fmt/core.h:1728:7: note: 'formattable' evaluates to false
```
2022-01-21 22:13:54 +01:00
Joakim Hove
1c3aa651f1
Merge pull request #2937 from blattms/udqenum-fix-spelling
Fixes spelling error in UDQEnums.cpp
2022-01-21 21:00:33 +01:00
Markus Blatt
ad023b57c1 Fixes spelling error in UDQEnums.cpp 2022-01-21 18:33:13 +01:00
Markus Blatt
1b76df42cb
Merge pull request #2936 from bska/fix-keyword-name
Ensure That Keyword Name Matches Filename
2022-01-21 18:27:41 +01:00
Bård Skaflestad
36903d3e9d Ensure That Keyword Name Matches Filename
Otherwise, we get "missing keyword" errors at the parsing stage.
2022-01-21 15:08:02 +01:00
Bård Skaflestad
10bdd92b94
Merge pull request #2934 from bska/fix-uninitialized-member
Ensure Proper Initialisation of All TableManager Member
2022-01-21 15:06:05 +01:00
Bård Skaflestad
6f79a86e66 Ensure Proper Initialisation of All TableManager Member
Otherwise, the equality operators for a default-constructed
TableManager object, mostly used in unit tests, will depend on
uninitialised values.

Thanks to [at]akva2 for the initial clue to the underlying cause.
2022-01-21 13:13:10 +01:00
Markus Blatt
274cee38c7 Renames header tests/WorkArea.cpp to tests/WorkArea.hpp 2022-01-21 10:18:56 +01:00
Joakim Hove
49c10378bb
Merge pull request #2929 from bska/internalise-interreg-smry-nodes
Make SummaryConfig Nodes for Inter-Region Flows
2022-01-20 17:17:20 +01:00
Bård Skaflestad
e1ec7fc828 Register Inter-Region Flow Cumulatives for SummaryState
Needed for correct accumulation in future work.
2022-01-20 09:57:15 +01:00
Bård Skaflestad
5a2876642e Make SummaryConfig Nodes for Inter-Region Flows
This commit adds new nodes pertaining to the inter-region flows to
the summary configuration keyword list.  We combine the pair of
region IDs into a single 'NUMS' value as part of creating the node.
We also split inter-region nodes into a "supported" and an
"unsupported" set, with the former containing the oil, gas, and
water keywords.

While here, also correct a misprint in a diagnostic message which I
noticed as part of developing the new feature.
2022-01-20 09:57:15 +01:00
Bård Skaflestad
4b2a37a39e Split Combined Vector ID Calculation Out to Helpers
This commit introduces new helper functions

    int EclIO::combineSummaryNumbers(int, int)
    tuple<int, int> EclIO::splitSummaryNumber(int)

that know about the relation

    combined = n1 + 32768*(n2 + 10)

This relation is typically used to combine one-based region IDs for
inter-region flows into a single 'NUMS' entry in the summary file.
2022-01-20 09:47:18 +01:00
Joakim Hove
34d71e0c2e Add Schedule::runPyAction() to be called from the simulator 2022-01-20 09:28:12 +01:00
Joakim Hove
9ce5ca2b21 Pass matching wells to Schedule::applyAction() 2022-01-20 08:22:21 +01:00
Joakim Hove
b62b5be44f Remove unused argument sim_time from Schedule::applyAction() 2022-01-20 08:12:10 +01:00
Joakim Hove
4a8f432b10
Merge pull request #2930 from goncalvesmachadoc/patch-5
Fix SALTVD unit
2022-01-20 08:01:20 +01:00
Paul Egberts
3ea67696e1 Changed unit string to Salinity 2022-01-18 11:29:16 +01:00
Paul Egberts
0e24dc78c4 allow for explicit initial condition for SALT and SALTP 2022-01-18 11:05:17 +01:00
Cintia Goncalves Machado
39fb33cd52
Fix SALTVD unit
According to eclipse/flow manuals, saltvd input should be lb/stb (Salinity in Units.hpp), not Density (lb/ft3).
2022-01-18 11:02:49 +01:00
Joakim Hove
c680443251
Merge pull request #2928 from bska/parse-interreg-sumkw
Recognize Additional Inter-Region Flow Summary Vector Keywords
2022-01-14 10:05:33 +01:00
Bård Skaflestad
2fe8b4c802 Recognize Additional Inter-Region Flow Summary Vector Keywords
This commit adds support for recognizing additional inter-region
flow rate/cumulatives at the parser level.  In particular, we now
have input support for the E300-compatible keyword strings

    R[OGW]F(R[-+]?|T[-+])

(e.g., ROFR, RGFT-, or RWFR+).  This, in turn, ensures that the
parsing process does not abruptly terminate when encountering such
summary keywords.  This is also a necessary step towards supporting
actually calculating those summary vectors, but we presently do not
support doing so.

Expand the minimum, input-reading only, corresponding unit test to
include the oil, gas, and water varieties of the new keyword strings.

While here, also properly classify the per-phase gas cumulatives

    RGFTG, RGFTL

as inter-region summary vectors.  These were inadvertently listed as
per-region vectors (i.e., in the REGION_PROBE instead of in the
REGION2REGION_PROBE).
2022-01-14 09:48:33 +01:00
Joakim Hove
1b96dd81d9
Merge pull request #2927 from OPMUSER/Fix-Duplicate-Keywords
Delete GRUPRIG from OPM Flow Keyword List
2022-01-12 19:00:48 +01:00
Bård Skaflestad
447db33942
Merge pull request #2924 from blattms/improve-readme
Slightly improve readme
2022-01-12 17:31:19 +01:00
Markus Blatt
14245c968a Add posix as requirement 2022-01-12 15:14:36 +01:00
OPMUSER
14e047aa7e Update keyword_list.cmake
Remove OPm Flow version of GRUPRIG from keyword_list.cmake
2022-01-12 18:32:12 +08:00
OPMUSER
0c3f2ac64d Delete GRUPRIG from OPM Flow Keyword List
GRUPRIG was both in the E100 and the OPM Flow keyword definitions. So delete the OPM Flow version. Need to run Jenkins, just in case
2022-01-12 18:04:58 +08:00
Joakim Hove
089b6bff42
Merge pull request #2926 from joakim-hove/rm-fnmatch
Remove stale #include <fnamatch.h>
2022-01-12 08:26:43 +01:00
Joakim Hove
ea5c847c41 Remove stale #include <fnamatch.h> 2022-01-12 07:42:34 +01:00
Joakim Hove
24e58e36aa
Merge pull request #2925 from joakim-hove/fnmatch
Use std::regex to implement fnmatch()
2022-01-11 13:36:43 +01:00