Take the correct perf depth when calculating the depth differences in the the init function of the MultisegmentWell class

This commit is contained in:
Lisa Julia Nebel
2024-10-22 18:17:58 +02:00
parent 8860c598fe
commit 97953887e4

View File

@@ -139,7 +139,8 @@ namespace Opm
for (int local_perf_index = 0; local_perf_index < this->number_of_perforations_; ++local_perf_index) {
// This variable loops over the number_of_perforations_ of *this* process, hence it is *local*.
const int cell_idx = this->well_cells_[local_perf_index];
this->cell_perforation_depth_diffs_[local_perf_index] = depth_arg[cell_idx] - this->perf_depth_[local_perf_index];
// Here we need to access the perf_depth_ at the global perforation index though!
this->cell_perforation_depth_diffs_[local_perf_index] = depth_arg[cell_idx] - this->perf_depth_[this->pw_info_.localToGlobal(local_perf_index)];
}
}