Cater for empty parts of distributed wells for pvt region index.

This commit is contained in:
Markus Blatt 2020-11-17 17:07:58 +01:00
parent a9df5065ae
commit 901327ac54

View File

@ -2493,7 +2493,7 @@ namespace Opm {
// What is the proper approach?
const auto& comm = ebosSimulator_.vanguard().grid().comm();
const int fipnum = 0;
int pvtreg = well_perf_data_.empty()
int pvtreg = well_perf_data_.empty() || well_perf_data_[0].empty()
? pvt_region_idx_[0]
: pvt_region_idx_[well_perf_data_[0][0].cell_index];