Commit Graph

2175 Commits

Author SHA1 Message Date
Arne Morten Kvarving
cdd37b4ed6 fixed: test-suites needs a name 2024-11-05 12:46:18 +01:00
Arne Morten Kvarving
58365df3ff add missing ReservoirCouplingInfo.hpp includes
now that Schedule(State) properly serializes the member
2024-10-28 15:51:14 +01:00
Antonella Ritorto
b875ba8122 LevelCartesianIndexMapper for AluGrid 2024-10-21 11:25:27 +02:00
Bård Skaflestad
2aac0d6cf5 Enable New Saturation Function Consistency Checks
The new parameter CheckSatfuncConsistency, command line option
--check-satfunc-consistency, allows users to opt into running the
checks.  The option currently defaults to 'false' to reflect the
somewhat experimental nature of the new facility.

The new parameter --num-satfunc-consistency-sample-points allows the
user to select the maximum number of reported failures for each
individual consistency check.  By default, the simulator will report
at most five failures for each check.

We check the unscaled curves if the run does not activate the
end-point scaling option and the scaled curves otherwise.  At
present we're limited to reversible and non-directional saturation
functions for the drainage process, but those restrictions will be
lifted in due time.
2024-10-16 15:03:07 +02:00
Bård Skaflestad
92efa31c31 Tidy Up FlowProblem* Classes
In preparation of enabling the new saturation function consistency
checks.
2024-10-16 12:18:33 +02:00
Bård Skaflestad
b5305b928d Use More Specific Name for 'anyFailedChecks'
The function returns whether or not there were any failed checks at
the 'Standard' level.  Make the function name reflect this.
2024-10-16 09:32:19 +02:00
Bård Skaflestad
8082e72d32 Add Top Level Container for Saturation Function Consistency Checks
This commit introduces a new top-level "manager" for all saturation
function consistency checks.  This component associates collections
of saturation function curves with per-cell or per-region end-point
definitions and provides an interface to run all checks for all
interior entities (i.e., active cells) in a DUNE grid view.  We form
one set of SatfuncConsistencyChecks objects for each
SatfuncCheckPointInterface<> object, thereby enabling running the
same set of consistency checks for both the unscaled, tabulated,
per-region saturation functions and the per-cell scaled saturation
functions.  The latter is executed only if the run enables end-point
scaling for the saturation functions while the former is executed
only if the run does not enable end-point scaling.

At present we're limited to reversible and non-directional
saturation functions for the drainage process only, but those
restrictions will be lifted in due time.

As an aid to enabling the pertinent individual checks, we add a
private factory function which considers the run's active phases and
whether or not the run uses the alternative, three-point horizontal
scaling method ("SCALECRS = YES").
2024-10-16 09:32:19 +02:00
Bård Skaflestad
257e5a2d2a Add Protocol for Populating Saturation Function End Points per Cell
This commit introduces a set of callback functions, packaged in an
abstract base class SatfuncCheckPointInterface<Scalar>, for querying
and populating the saturation function end-points that get probed by
the individual consistency checks.  Member function

    SatfuncCheckPointInterface::pointID(cellIdx)

translates the active cell index 'cellIdx' into a point ID, assumed
to be unique on at least the current MPI rank.  This function will
return 'nullopt' if the 'cellIdx' is not eligible for this
particular end-point.  This typically happens for the region based
tabulated (unscaled) saturation function checks when the 'cellIdx'
happens to be in a region that's already been visited.  Member
function

    SatfuncCheckPointInterface::populateCheckPoint(cellIdx, endPoints)

fills in (assigns) all data members of the 'endPoints' structure
with the pertinent values for the active cell 'cellIdx'.

We implement this interface for the tabulated/unscaled end-points in
derived class UnscaledSatfuncCheckPoint<Scalar> and for the scaled
end-points in derived class ScaledSatfuncCheckPoint<Scalar>.  The
former keeps track of which saturation regions have been visited
and short-circuits its 'pointID()' member function based on that
information while the latter uses an instance of the former in order
initialise the 'endPoints' structure in its populateCheckPoint()
member function.
2024-10-11 11:47:50 +02:00
Bård Skaflestad
e550fd71d0 Simplify Unit Tests for LogOutputHelper
In particular, put more of the common setup code into the test
fixture and use more powerful constructors for the EclipseState
object.  While here, also switch to using the update_well_var() and
update_group_var() member functions on the SummaryState object where
appropriate since the resulting statements become slightly easier to
understand in isolation.
2024-10-10 09:56:14 +02:00
Bård Skaflestad
120b39a8f9 Fix Lower Bound Conditions for Three Point Checks
These are supposed to verify that the displacing saturation is
strictly between the critical and the maximum saturation values.
2024-10-02 12:33:22 +02:00
Arne Morten Kvarving
2e7b014769 remove opm-models from data update script 2024-10-02 10:47:54 +02:00
Kjetil Olsen Lye
1c6dc24ad7
Merge pull request #5597 from multitalentloes/add_gpu_ad_and_gpu_linint_tests
add ad & TwoPhaseMaterial gpu instantiation tests
2024-09-30 10:35:20 +02:00
Tobias Meyer Andersen
9bdc361368 fix cmake and cuda bugs 2024-09-25 13:43:00 +02:00
Tobias Meyer Andersen
c288f7f0fb fix typo 2024-09-25 11:24:34 +02:00
Tobias Meyer Andersen
f9b595e078 address feedback to two_phase_material test 2024-09-25 11:23:02 +02:00
Tobias Meyer Andersen
88b05a4126 address feedback to AD test 2024-09-25 11:23:02 +02:00
Tobias Meyer Andersen
e6b6add193 Add tests for AD objects and TwoPhaseMaterial
The tests verify that these objects can be used
inside of GPU kernels
2024-09-25 11:22:27 +02:00
Kjetil Olsen Lye
3161a986a2 SolverAdapter is now more explicit on its communicator/MPI dependence. This fixes the MPI issues with CUDA/HIP/GPUISTL that were introduced with the GhostLastMatrixAdapter. 2024-09-24 10:03:23 +02:00
Kai Bao
85513754bc splitting Blackoil related to FlowProblemBlackoil
so FlowProblem can be used for compositional or other setting
2024-09-11 14:58:14 +02:00
Bård Skaflestad
ba1419b31f Fix Consistency Check for Maximum Gas Saturation
The earlier condition

    0 <= SGU < 1

was not appropriate and would, for instance, fail the NORNE_ATW2013
test case in which SGU = 1 in the unscaled table for saturation
region 1.  Revise the condition to be more in line with that of SWU,
i.e., as

    0 < SGU <= 1

Pointy Hat: [at]bska
2024-09-10 15:44:16 +02:00
Arne Morten Kvarving
2166ec6328 added: scripts for generating failure reports on jenkins
this creates a pdf for each failed case with plots of summary
curves
2024-09-10 11:47:46 +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
Arne Morten Kvarving
ed0c480a19 Parameters::printUsage: drop default parameter for stream 2024-09-05 10:08:08 +02:00
Arne Morten Kvarving
0cda471821 remove Parameters::noPositionalParameters_
only used in a test
2024-09-05 10:07:40 +02:00
Arne Morten Kvarving
410039206d add Parameters::Parameter struct
this holds a key-value pair for a parameter with some utility functions
for comparison and printing.

use this to move Parameters::getLists to the translation unit
2024-09-05 10:07:40 +02:00
Arne Morten Kvarving
05f01bf819 parametersystem.hh: rename to .hpp 2024-09-05 10:07:40 +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
Arne Morten Kvarving
13b575eae9 tasklets: introduce translation unit 2024-09-04 12:06:21 +02:00
Arne Morten Kvarving
d35d80427e tasklets.hh: rename to tasklets.hpp 2024-09-04 12:06:21 +02:00
Arne Morten Kvarving
fcd0168691 mpiutil.hh: rename to mpiutil.hpp 2024-09-04 12:06:21 +02:00
Arne Morten Kvarving
e7a9c4cd21 threadmanager: remove unused typetag template parameter
and move implementation to a translation unit
2024-09-04 12:06:21 +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
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
Arne Morten Kvarving
e3a16df477 add imported opm-models code to buildsystem 2024-09-03 10:49:49 +02:00
Arne Morten Kvarving
bc46647aa5 Import opm-models 2024-09-02 10:55:19 +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
1a6b063824
Merge pull request #5559 from akva2/janitoring
do not capture compile time data in lambda
2024-08-26 10:34:36 +02:00
Arne Morten Kvarving
fb9f7541f3 do not capture compile time data in lambda
quells clang warnings
2024-08-26 08:27:34 +02:00
Tobias Meyer Andersen
d925d62bf2 refactor cusparsematrixoperations 2024-08-23 11:15:18 +02:00
Tobias Meyer Andersen
d2681b26ed refactor opm_cuda_safe_call 2024-08-23 11:12:13 +02:00
Tobias Meyer Andersen
85a9ad2b61 refactor cuistl folder names 2024-08-22 15:32:21 +02:00
Tobias Meyer Andersen
5919b417e3 refactor cuview 2024-08-22 15:27:23 +02:00
Tobias Meyer Andersen
fba1858f42 refactor cuvector 2024-08-22 15:20:20 +02:00
Tobias Meyer Andersen
3aa1767548 refactor cusparsematrix 2024-08-22 15:14:33 +02:00
Tobias Meyer Andersen
0c1ea3ee4d refactor cuseqilu0 2024-08-22 15:07:53 +02:00
Tobias Meyer Andersen
1721a1071f refactor cuowneroverlapcopy 2024-08-22 14:46:38 +02:00
Tobias Meyer Andersen
158619083e refacor cujac 2024-08-22 14:40:23 +02:00
Tobias Meyer Andersen
d17ee3315b refactor CuDILU 2024-08-22 14:28:33 +02:00
Tobias Meyer Andersen
69897753e8 refactor CuBuffer 2024-08-22 14:12:30 +02:00