mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-30 09:30:09 -05:00
Fix missing communication in auto choke underperformance check
sumWellSurfaceRates() only returns rank-local rates, but isAutoChokeGroupUnderperforming_() compared them directly against the full group target. Add comm_.sum() to aggregate rates across all ranks before the comparison.
This commit is contained in:
1 parent
81ad2f29bb
commit
818a33ce17
1 file changed
+1
@@ -1705,6 +1705,7 @@ GroupStateHelper<Scalar, IndexTraits>::isAutoChokeGroupUnderperforming_(const Gr
|
||||
for (int phase_pos = 0; phase_pos < num_phases; ++phase_pos) {
|
||||
rates[phase_pos] = this->sumWellSurfaceRates(group, phase_pos, /*injector=*/false);
|
||||
}
|
||||
this->comm_.sum(rates.data(), rates.size());
|
||||
const Scalar current_rate = tcalc.calcModeRateFromRates(rates);
|
||||
|
||||
// If underperforming, wells should be excluded from GCW count
|
||||
|
||||
Reference in new issue
Block a user