Merge pull request #3976 from blattms/well-fix-distributed-tw

[bugfix] Fix well transmissibility weights for distributed wells.
This commit is contained in:
Markus Blatt 2022-07-15 10:39:48 +02:00 committed by GitHub
commit 412cf1d6cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1601,6 +1601,11 @@ namespace Opm
for (int perf = 0; perf < nperf; ++perf) { for (int perf = 0; perf < nperf; ++perf) {
total_tw += this->well_index_[perf]; total_tw += this->well_index_[perf];
} }
const auto& comm = this->parallel_well_info_.communication();
if (comm.size() > 1)
{
total_tw = comm.sum(total_tw);
}
for (int perf = 0; perf < nperf; ++perf) { for (int perf = 0; perf < nperf; ++perf) {
const int cell_idx = this->well_cells_[perf]; const int cell_idx = this->well_cells_[perf];
const auto& intQuants = *(ebosSimulator.model().cachedIntensiveQuantities(cell_idx, /*timeIdx=*/0)); const auto& intQuants = *(ebosSimulator.model().cachedIntensiveQuantities(cell_idx, /*timeIdx=*/0));