only warn about empty regions when none of the partitions contains the region

This commit is contained in:
Tor Harald Sandve 2021-01-27 09:56:03 +01:00
parent 3a0dbdc6e7
commit 82c8968ae3

View File

@ -1819,14 +1819,14 @@ private:
auto psat = PhaseSat { materialLawManager, this->swatInit_ };
auto vspan = std::array<double, 2>{};
std::vector<int> regionIsEmpty(rec.size(), 0);
for (size_t r = 0; r < rec.size(); ++r) {
const auto& cells = reg.cells(r);
Details::verticalExtent(cells, cellZMinMax_, comm, vspan);
if (cells.empty()) {
Opm::OpmLog::warning("Equilibration region " + std::to_string(r + 1)
+ " has no active cells");
regionIsEmpty[r] = 1;
continue;
}
@ -1852,6 +1852,14 @@ private:
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>