mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3033 from totto82/fixEmptyEquilOutput
Fix empty region output in parallel
This commit is contained in:
commit
9360d0a646
@ -1819,14 +1819,14 @@ private:
|
|||||||
auto psat = PhaseSat { materialLawManager, this->swatInit_ };
|
auto psat = PhaseSat { materialLawManager, this->swatInit_ };
|
||||||
auto vspan = std::array<double, 2>{};
|
auto vspan = std::array<double, 2>{};
|
||||||
|
|
||||||
|
std::vector<int> regionIsEmpty(rec.size(), 0);
|
||||||
for (size_t r = 0; r < rec.size(); ++r) {
|
for (size_t r = 0; r < rec.size(); ++r) {
|
||||||
const auto& cells = reg.cells(r);
|
const auto& cells = reg.cells(r);
|
||||||
|
|
||||||
Details::verticalExtent(cells, cellZMinMax_, comm, vspan);
|
Details::verticalExtent(cells, cellZMinMax_, comm, vspan);
|
||||||
|
|
||||||
if (cells.empty()) {
|
if (cells.empty()) {
|
||||||
Opm::OpmLog::warning("Equilibration region " + std::to_string(r + 1)
|
regionIsEmpty[r] = 1;
|
||||||
+ " has no active cells");
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1852,6 +1852,14 @@ private:
|
|||||||
ptable, psat);
|
ptable, psat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
comm.min(regionIsEmpty.data(),regionIsEmpty.size());
|
||||||
|
if (comm.rank() == 0) {
|
||||||
|
for (size_t r = 0; r < rec.size(); ++r) {
|
||||||
|
if (regionIsEmpty[r]) //region is empty on all partitions
|
||||||
|
Opm::OpmLog::warning("Equilibration region " + std::to_string(r + 1)
|
||||||
|
+ " has no active cells");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class CellRange, class EquilibrationMethod>
|
template <class CellRange, class EquilibrationMethod>
|
||||||
|
Loading…
Reference in New Issue
Block a user