opm-simulators/opm/simulators
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
..
aquifers BlackoilAquiferModel: use Scalar type 2024-04-24 15:22:00 +02:00
flow Merge pull request #5447 from blattms/feature/hide-comp-by-dune 2024-06-27 15:28:55 +02:00
linalg Merge pull request #5404 from multitalentloes/add_dilu_LU_splitting 2024-06-27 14:30:45 +02:00
timestepping Move opm/core/props to opm/simulators/utils 2024-06-25 12:22:09 +02:00
utils Add MPI Support to Saturation Function Consistency Checks 2024-06-28 11:04:53 +02:00
wells Merge pull request #5446 from atgeirr/fix-uninitialized-member 2024-06-27 15:28:31 +02:00
opm-simulators_doxygen_main.hpp Remove reference to ebos in doxygen header 2024-02-06 14:01:55 +01:00