Use well index for perforation rates

This commit is contained in:
Joakim Hove
2021-06-03 11:08:55 +02:00
parent 739f6ad28a
commit 1a6737aff3
6 changed files with 22 additions and 23 deletions

View File

@@ -2637,8 +2637,7 @@ namespace Opm
// calculating the perforation rate for each perforation that belongs to this segment
const EvalWell seg_pressure = getSegmentPressure(seg);
const int rate_start_offset = first_perf_ * number_of_phases_;
auto * perf_rates = &well_state.mutable_perfPhaseRates()[rate_start_offset];
auto * perf_rates = well_state.perfPhaseRates(this->index_of_well_);
auto& perf_press_state = well_state.perfPress(this->index_of_well_);
for (const int perf : segment_perforations_[seg]) {
const int cell_idx = well_cells_[perf];