Commit Graph

14608 Commits

Author SHA1 Message Date
Markus Blatt
d2a2ee1b22 Bump version to 2023.10 (final) 2023-11-12 14:16:48 +01:00
Markus Blatt
5b2c69628d
Merge pull request #3761 from blattms/backport-of-pr-3760
[backport] Fix build with older versions of boost
2023-11-10 11:28:04 +01:00
Arne Morten Kvarving
4586ca2185 fixed: earlier boosts did not support command line parameter separation
for older versions we will thus see '--' as argv[1] and the actual
parameter as argv[2].
2023-11-10 11:22:30 +01:00
Arne Morten Kvarving
e333311b5a fixed: adjust compare_at_tolerance namespace for earlier boost 2023-11-10 11:22:30 +01:00
Arne Morten Kvarving
ef24f51a97 fixed: adjust include path of float_point_comparison for earlier boost 2023-11-10 11:22:30 +01:00
Arne Morten Kvarving
d1ee5b1da5 fixed: BOOST_DATA_TEST_CASE was added in boost 1.67
use a loop for earlier versions
2023-11-10 11:22:30 +01:00
Arne Morten Kvarving
a9f8a279d4 fixed: earlier boosts only accepts boost::mpl::list for BOOST_AUTO_TEST_TEMPLATE 2023-11-10 11:22:30 +01:00
Markus Blatt
f847d42b9e
Merge pull request #3759 from blattms/backport-man
[backport] Update and improve man pages for release
2023-11-09 16:39:53 +01:00
Markus Blatt
c055784352 Update and improve man pages for release 2023-11-09 16:38:19 +01:00
Markus Blatt
6bf30ec3f4
Merge pull request #3749 from blattms/backport-of-pr-3742
Fix to linker error in building tests (clang, macOS)
2023-11-06 10:03:15 +01:00
David Landa Marban
d37bb3abeb Fix to linker error in building tests (clang, macOS) 2023-11-06 09:58:30 +01:00
Markus Blatt
3716af7a04 Release candidate 2023.10-rc2 2023-10-30 15:32:28 +01:00
Markus Blatt
08ac19f242
Merge pull request #3736 from blattms/backport-of-pr-3712
Better error handling for problems in conditions of ACTIONX
2023-10-30 08:44:33 +01:00
Markus Blatt
574734680f Fixed shadowing variable warning. 2023-10-30 08:26:34 +01:00
Markus Blatt
89f14594e1 Improved the "improved" error message even more. 2023-10-30 08:26:34 +01:00
Markus Blatt
25de42037f Introduces method parseActionX returning the action and error strings.
This way there is no constructor with an output parameter and we
prevent introducing an additional member in ActionX that is only used
in one constructor.
2023-10-30 08:26:34 +01:00
Markus Blatt
f04ada2d44 Better error handling for problems in conditions of ACTIONX.
When encountering these (e.g. a number instead of an expression on
the left hand side) the simulator would immediately abort with an
error message like:
```
Error: An error occurred while creating the reservoir schedule
Internal error: Extra unhandled data starting with token[0] = 135

Error: Unrecoverable errors while loading input: Extra unhandled data starting with token[0] = 135
```
(The message above is for the number 135 on the left hand side)

With this change we now use the usual way of handling errors and
warnings in the parser and continue parsing.

The error message for the problem above is now
```
Error: condition of action EX1 has the following error: Left side of comparsion (135) has to be an expression!

Error: Problem with keyword ACTIONX
In model.schedule line 562
condition of action EX1 has the following error: Left side of comparsion (135) has to be an expression!

Error: Unrecoverable errors while loading input: Problem with keyword ACTIONX
In model.schedule line 562
condition of action EX1 has the following error: Left side of comparsion (135) has to be an expression!
2023-10-30 08:26:34 +01:00
Markus Blatt
722c3592a4
Merge pull request #3735 from blattms/backport-of-pr-3710
Backport of pr 3710
2023-10-30 08:25:09 +01:00
Markus Blatt
223e8c6877 Use LESS comparison to test if system is at least 64bit.
Indeed this is clearer and better.
2023-10-30 08:21:51 +01:00
Markus Blatt
5ecc7caa23 Make CMake fail on non-64bit systems.
Running simulations on those does not make sense as it seriously
limits the time span that can be simulated. In addition the OPM code
neglects 32bit issues at various places as it was written at a time
where 64bit was already ubiquitous.

Currently, we would fail in some regression tests on 32bit
systems. With this change CMake will already check whether it is run
on a 64bit system and already fail if this is not the case.
2023-10-30 08:21:51 +01:00
Markus Blatt
e494e6ba10 Release candidate 2023.10-rc1 2023-10-17 16:58:13 +02:00
Markus Blatt
69aaab7811
Merge pull request #3718 from blattms/backport-of-pr-3713
[fix] AggregateActionX: Do not assume an ACTIONX condition exists
2023-10-17 12:34:54 +02:00
Markus Blatt
157e1b0f86 [fix] AggregateActionX: Do not assume an ACTIONX condition exists
The rest of the code allows an ACTIONX keyword without any
condition (Such an action will never be evaluated). Yet
AggregateActionXData assumed that there is always at least one
condition. This lead to a segmentation fault if that was not the case.

It seemed like iAC[offset + Ix::FirstGreater] is used nowhere and
therefore we now always use 0 there. I was not brave enouogh to remove
the storage for it, because I fear this might break backwards
compatibility of the output layer.
2023-10-17 12:31:36 +02:00
Markus Blatt
25340d8ec7
Merge pull request #3717 from blattms/backport-of-pr-3714
adding ThreeComponentFluidSystem.hh to CMakeLists_files
2023-10-16 16:04:05 +02:00
Kai Bao
88fb98db6e adding ThreeComponentFluidSystem.hh to CMakeLists_files
to let other modules be able to access it.
2023-10-16 15:53:22 +02:00
Markus Blatt
0031f40ec5
Merge pull request #3716 from blattms/backport-of-pr-3705
Support for SGWFN sat functions (format type 2)
2023-10-16 15:44:57 +02:00
David Landa Marban
9696d58498 Support for SGWFN sat functions (format type 2) 2023-10-16 15:24:51 +02:00
Markus Blatt
c419f8951d
Merge pull request #3715 from blattms/backport-of-pr-3708
Don't Reference Non-Existent W/G Names From UDQ Set
2023-10-16 15:18:34 +02:00
Bård Skaflestad
6f3b3f9efd Don't Reference Non-Existent W/G Names From UDQ Set
Member function SummaryState::update_udq() did not take into account
the possibility that wells or groups might not yet have come online.
In particular, UDQSet::operator[](const string&) will throw an
exception if the argument string does not name an existing member of
the UDQ set.

This commit makes the call to operator[]() conditional on the named
entity existing and thereby enables updating well and group level
UDQs before these names have been entered in, e.g., WELSPECS or
GRUPTREE.  Missing entities get the 'undefined_value'.
2023-10-16 13:19:56 +02:00
Markus Blatt
a4f9fb1dd8
Merge pull request #3706 from blattms/fix-missing-functional-gcc12
Include missing functional header to fix compilation with g++-12
2023-10-11 12:40:09 +02:00
Markus Blatt
f3bd34df71 Sort header includes as requested.
Sorting criteria is not 100% clear to me though. I hope this does not
break anything...
2023-10-11 11:41:40 +02:00
Markus Blatt
a309dbb4d0 Include missing functional header for g++-12
Fixes
```
/opm/input/eclipse/Schedule/Schedule.hpp:241:14: error: ‘function’ in namespace ‘std’ does not name a template type
  241 |         std::function<std::unique_ptr<SegmentMatcher>()> segmentMatcherFactory(std::size_t report_step) const;
      |              ^~~~~~~~
```
2023-10-10 21:12:15 +02:00
Markus Blatt
9e3fa794ce
Merge pull request #3587 from bska/trigger-assign-from-actionx
Track Pending Assignments in UDQ Configuration Object
2023-10-10 12:41:33 +02:00
Bård Skaflestad
09ffacb5bf Track Pending Assignments in UDQ Configuration Object
The existing implementation used the UDQ State object to track
pending ASSIGN operations, mainly in terms of the report step index,
but this implies that the logic implicitly assumes an ASSIGN
operation can run at most once per report step.  That assumption
usually holds, but fails if the ASSIGN operation is triggered from
an ACTIONX block that happens to run multiple times within a report
step.

This commit instead introduces a new data member,

    UDQConfig::pending_assignments_

that keeps track of all ASSIGN operations that have been added for
the current report step.  We clear those pending assignments when
forming a new Schedule block (ScheduleState object), under the
assumption that all pending ASSIGN operations have been affected at
the previous time level (report step).

In effect, this new data member assumes the role of

    UDQState::assignments

and we therefore remove that data member and update the signature of

    UDQState::add_assign()

to account for the fact that the 'report_step' parameter is no
longer needed.
2023-10-09 15:32:48 +02:00
Tor Harald Sandve
8ed1b4c21e
Merge pull request #3656 from svenn-t/co2store_enthalpy_reference
CO2STORE new reference state for enthalpy
2023-10-06 17:52:25 +02:00
Markus Blatt
4c511b788c
Merge pull request #3375 from bska/eval-seg-udq
Compute Segment Level UDQ Values
2023-10-06 15:35:23 +02:00
Bård Skaflestad
2be2063906
Merge pull request #3700 from blattms/prominent-toplevel-topology-errors
Make top level section errors more prominent / Allow global keywords before RUNSPEC
2023-10-06 11:18:07 +02:00
Markus Blatt
4daaf493cb Fix documentation of isGlobalKeyword. 2023-10-06 10:55:03 +02:00
Markus Blatt
3a63c1723b Allow global keywords before RUNSPEC in input file. 2023-10-05 22:33:08 +02:00
Bård Skaflestad
7d16924f06 Defer Bounds Checking to Schedule::operator[]()
We don't need to reimplement logic that's already present and it is
always an error to pass a 'report_step' argument that exceeds
Schedule::size().

Pointed out by: [at]blattms.
2023-10-05 18:25:49 +02:00
Bård Skaflestad
0f1f2f74f0 Highlight Deferred Initialisation in EvalAssign::operator()
The logic and the reasoning behind it was too obtuse.
2023-10-05 18:23:38 +02:00
Bård Skaflestad
c93243f939 Rename Segment Matcher Factory Data Member
Invoking the factory creates a segment matcher object, not a new
factory.

Suggested by: [at]blattms
2023-10-05 18:22:07 +02:00
Markus Blatt
4caa693d71 Make top level section error more prominent to help users.
If there are errors at the top level (e.g. RUNSPEC comes after
NOECHO), we might get very many errors and the user might miss
the relevant ones on top.

To fix this we will now print those errors last just before exiting
the simulator because of these errors.
2023-10-05 17:09:38 +02:00
Bård Skaflestad
381ab825b1 Support Segment Level UDQ ASSIGN Statements
This commit adds parser and evaluation logic necessary to handle
ASSIGN statements for segment level UDQs.  This requires a segment
matching facility in UDQConfig::add_assign() which, in turn, must be
passed from the calling context in Schedule::handleUDQ().  Update
APIs accordingly.

We also split handling segment level UDQ assignments to a new helper
function, UDQConfig::add_enumerated_assign(), which might be
generalised to handle block level UDQs in the future.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
f3245ad88a Refactor Assignment Evaluation Routine
In particular, use a single loop over the 'input_index' instead of
one separate loop for each supported variable type.  This is in
preparation of adding suport for segment level UDQ ASSIGN statements.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
cf9b66d8ec Make Derivation of Enumerated Well Items Public
We need this ability to handle segment level UDQ ASSIGN statements
too, so give the operation a well defined home and call it where
applicable.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
72519e3e1f Add Support for Outputting Segment Level UDQs to Summary
This commit adds logic that enables recognizing segment level UDQs
in the summary output writer.  We calculate all segment level UDQs
and add the values to the summary state for possible use in ACTIONX
too.  The latter is not yet tested.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
adab33ac60 Compute Segment Level UDQ Values
This commit adds support for calculating UDQs at the segment level,
i.e., UDQs named 'SU*'.  This necessitates an API change for the UDQ
context constructor and, transitively, every function that forms UDQ
context objects.  We pass a factory function that will create
segment matcher objects on demand, and provide a default
implementation of this factory function in the Schedule class.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
a8d3dff2a4
Merge pull request #3696 from bska/msw-rst-fixup
Fix Multiple Issues in MSW Output Array Creation Logic
2023-10-04 09:55:02 +02:00
Bård Skaflestad
6d3ee57dd5 Define ILBR/ILBS in Terms of Depth First Traversal
The existing algorithm was a little too fragile and dependent on
branch numbers.  This new version starts at segment 1/branch 1 and
follows Segment::inletSegments() in depth-first order, taking care
to enqueue new branches as they're encountered instead of in
numerical order.  We search to the end of each branch before
switching to the next branch.  This ensures determinism regardless
of branch numbering and input ordering.

While here, switch iLBR_ to a WindowedMatrix<int> to simplify branch
references in the output table.
2023-10-02 14:59:55 +02:00