mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Well PI: Use Appropriate Calculator for Each Well
The original code assumed that
well_container_.size() == numLocalWells()
This assumption does not hold when wells open/shut dynamically in
the context of WECON and/or WTEST.
Switch to indexing into the 'prod_index_calc_' vector using the
well's own linear index instead of manually advancing iterators.
Pointy Hat: [at]bska
This commit is contained in:
@@ -1471,13 +1471,11 @@ namespace Opm {
|
||||
return;
|
||||
}
|
||||
|
||||
auto piCalc = this->prod_index_calc_.begin();
|
||||
for (const auto& wellPtr : this->well_container_) {
|
||||
wellPtr->updateProductivityIndex(this->ebosSimulator_,
|
||||
*piCalc,
|
||||
this->prod_index_calc_[wellPtr->indexOfWell()],
|
||||
this->well_state_,
|
||||
deferred_logger);
|
||||
++piCalc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user