Commit Graph

44 Commits

Author SHA1 Message Date
Arne Morten Kvarving
f68864db8c reindent 2025-01-24 12:27:41 +01:00
Arne Morten Kvarving
8772f41e62 Transmissibility::update(): enable multithreading 2025-01-24 12:26:34 +01:00
Arne Morten Kvarving
d551d95762 Transmissibility::update: use ThreadedMap for dispersivity_
this in preparation for multithreading the loop
2025-01-24 12:17:56 +01:00
Arne Morten Kvarving
a502a86dc1 Transmissibility::update: use ThreadSafeMapBuilder for diffusivity_
this in preparation for multithreading the loop
2025-01-24 12:17:56 +01:00
Arne Morten Kvarving
23e1654ba7 Transmissibility::update: use ThreadSafeMapBuilder for thermalHalfTrans
this in preparation for multithreading the loop
2025-01-24 12:17:56 +01:00
Arne Morten Kvarving
5cbbde67d7 Transmissibility::update: use ThreadSafeMapBuilder for thermalHalfTransBoundary
this in preparation for multithreading the loop
2025-01-24 12:17:56 +01:00
Arne Morten Kvarving
da696ff0eb Transmissibility::update: use ThreadSafeMapBuilder for trans_
this in preparation for multithreading the loop
2025-01-24 12:17:56 +01:00
Arne Morten Kvarving
52a22afa3b Transmissibility::update: use ThreadSafeMapBuilder for transBoundary
this in preparation for multithreading the loop
2025-01-24 12:17:56 +01:00
Arne Morten Kvarving
043f743cca use an explicit cast to better communicate intent
and mark some variables const while at it
2025-01-23 11:16:32 +01:00
Arne Morten Kvarving
5c142d1c4d only do cartesian cell index lookup once 2025-01-20 09:28:11 +01:00
Arne Morten Kvarving
6aef3ee2f1 Transmissibility::update(): use lambdas to reduce code duplication 2025-01-17 16:55:24 +01:00
Arne Morten Kvarving
efae526ae5 Transmissibility::applyMultipliers: use FaceDir::FromIntersectionIndex 2025-01-17 16:55:24 +01:00
Arne Morten Kvarving
2dda16bc71 Transmissibility::applyAllZMultipliers: simplify by passing FaceInfo structs 2025-01-17 16:55:24 +01:00
Arne Morten Kvarving
637bd7a1c4 Transmissibility::applyNtg_: increase readbility, no reason for using a switch 2025-01-17 16:55:24 +01:00
Arne Morten Kvarving
68dfd12a3c Transmissibility::applyNtg_: simplify by passing FaceInfo struct
and make it static
2025-01-17 16:55:24 +01:00
Arne Morten Kvarving
6c292a9d4a Transmissibility::computeFaceProperties: simplify by passing FaceInfo structs 2025-01-17 16:55:24 +01:00
Arne Morten Kvarving
81de485575 Transmissibility: introduce a FaceInfo struct
use this to group variables in ::update()
2025-01-17 16:55:23 +01:00
Arne Morten Kvarving
e10531513a Transmissibility::update: add faceIdxDir lambda function
short loop increases readability
2025-01-17 16:54:59 +01:00
Arne Morten Kvarving
2197a1ea7c Transmissibility::update: extract calculation of harmonic mean to a lambda 2025-01-17 16:54:59 +01:00
Arne Morten Kvarving
50c5369c39 Transmissibility::computeHalfDiffusivity_: use return value instead of out-param
and make it static
2025-01-17 16:54:59 +01:00
Arne Morten Kvarving
9ce9fe49f2 Transmissibility::computeHalfTrans_: use return value instead of out-param
and make it static
2025-01-17 16:54:59 +01:00
Arne Morten Kvarving
3695ea8b0b Transmissibility::update(): use Dune::intersections() range generator 2025-01-17 16:54:58 +01:00
Arne Morten Kvarving
a9787f23f7 Transmissibility:update: replace operator[] with insert_or_assign() 2025-01-17 16:54:17 +01:00
Arne Morten Kvarving
471eeb1004 cosmetics 2025-01-17 16:54:17 +01:00
Arne Morten Kvarving
9a97bf41c5 Transmissibility: add a cache for centroids and use this in update()
The loops repeatedly calls distanceVector which recalculates
the centroid for a cell. This is not a trivial calculation
2025-01-16 11:53:09 +01:00
Markus Blatt
e743f2aa1e Skip bogus warning about missing cells for PINCH NNCs
Cells are only missing if both are in the ghost overlap layer.
In this case we do not have a connection here to keep the matrix
more sparse.
2024-10-01 11:15:11 +02:00
Markus Blatt
4b3808fa93 [Refactor] Adapt to PINCH NNC separated from the normal ones.
This is also a preparation for correct MULTZ processing.
2024-10-01 11:15:11 +02:00
Markus Blatt
a56526607c Remove unneeded parameter from applyAllZMultipliers_ 2024-10-01 11:15:11 +02:00
Markus Blatt
e816ae4df3 Correctly treat transmissibilities for PINCH option(4) ALL.
In that case processEclipseFormat will create NNCs over the pinched
out cells with correct transmissibilities. Those NNCs are marked as
being created in PINCH and used to overwrite calculated
transmissibilties for the horizontal intersections (transmissibilities
of normal NNCs are usually added).

Note that the trnasmissibilities (without the multipliers) do not
change later. Only the multipliers can change them in the schedule and
that will still happen.
2024-10-01 11:15:11 +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
Markus Blatt
3ee2830d28 Change distanceVector_ to take the element index instead of centroid 2024-07-04 14:40:28 +02:00
Markus Blatt
d7c869d01a [refactor] Remove unnecessary copy in axisCentroid and simply code.
We stored 3 copies of each cell centroid in axisCentroid. This seemed
to be a waste of memory and also made the function distanceVector_ hard
to understand.

With this change we omit this copy of information and simplify distanceVector_
2024-06-27 15:15:33 +02:00
Markus Blatt
f6a4d7b076 [refactor] Use DUNE's do product to hide code complexity.
this removes some explicit loops.
2024-06-27 13:29:55 +02:00
Markus Blatt
6921db4282 omit unnescessary function parameter for EDINCC 2024-06-10 14:50:55 +02:00
Markus Blatt
fc67eaeeda Prevent spurious warnings about NNCs when applying EDITNNC in parallel.
If we use transmissibilities for loadbalancing, then we calculate
transmissibilities twice. First on the global grid before
loadbalancing and then on the local grid after that. This is the
default. In this case all warnings will be shown correctly when
calculating the global transmissibilities.

If the user requests the same weights for all faces (command line
parameter --edge-weights-method=0) then the transmissibilities are only
calculated on the loadbalanced grid. Unfortunately, in this case only
rank 0 will issue warnings for his part including the false positives
mentioned below.

Due to load balancing many NNCs might be stored on another process,
but we still use all EDITNNC entries when computing transmissibilties
locally. Hence when applying EDITNNC on the loadbalanced grid we
will issue warnings for cases where there are no problems (e.g. NNC
between two overlap cells.

With this PR we will only warn when computing the transmissibilities
for the first time. For the default settings this will remove spurious
and duplicate warnings.

Not that for --edge-weights-method=0 nothing changes and we will still
see only warnings for the first rank including spurious one.
2024-06-10 14:50:55 +02:00
Markus Blatt
d80b8411b7 Fixed spelling of comments. 2024-06-07 14:58:47 +02:00
Markus Blatt
2f3c1b7310 Update wrong comment about storage of transmissibilities
This is a follow up of the fix in #5414.

The comment said that the ordering of the compressed index of cells is
coherent with the cartesian index. THis is not the case in parallel
where cells in the overlap/ghost region might be ordered last (default).
2024-06-07 06:46:18 +02:00
Markus Blatt
302503e172
Merge pull request #5414 from totto82/fix_mpi_edit_trans
Fix modifications of TRANX/Y/Z in parallel (e.g. MULTIPLY of TRANX in EDIT)
2024-06-07 06:28:35 +02:00
Kai Bao
8f67881809 using enum class to replace boolean onlyTrans for
Transmissibility::update() for better readability, which is suggested by the reviewer.
2024-06-06 20:09:44 +02:00
Tor Harald Sandve
42702e1d50 Fix mpi for MULTIPLY TRANX in EDIT 2024-06-06 12:59:41 +02:00
Kai Bao
303a677a81 only allocate trans_ for globalTrans_
others are not needed for globalTrans_ for now. It will help to flatten
the peak memory usage for rank 0 during a parallel running.
2024-06-05 21:35:46 +02:00
Arne Morten Kvarving
600e7ea2f7 Transmissibility: consistently use Scalar type 2024-05-23 08:42:51 +02:00
Antonella Ritorto
5e1a37e497 Simulation partially supported for CpGrid with LGRs 2024-03-20 08:48:09 +01:00
Arne Morten Kvarving
57905c1069 move ebos/ecltransmissibility[_impl].[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00