Commit Graph
100 Commits
Author SHA1 Message Date
Bård Skaflestad 03795d5b23 Merge pull request #5588 from akva2/move_python_initialization_function
Move python initialization function
2024-09-09 14:54:14 +02:00
Bård Skaflestad 95af21095e Merge pull request #5587 from akva2/fix_python_binding_version
fix python package versioning
2024-09-09 12:57:16 +02:00
Bård Skaflestad 8f761c51a2 Merge pull request #5582 from akva2/micro_tu_optims
Move more opm-models code to translation units
2024-09-05 15:34:47 +02:00
Bård Skaflestad 46c652b553 Fix Build on Older Compilers
The strsignal() function is declared in <string.h> on those.
2024-09-05 13:19:44 +02:00
Bård Skaflestad 3ee6c07076 Merge pull request #5573 from bska/threept-horiz-sfunc-consistency-checks-impl
Add Saturation Function Consistency Checks for SCALECRS
2024-09-05 11:41:48 +02:00
Bård Skaflestad 3de20b46b6 Add Saturation Function Consistency Checks for SCALECRS
This commit introduces consistency checks for the scaled displacing
saturation in the three point horizontal scaling method
(SCALECRS=YES).  These plug into the framework introduced in commit
c3939c544 (PR #5438).  We implement the following two checks

  - SGCR < 1-SOGCR-SWL < SGU
  - SWCR < 1-SOWCR-SGL < SWU

which collectively guarantee a mobile displacing oil saturation in
the two phase gas/oil and oil/water systems.
2024-09-05 10:36:43 +02:00
Bård Skaflestad 9a0e39c1ad Merge pull request #5578 from akva2/parametersystem_tu
ParameterSystem: add translation unit
2024-09-05 10:34:51 +02:00
Bård Skaflestad be94b037bc Merge pull request #5579 from bska/dont-count-cells-if-not-needed
Don't Count Cells Unless Needed
2024-09-05 10:04:41 +02:00
Bård Skaflestad 329ad50e59 Don't Count Cells Unless Needed
If the user chooses a specific number of NLDD domains, there is no
need to compute the default number of domains based on a specific
target number of cells per domain.  Defer the, potentially costly,
calculation to when we know we need it.

While here, also split/rejoin a couple of long lines.
2024-09-05 09:45:16 +02:00
Bård Skaflestad 415d1a1173 Merge pull request #5572 from bska/wphase-sfunc-consistency-checks-impl
Add Water Phase Saturation Function Consistency Checks
2024-09-04 15:02:00 +02:00
Bård Skaflestad be64ef3ef6 Add Water Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the water
phase saturation functions.  These plug into the framework
introduced in commit c3939c544 (PR #5438).  We implement the
following three checks

  - 0 <= SWL < 1
  - 0 < SWU <= 1
  - SWL <= SWCR < SWU

which collectively enable a non-negative oil saturation in the two
phase oil/water system.
2024-09-04 13:47:33 +02:00
Bård Skaflestad d69d929d37 Merge pull request #5571 from bska/gphase-sfunc-consistency-checks-impl
Add Gas Phase Saturation Function Consistency Checks
2024-09-04 13:02:25 +02:00
Bård Skaflestad da1e7b1114 Merge pull request #5575 from akva2/parallel_tu
Add some more translation units for code from opm-models
2024-09-04 12:46:05 +02:00
Bård Skaflestad 9c246faefa Add Gas Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the gas phase
saturation functions.  These plug into the framework introduced in
commit c3939c544 (PR #5438).  We implement the following three checks

  - 0 <= SGL < 1
  - 0 <= SGU < 1
  - SGL <= SGCR < SGU

which collectively enable a non-negative oil saturation in the two
phase gas/oil system.
2024-09-04 11:34:39 +02:00
Bård Skaflestad 44d22a05ba Merge pull request #5574 from akva2/blackoilparams_tu
BlackoilXXParams: introduce translation units
2024-09-04 11:31:19 +02:00
Bård Skaflestad b2863da3c9 Merge pull request #5560 from akva2/add_flow_blackoil_float
Add float blackoil simulator
2024-09-04 10:23:30 +02:00
Bård Skaflestad 5b9051a120 Merge pull request #5570 from bska/ophase-sfunc-consistency-checks-impl
Add Oil Phase Saturation Function Consistency Checks
2024-09-03 12:49:12 +02:00
Bård Skaflestad 2e70fc407e Add Oil Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the oil phase
saturation functions.  These plug into the framework introduced in
commit c3939c544 (PR #5438).  We implement the following four checks
for the gas/oil two-phase system

  - 0 <= SOGCR < 1
  - SWL + SGU <= 1
  - SOGCR < 1 - SWL - SGL
  - SOGCR < 1 - SWL - SGCR

which all guarantee a non-negative (mobile) oil saturation in the
gas/oil system.  Similarly, we implement the following four checks
for the oil/water two-phase system

  - 0 <= SOWCR < 1
  - SGL + SWU <= 1
  - SOWCR < 1 - SWL - SGL
  - SOWCR < 1 - SWCR - SGL

which provide the same guarantees as outlined above, but for the
oil/water system.

We add a base class, PhaseCheckBase<Scalar>, which provides a common
representation of the violated/critical predicates and implement the
specific checks as derived types of this base class.
2024-09-03 12:35:44 +02:00
Bård Skaflestad f3db66057f Merge pull request #4627 from akva2/import_opm_models
Import opm-models
2024-09-03 11:15:42 +02:00
Bård Skaflestad a26b981f45 Don't Require Floating Point from_chars() Function
This commit broadens the scope of commit 2ad332e0b (PR #922) to
apply to all compilers/libraries, not just Clang/libc++, which do
not have support for floating-point types in std::from_chars().
While hopefully a transient situation, this enables building the
parameter system with GCC versions prior to GCC 11.  We expect to
require version 11 in the not too distant future, though.  At that
point we should revert this commit.

We use a configure-time feature test of the compiler (CMake command
'try_compile') to detect whether or not the compiler supports
floating-point overloads of std::from_chars() and emit the result to
config.h as the new preprocessor symbol

    HAVE_FLOATING_POINT_FROM_CHARS

We use std::strtod() as the fall-back alternative for floating point
conversion if this symbol is defined to false (zero).
2024-09-03 10:49:49 +02:00
Bård Skaflestad d90d7113e0 Merge pull request #5569 from akva2/fix_python_depends
fixed: make python simulator object depend on copy_python
2024-09-02 09:39:09 +02:00
Bård Skaflestad d591c5ab3c Merge pull request #5565 from bska/fix-logic-statement
Fix DRVDT Initialisation Conditional
2024-08-30 17:36:35 +02:00
Bård Skaflestad f5aeffc8f5 Merge pull request #896 from akva2/floats
Add necessary changes to build float simulators
2024-08-30 15:28:34 +02:00
Bård Skaflestad a73cb6ee93 Fix DRVDT Initialisation Conditional
It does not make sense to pass

    episodeIdx && maxDRv_.empty()

as an argument to drvdtActive().
2024-08-30 15:16:46 +02:00
Bård Skaflestad a84359c1f7 Merge pull request #5566 from atgeirr/fix-cpp20ism
Avoid capturing structured bindings.
2024-08-30 14:31:27 +02:00
Bård Skaflestad d8c30f8758 Merge pull request #5537 from vkip/drsdt_restart
Avoid updating max Rs first step after restart.
2024-08-29 10:56:29 +02:00
Bård Skaflestad 9dca8256f3 Split Request Writing Into Stages
This commit introduces helper functions for each individual part of
a convergence report record in the INFOITER file.  In particular, we
create helpers for

  - Time related columns (report step, time step, time &c)
  - CNV pore-volume histogram columns
  - Reservoir convergence metrics (CNV and MB values per phase)
  - Well convergence metrics

This makes the body of the main loop in writeConvergenceRequest()
slightly easier to read and means that we can apply some additional
logic to the CNV pore-volume histograms if the number of values does
not match the expected 3 per type.  In that case we output sentinel
values (e.g., NaN and -1) to signify that the corresponding pieces
of information are unavailable.
2024-08-27 10:50:06 +02:00
Bård Skaflestad 0b40277e01 Revise Convergence Report Collection Procedure
This commit switches the parallel implemenation of function
Opm::gatherConvergenceReport() into using the general serialisation
framework (classes Opm::Serializer<> and Opm::Mpi::Packer).  In
particular, we add serializeOp() functions to each of the types

  - ConvergenceReport
  - ConvergenceReport::ReservoirFailure
  - ConvergenceReport::ReservoirConvergenceMetric
  - ConvergenceReport::WellFailure

and defer the job of converting the objects between in-memory and
byte stream representations to Opm::Serializer<>.  The new special
purpose class CollectConvReports inherits from the latter and uses
its pack() and unpack() member functions, along with its internal
m_buffer data member, to distribute each rank's convergence report
object to all ranks.  We add this feature here, in a very narrowly
scoped use case, to enable testing and experimentation before we
consider adding this distribution mechanism as a general feature in
Opm::MpiSerializer.
2024-08-27 10:50:06 +02:00
Bård Skaflestad 68cc5d917e Output CNV Histogram to INFOITER File
This commit tracks the number of cells and their associate fraction
of the model's "eligible" pore volume (total pore volume in
numerical aquifers subtracted from the model's total pore volume) in
three distinct categories as a function of the non-linear iteration
number:

  - 0: MAX_p { CNV_p } <= strict CNV tolerance
  - 1: MAX_p { CNV_p } \in (strict, relaxed]
  - 2: MAX_p { CNV_p } > relaxed CNV tolerance

We then output these cell counts and pore volume fractions as new
items in the INFOITER file to enable more targeted analysis of the
non-linear convergence behaviour.

To this end, introduce a type alias CnvPvSplit in the
ConvergenceReport and aggregate these across the MPI ranks before we
collect them in the ConvergenceReport objects.

While here, also reduce the amount of repeated logic in
gatherConvergenceReport.cpp through a few local lambdas.
2024-08-27 10:50:06 +02:00
Bård Skaflestad 359e4903d5 Merge pull request #5561 from akva2/janitoring
amgcpr: use override
2024-08-27 09:18:04 +02:00
Bård Skaflestad 1a6b063824 Merge pull request #5559 from akva2/janitoring
do not capture compile time data in lambda
2024-08-26 10:34:36 +02:00
Bård Skaflestad 3dbeed2199 Merge pull request #5550 from akva2/float_support3
Float support in simulators: Batch 3
2024-08-23 10:29:14 +02:00
Bård Skaflestad 8e16495f61 Merge pull request #5479 from bska/bhp-depth-corr
Revise Mixture Density Method for No-Flow Producers
2024-08-22 20:24:12 +02:00
Bård Skaflestad 93c368cbfa Revise Mixture Density Method for No-Flow Producers
This commit switches the approach introduced in commit eeb1b7e36 (PR
#3169) to using a mobility weighted average of cell level densities
for the connection level mixture densities in no-flow producing
wells.  We also use the recent stoppedOrZeroRateTarget() predicate
to identify those no-flow producing wells instead of inspecting the
connection flow rates.

The mobility weighted average gives a more monotone pressure buildup
for the stopped wells and this is usually what the engineer wants.
This revised approach furthermore needs fewer cell-level dynamic
properties so simplify the computeProperties() signature by
introducing a structure for the property callback functions and
update the callers accordingly.
2024-08-22 14:51:00 +02:00
Bård Skaflestad 586d8e2ddc Generate Property Object Directly
This commit switches computePropertiesForPressures() to return a
Properties object directly instead of populating an object
constructed in the caller.  There is just a single call site for
this function so there's no benefit to using an out parameter here.
While here, also collect the property callbacks into a structure to
simplify the function signature.  This also enables not filling in
the solvent properties unless solvent is active in the run.  Update
caller accordingly.
2024-08-22 14:51:00 +02:00
Bård Skaflestad 6f2ee80e41 Refactor Perforation Pressure Property Helper Function
In particular, split the sections of the main loop out to helper
functions

  - calculatePerforationOutflow() uses the global container factory
    to compute the outflow from each connection
  - initialiseConnectionMixture() computes the 'mix' array depending
    on the local flowing conditions of the connection.  We have
    renamed 'x' and 'mix' arrays to 'currentMixture' and
    'previousMixture' respectively to give more descriptive names in
    the process.

We've also split out the redistribution of the individual phases to
the new private helper functions reapportionGasOilMixture() and
reapportionGasWaterMixture() in order to reduce the cognitive load
of the main loop in computePropertiesForPressures().  While here,
employ pointer arithmetic to expose the underlying structure of the
assignment expressions.
2024-08-22 14:51:00 +02:00
Bård Skaflestad fa199461b5 Varnish Parts of Well Implementation
In particular

  * Split some long lines
  * Reverse conditions to reduce nesting
  * Mark potentially unused arguments as [[maybe_unused]]
  * Try to remove redundant calculations
  * Mark some objets 'const' where possible
2024-08-22 14:51:00 +02:00
Bård Skaflestad b74d84404e Merge pull request #5551 from akva2/float_support4
Float support in simulators: Batch 4
2024-08-21 13:57:24 +02:00
Bård Skaflestad 5914744f7c Merge pull request #5546 from totto82/fix_no_wells
BUGFIX Fix no wells case
2024-08-21 09:36:16 +02:00
Bård Skaflestad 5fd5027ebd Merge pull request #5549 from akva2/actionhandler_float
ActionHandler: instance for float
2024-08-21 09:22:13 +02:00
Bård Skaflestad e0e60fec8e Merge pull request #5548 from akva2/float_support2
Support float simulators - batch 2
2024-08-20 18:48:00 +02:00
Bård Skaflestad ac1cbd8987 Merge pull request #5545 from akva2/try_fix_alugrid_full_param
restore all flags for alugrid test
2024-08-20 11:57:30 +02:00
Bård Skaflestad afe34e1868 Merge pull request #5542 from akva2/float_support1
Add float support to simulators: Batch 1
2024-08-20 09:29:40 +02:00
Bård Skaflestad f9ce09acd7 Merge pull request #5543 from akva2/add_mixingratecontrols_serialization_test
added: (restart-)serialization test for MixingRateControls
2024-08-19 22:34:52 +02:00
Bård Skaflestad 36494d19f8 Merge pull request #5541 from atgeirr/warn-petgrid
More helpful message for PETGRID.
2024-08-19 17:03:25 +02:00
Bård Skaflestad 38ff9a9de4 Merge pull request #5538 from akva2/add_compile_unit_param_registration
Move parameter registration to translation units
2024-08-16 21:49:58 +02:00
Bård Skaflestad 8cc1a0e3f7 Merge pull request #928 from akva2/remove_typetag_param_system
remove typetag based parameter system
2024-08-16 21:11:12 +02:00
Bård Skaflestad 2d4522b0c2 Merge pull request #5533 from akva2/typetag_free_params3
Move parameters to typetag free parameter system: Last batch
2024-08-16 16:28:15 +02:00
Bård Skaflestad d6f93a5f20 Merge pull request #5534 from vkip/alqstate_init
Ensure default ALQ is set for all production wells on all processes
2024-08-16 09:26:29 +02:00
Bård Skaflestad d60a21e55a Merge pull request #926 from bska/no-floating-point-from-chars
Don't Require Floating Point from_chars() Function
2024-08-16 09:06:17 +02:00
Bård Skaflestad d9863d5e32 Don't Require Floating Point from_chars() Function
This commit broadens the scope of commit c1e2a3a9b (PR #922) to
apply to all compilers/libraries, not just Clang/libc++, which do
not have support for floating-point types in std::from_chars().
While hopefully a transient situation, this enables building the
parameter system with GCC versions prior to GCC 11.  We expect to
require version 11 in the not too distant future, though.  At that
point we should revert this commit.

We use a configure-time feature test of the compiler (CMake command
'try_compile') to detect whether or not the compiler supports
floating-point overloads of std::from_chars() and emit the result to
config.h as the new preprocessor symbol

    HAVE_FLOATING_POINT_FROM_CHARS

We use std::strtod() as the fall-back alternative for floating point
conversion if this symbol is defined to false (zero).
2024-08-15 18:16:38 +02:00
Bård Skaflestad e548bbfd9d Merge pull request #5528 from totto82/gasmassinj
Pass gas mass rate to summary
2024-08-15 09:47:50 +02:00
Bård Skaflestad a102974298 Merge pull request #5526 from atgeirr/allow-cprw-flowexp
Flowexperimental: set MatrixAddWellContribution default to false.
2024-08-14 22:04:19 +02:00
Bård Skaflestad a484d47c1d Merge pull request #5532 from atgeirr/adjust-test-run-parameters
Adjust test parameters for stability.
2024-08-14 15:44:50 +02:00
Bård Skaflestad 9c1239a63f Merge pull request #5529 from akva2/typetag_free_params2
Move parameters to typetag free parameter system: Batch 3
2024-08-14 14:44:27 +02:00
Bård Skaflestad d271cd3e06 Merge pull request #925 from akva2/typetag_free_params2
Move parameters to typetag free parameter system: Batch 3
2024-08-14 14:43:50 +02:00
Bård Skaflestad 366a9de26f Merge pull request #5530 from totto82/renameMIMtoMTR
rename GMIM to GMTR
2024-08-14 13:57:43 +02:00
Bård Skaflestad 85f0895c6e Merge pull request #5525 from akva2/typetag_free_params1
Move parameters to typetag-free parameter system
2024-08-13 19:44:22 +02:00
Bård Skaflestad b76dd13afc Merge pull request #923 from akva2/typetag_free_params1
Move more parameters to typetag-free parameter system
2024-08-13 19:43:58 +02:00
Bård Skaflestad d9dd1bcf12 Merge pull request #5522 from akva2/janitoring_rocm
BDA rocm: some janitoring
2024-08-13 15:27:33 +02:00
Bård Skaflestad 6b724aacc1 Merge pull request #921 from akva2/typetag_free_params_no_downstream
Start moving parameters to new parameter system
2024-08-12 19:45:28 +02:00
Bård Skaflestad 8d382f7dcb Merge pull request #922 from atgeirr/from_char-workaround
Add workaround for libc++ incomplete from_chars().
2024-08-12 18:38:22 +02:00
Bård Skaflestad 27c498f75a Merge pull request #5511 from akva2/typetag_free_param_system
Support type-tag free parameter system
2024-08-09 18:02:26 +02:00
Bård Skaflestad 1a2cfa7a26 Merge pull request #916 from akva2/typetag_free_param_system
Add a typetag-free parameter system
2024-08-09 18:01:57 +02:00
Bård Skaflestad ad595fed5e Merge pull request #5506 from akva2/move_params_to_parameters
Move parameters to Opm::Parameters namespace
2024-08-09 09:16:10 +02:00
Bård Skaflestad 6507bba434 Merge pull request #5516 from GitPaean/avoiding_unnecessary_exception
avoiding unnecessary exception from std::stoi("")
2024-08-08 19:28:49 +02:00
Bård Skaflestad ad8dd1e4b8 Merge pull request #915 from akva2/problems_move_params
Move parameters in example problems to Opm::Parameters namespace
2024-08-08 17:15:06 +02:00
Bård Skaflestad c2e704c84f Merge pull request #5517 from akva2/split_parallel_unit_tests
changed: put parallel unit tests in separate .cmake file
2024-08-08 17:13:59 +02:00
Bård Skaflestad 04595958b6 Merge pull request #918 from akva2/remove_print_properties
changed: remove the print-properties parameter
2024-08-08 10:17:57 +02:00
Bård Skaflestad a336f0df90 Merge pull request #5514 from akva2/remove_print_properties
Remove support for the print-properties parameter
2024-08-08 10:14:48 +02:00
Bård Skaflestad 07d20a8031 Merge pull request #919 from akva2/indices_use_constexpr
Use constexpr in blackoil indices classes
2024-08-08 09:07:48 +02:00
Bård Skaflestad 4cbc82867b Merge pull request #5513 from akva2/janitoring_clang
Quell some clang warnings
2024-08-07 12:47:54 +02:00
Bård Skaflestad 79615f6eec Merge pull request #917 from akva2/baseoutputmodule_cleanup
BaseOutputModule: some cleanup
2024-08-07 10:59:38 +02:00
Bård Skaflestad ed5f371133 Merge pull request #5483 from daavid00/rswsat
Output support for RSWSAT and RVWSAT
2024-07-17 16:46:40 +02:00
Bård Skaflestad 6ce61a9018 Merge pull request #5478 from lisajulia/feature/add-failureFlag-to-tasklets
Use the failure flag of the tasklet runner to detect a failure while …
2024-07-16 10:05:22 +02:00
Bård Skaflestad 94c88f85e4 Merge pull request #909 from lisajulia/feature/add-failureFlag-to-tasklets
Feature/add failure flag to tasklets
2024-07-15 17:06:24 +02:00
Bård Skaflestad 7789551b74 Merge pull request #5454 from vkip/omp_num_threads
Handle empty or invalid OMP_NUM_THREADS by Flow default
2024-07-12 09:07:53 +02:00
Bård Skaflestad eea42f7363 Merge pull request #5472 from atgeirr/test-fixes
Test fixes
2024-07-09 09:21:21 +02:00
Bård Skaflestad 758a5f0dfd Merge pull request #5450 from blattms/feature/remove-axisCentroid-copy
[refactor] Remove unnecessary copy in axisCentroid and simply code.
2024-07-04 23:04:21 +02:00
Bård Skaflestad 34502976a1 Merge pull request #5466 from akva2/fix_test_name_typo
fix typo in test name
2024-07-04 12:05:14 +02:00
Bård Skaflestad 0406d199ab Merge pull request #5465 from akva2/fix_damaris
add missing include and damaris reference file update support
2024-07-04 09:04:14 +02:00
Bård Skaflestad efa0895fcd Merge pull request #5462 from GitPaean/handle_group_well_action_local
make sure a well exists in the process before closing it due to group action
2024-07-03 11:33:29 +02:00
Bård Skaflestad 0137bd566c Merge pull request #5461 from akva2/basicproperties_split_param
basicproperties:  split out params
2024-07-01 20:12:12 +02:00
Bård Skaflestad db0b4e1e6d Merge pull request #906 from akva2/basicproperties_split_param
basicproperties: split out params
2024-07-01 20:11:47 +02:00
Bård Skaflestad 0f556e583b Merge pull request #5460 from akva2/newtonmethod_param_split
NewtonMethod: split parameters and properties
2024-07-01 17:31:40 +02:00
Bård Skaflestad 1a5476c873 Merge pull request #905 from akva2/newtonmethod_param_split
NewtonMethod: split parameters and properties
2024-07-01 17:31:16 +02:00
Bård Skaflestad 9f8075e8a0 Merge pull request #5455 from akva2/fvbasediscretization_param_split
Adjust to to changes in fvbaseproperties.hh (moving of parameters to Opm::Parmeters namespace)
2024-07-01 13:22:26 +02:00
Bård Skaflestad 13964c96be Merge pull request #904 from akva2/fvbasediscretization_param_split
Start separating (compile time) Properties from (runtime) Parameters
2024-07-01 13:21:18 +02:00
Bård Skaflestad 1e831bab80 Merge pull request #5449 from bska/sfunc-consistency-checks-parallel
Add MPI Support to Saturation Function Consistency Checks
2024-06-28 14:16:31 +02:00
Bård Skaflestad 9895c15d7c Simplify Generation of Processor Dependent MPI Tests
Suggested by: [at]akva2.
2024-06-28 11:24:48 +02:00
Bård Skaflestad 0c71d0701c Add MPI Support to Saturation Function Consistency Checks
This commit adds a new public member function

    SatfuncConsistencyChecks<>::collectFailures(root, comm)

which aggregates consistency check violations from all ranks in the
MPI communication object 'comm' onto rank 'root' of 'comm'.  This
amounts to summing the total number of violations from all ranks and
potentially resampling the failure points for reporting purposes.

To this end, extract the body of function processViolation() into a
general helper which performs reservoir sampling and records point
IDs and which uses a call-back function to populate the check values
associated to a single failed check.  Re-implement the original
function in terms of this helper by wrapping exportCheckValues() in
a lambda function.  Extract similar helpers for numPoints() and
anyFailedChecks(), and add a new helper function

    SatfuncConsistencyChecks<>::incorporateRankViolations()

which brings sampled points from an MPI rank into the 'root's
internal data structures.

One caveat applies here.  Our current approach to collecting check
failures implies that calling member function reportFailures() is
safe only on the 'root' process in a parallel run.  On the other
hand functions anyFailedChecks() and anyFailedCriticalChecks() are
safe, and guaranteed to return the same answer, on all MPI ranks.

On a final note, the internal helper functions are at present mostly
implemented in terms of non-owning pointers.  I intend to switch to
using 'std::span<>' once we enable C++20 mode.
2024-06-28 11:04:53 +02:00
Bård Skaflestad ce7d415e4d Merge pull request #5447 from blattms/feature/hide-comp-by-dune
[refactor] Use DUNE's dot product to hide code complexity.
2024-06-27 15:28:55 +02:00
Bård Skaflestad 0267a3612f Merge pull request #5446 from atgeirr/fix-uninitialized-member
Initialize member for WellState serialization test constructor.
2024-06-27 15:28:31 +02:00
Bård Skaflestad e9591e0a3c Merge pull request #5438 from bska/sfunc-consistency-checks
Add New Platform for Saturation Function Consistency Checks
2024-06-26 13:22:21 +02:00
Bård Skaflestad c3939c5444 Add New Platform for Saturation Function Consistency Checks
The intention is that this will ultimately replace the existing
RelpermDiagnostics component which does not really work in parallel
and which does not report enough context to help diagnose underlying
issues.  For now, though, we just add the shell of a new set of
checks and hook that up to the build.

Class SatfuncConsistencyChecks<Scalar> manages a configurable set of
consistency checks, the implementations of which must publicly
derive from SatfuncConsistencyChecks<Scalar>::Check.  Client code
will configure a set of checks by first calling

    SatfuncConsistencyChecks<Scalar>::resetCheckSet()

then register individual checks by calling

    SatfuncConsistencyChecks<Scalar>::addCheck()

and finally build requisite internal structures by calling

    SatfuncConsistencyChecks<Scalar>::finaliseCheckSet()

Client code will then run the checks by calling

    SatfuncConsistencyChecks<Scalar>::checkEndpoints()

typically in a loop.  Class SatfuncConsistencyChecks<Scalar> will
count consistency check failures and attribute these to each
individual check as needed.  We also maintain separate counts for
"Standard" and "Critical" failures.  The former will typically
generate warnings while the latter will typically cause the
simulation run to stop.  Individual checks get to decide which check
is "Critical", and client code gets to decide how to respond to
"Critical" failures.

Member function SatfuncConsistencyChecks<Scalar>::reportFailures()
will generate a textual report of the known set of consistency check
failures at a give severity level.

As an internal implementation detail, SatfuncConsistencyChecks uses
"reservoir sampling"
(https://en.wikipedia.org/wiki/Reservoir_sampling) to track details
about individual failed checks.  We maintain at most a fixed number
of individual points (constructor argument).
2024-06-26 12:17:00 +02:00
Bård Skaflestad ac42250b25 Merge pull request #5402 from totto82/output_wetting_hyst
Output maximum/minimum saturations directly for restart hysteresis
2024-06-26 12:15:20 +02:00
Bård Skaflestad 26cd7ab993 Move opm/core/props to opm/simulators/utils
The opm/core directory is no longer meaningful, and it contains only
components which might collectively be described as simulator
utilities.
2024-06-25 12:22:09 +02:00
Bård Skaflestad acb124bbdc Merge pull request #5426 from totto82/output_every_timestep
fix option for output every timestep
2024-06-19 12:09:34 +02:00
Bård Skaflestad 46523e7cd9 Merge pull request #5430 from atgeirr/fix-damaris-logging-parallel
Add and use DamarisOutput::handleError() helper.
2024-06-19 11:30:08 +02:00
Bård Skaflestad c262a58ebb Merge pull request #5429 from alfbr/remove-mod4-grp
Remove the MOD4_GRP regression test
2024-06-17 10:12:07 +02:00