Let the perforation index run over the indices for one well

This commit is contained in:
Joakim Hove
2021-05-11 19:35:26 +02:00
parent 846809ec29
commit b5580f39fa
4 changed files with 46 additions and 32 deletions

View File

@@ -322,12 +322,14 @@ namespace Opm
const int num_perf_well = pd.size();
well.connections.resize(num_perf_well);
const auto * perf_rates = &this->perfRates()[itr.second[1]];
const auto * perf_pressure = &this->perfPress()[itr.second[1]];
for( int i = 0; i < num_perf_well; ++i ) {
const auto active_index = this->well_perf_data_[well_index][i].cell_index;
auto& connection = well.connections[ i ];
connection.index = globalCellIdxMap[active_index];
connection.pressure = this->perfPress()[ itr.second[1] + i ];
connection.reservoir_rate = this->perfRates()[ itr.second[1] + i ];
connection.pressure = perf_pressure[i];
connection.reservoir_rate = perf_rates[i];
connection.trans_factor = pd[i].connection_transmissibility_factor;
}
assert(num_perf_well == int(well.connections.size()));