Added missing parallel reduction to computeCurrentWellRates.

This is supposed to be summation over values at all perforations.
Hence, it needs a parallel sum.
This commit is contained in:
Markus Blatt
2020-12-11 13:46:13 +01:00
parent fc4a7fa3c1
commit ba1feadb63

View File

@@ -4119,6 +4119,11 @@ namespace Opm
for (int comp = 0; comp < num_components_; ++comp) { for (int comp = 0; comp < num_components_; ++comp) {
well_q_s_noderiv[comp] = well_q_s[comp].value(); well_q_s_noderiv[comp] = well_q_s[comp].value();
} }
const auto& comm = this->parallel_well_info_.communication();
if (comm.size() > 1)
{
comm.sum(well_q_s_noderiv.data(), well_q_s_noderiv.size());
}
return well_q_s_noderiv; return well_q_s_noderiv;
} }