Use well index for PerfPhaseRates

This commit is contained in:
Joakim Hove
2021-05-24 08:59:04 +02:00
parent 89a712603f
commit ab5c937268
3 changed files with 7 additions and 9 deletions

View File

@@ -1992,7 +1992,7 @@ namespace Opm {
auto& perf_pressure = well_state.perfPress(well_index);
auto& perf_rates = well_state.perfRates(well_index);
auto * perf_phase_rates = well_state.mutable_perfPhaseRates().data() + wm.second[1]*np;
auto * perf_phase_rates = &well_state.mutable_perfPhaseRates()[wm.second[1]*np];
const auto& perf_data = this->well_perf_data_[well_index];
for (std::size_t perf_index = 0; perf_index < perf_data.size(); perf_index++) {