Use global number of perforations when initializing well.

The local number of perforations is not correct anymore
for distributed wells.
This commit is contained in:
Markus Blatt
2020-11-16 21:31:05 +01:00
parent 0d6c39be2f
commit a9df5065ae

View File

@@ -359,7 +359,7 @@ namespace Opm
temperature_[w] = well.injectionControls(summary_state).temperature;
}
const int num_perf_this_well = well_perf_data_[w].size();
const int num_perf_this_well = well_info.communication().sum(well_perf_data_[w].size());
if ( num_perf_this_well == 0 ) {
// No perforations of the well. Initialize to zero.
bhp_[w] = 0.;