Commit Graph

1853 Commits

Author SHA1 Message Date
Arne Morten Kvarving
5c46d9cde5 add damaris test support to update_reference_data.sh 2024-07-03 21:01:54 +02:00
Arne Morten Kvarving
82cd3a2e01 changed: NewtonMaxIterations parameter moved to Opm::Parameters namespace 2024-07-01 14:13:48 +02:00
Arne Morten Kvarving
514eddc950 changed: NewtonTolerance parameter moved to Opm::Parameters namespace 2024-07-01 14:13:48 +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
Arne Morten Kvarving
3e1c8baa35 changed: ContinueOnConvergenceError parameter moved to Opm::Parameters namespace 2024-06-28 14:43:11 +02:00
Arne Morten Kvarving
afa62ee428 changed: ThreadsPerProcess parameter moved to Opm::Parameters namespace 2024-06-28 14:43:11 +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
Kjetil Olsen Lye
9b414419e7
Merge pull request #5404 from multitalentloes/add_dilu_LU_splitting
Add cudilu lu splitting
2024-06-27 14:30:45 +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
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
Tobias Meyer Andersen
82ff782d5f clang format 2024-06-18 11:42:00 +02:00
Svenn Tveit
84cdef1135 Fix solution tracers and well output.
-Only output or restart solution tracers for gas/oil tracers with DISGAS/VAPOIL enabled (no solution tracers in water phase!).
-Initial tracers (free/solution) will be set to zero initially if TBLK/TVDP is not given.
- Do not calculate mass transfer between free and solution tracers if it is not necessary.
-Calculate well rates using updated tracer concentrations
2024-06-10 14:50:56 +02:00
Svenn Tveit
61cfcfa523 Fixed vector input in tracer serialization test 2024-06-10 14:50:56 +02:00
Lisa Julia Nebel
ecf7bd1e52 Test for skipping the ghost entries using Jacobi preconditioner 2024-06-07 14:40:58 +02:00
Tobias Meyer Andersen
9b2f41ad96 Add option to split the matrix into diagonal,
strictly lower and stricly upper part.
Add tests checking that the result matches
the CPU dilu implementation.
2024-06-05 13:35:54 +02:00
Stein Krogstad
6318335d76 Update test_vfpproperties 2024-05-31 14:11:10 +02:00
Arne Morten Kvarving
bcbac79486
Merge pull request #5380 from akva2/linalg_template_scalar
LinAlg classes: template Scalar type
2024-05-31 08:40:11 +02:00
Kai Bao
e968da28bb renaming calcRates to calcResvCoeff
and calcInjRates to calcInjResvCoeff.
2024-05-29 22:29:12 +02:00
Bård Skaflestad
a3a2b7a978 Make SummaryState Objects Aware of Undefined UDQ Value
This PR switches to calling the SummaryState constructor which is
aware of the value of undefined UDQs (OPM/opm-common#4052) directly.

While here, also sort headers, split some long lines, and prefer
initialisation lists to constructor body assignments.
2024-05-29 09:16:56 +02:00
Arne Morten Kvarving
ff39bc3b03 WellContribution: template Scalar type 2024-05-24 14:09:11 +02:00
Bård Skaflestad
9841c5d21c
Merge pull request #5377 from akva2/equil_template_scalar
InitStateEquil: template Scalar type
2024-05-23 10:48:04 +02:00
Arne Morten Kvarving
4bef925974 InitStateEquil: use Scalar type from FluidSystem 2024-05-23 09:39:49 +02:00
Arne Morten Kvarving
4cfb7a8566 EquilibrationHelpers: template Scalar type 2024-05-23 09:38:27 +02:00
Arne Morten Kvarving
bac2087b85 WellProdIndexCalculator: template Scalar type 2024-05-22 15:21:37 +02:00
Arne Morten Kvarving
27d99f78ec ParallelWBPCalculation: template Scalar type 2024-05-22 10:51:12 +02:00
Arne Morten Kvarving
b68a854909 ParallelPAvgDynamicSourceData: template Scalar type 2024-05-22 10:51:07 +02:00
Arne Morten Kvarving
0481c7c0b2 adjust to PAvgCalculator templating 2024-05-22 10:51:07 +02:00
Arne Morten Kvarving
59e6d4db08 adjust to PAvgDynamicSourceData templating 2024-05-22 10:51:07 +02:00
Arne Morten Kvarving
16f5290038 ParallelWellInfo: template Scalar type 2024-05-22 09:48:22 +02:00
Arne Morten Kvarving
81189b89c7 PerforationData: template Scalar type 2024-05-22 09:48:07 +02:00
Arne Morten Kvarving
d5d16eaee4 VFPHelpers: move some functions into a class with static members
and template Scalar type
2024-05-21 17:01:30 +02:00
Arne Morten Kvarving
29d142b5e4 VFPProdProperties: template Scalar type 2024-05-21 17:01:30 +02:00
Arne Morten Kvarving
b74b170d5b fixed: build with dune-fem 2.9 2024-05-16 10:58:08 +02:00
Bård Skaflestad
a05d1358c6
Merge pull request #5362 from akva2/janitoring
fixed: use getCommuncation instead of getCollectiveCommuncation
2024-05-16 09:36:28 +02:00
Arne Morten Kvarving
ff80e92e9d fixed: also run the RestartSerialization tests without dune-fem
we want both tests when dune-fem is present
2024-05-16 09:14:15 +02:00
Arne Morten Kvarving
2cc2c89b5d fixed: use getCommuncation instead of getCollectiveCommuncation
latter causes a deprecation warning
2024-05-16 09:11:38 +02:00
Atgeirr Flø Rasmussen
226410cd44
Merge pull request #5303 from akva2/gaslift_template_scalar
GasLift: template Scalar type
2024-05-14 09:59:42 +02:00
Arne Morten Kvarving
66131bd350
Merge pull request #5253 from multitalentloes/script_test
Add HIP support
2024-05-07 08:02:53 +02:00
Tobias Meyer Andersen
e9d6b326cc Add HIP support for AMD GPUs
This commits adds cmake functionality that can
hipify the cuistl framework to support AMD GPUs.

Some tests have been written as HIP does not mirror
CUDA exactly.

CONVERT_CUDA_TO_HIP is the new CMAKE argument.
CMAKE version is increased to include HIP
as a language (3.21 required).

A macro is added to create a layer of indirection
that will make only cuistl files that have been
changed rehipified.

Some BDA stuff is extracted to make sure CUDA
is not accidentally included.
2024-05-06 15:56:53 +02:00
Bård Skaflestad
027eed16e9 Report CNV Violation Pore-Volume Fraction to INFOITER
This commit includes the fraction of pore-volume whose CNV targets
are violated as a new per-iteration quantity in the INFOITER file
(--output-extra-convergence-info=iteration), with the column header
"CnvErrPvFrac".  We collect the values which are already calculated
in

    BlackoilModel<>::getReservoirConvergence()

and store these as a pair of numerator and denominator in the
ConvergenceReport class.  Note that we need both the numerator and
the denominator in order to aggregate contributions from multiple
ranks.

While here, also make a few more objects 'const' and calculate
column widths directly instead of the maximum number of characters
in writeConvergenceHeader().
2024-05-06 11:31:47 +02:00
Atgeirr Flø Rasmussen
da5f20a0d9
Merge pull request #5145 from multitalentloes/add_gpu_direct
Add GPU Direct
2024-04-29 14:08:25 +02:00
Arne Morten Kvarving
09065dd130 GasLiftSingleWellGeneric: template Scalar type 2024-04-24 15:31:13 +02:00
Arne Morten Kvarving
772b00bc19 GasLiftGroupInfo: template Scalar type 2024-04-24 15:31:13 +02:00
Arne Morten Kvarving
3ec8a22e59 fixed: use the eclipse grid from the eclipse state in test_nonnc
if we use a separate instance the actnum arrays get out of sync. in
particular the two cells with PORV == 0 will not be marked as inactive
in the actnum array of the separate instance. this leads to a segfault
in lookUpData as the field props will have those cells filtered, while the grid
still has the cells active.
2024-04-24 10:30:46 +02:00
Arne Morten Kvarving
cc5f692bb3 test_nonnc: convert to boost unit test 2024-04-24 10:30:15 +02:00
Bård Skaflestad
74df895f67
Merge pull request #5301 from atgeirr/fix-option-order-bsd
BSD versions of getopt(), including macOS, require options first.
2024-04-23 14:47:17 +02:00
Atgeirr Flø Rasmussen
38de1dee5b BSD versions of getopt(), including macOS, require options first. 2024-04-23 13:42:13 +02:00
Arne Morten Kvarving
f0e7f8842b BlackoilWellModelGeneric: template Scalar type 2024-04-23 11:33:33 +02:00
Tobias Meyer Andersen
7235f34f0e Add classes handling correct MPI implementation
Make some changes to Georgs original code:
dynamically allocated arrays with std::vectors instead
Implement new class structure handling what
MPI communication implementation to use
create extra scopes to avoid reuse of index variable i

Update related tests:
Update test_cuowneroverlapcopy to account for new
class strucutre
Also remove line that invalidates the MPI tests for multiple processes
2024-04-17 13:28:30 +02:00
Arne Morten Kvarving
15d75c5228 WGState: template Scalar type 2024-04-17 11:12:40 +02:00