Adapt to changed data::Wells API.

This commit is contained in:
Atgeirr Flø Rasmussen 2016-10-25 10:37:18 +02:00
parent 9253969828
commit 4aa14a4dcb

View File

@ -251,16 +251,18 @@ namespace Opm
const int num_perf_well = this->wells_->well_connpos[ well_index + 1 ] const int num_perf_well = this->wells_->well_connpos[ well_index + 1 ]
- this->wells_->well_connpos[ well_index ]; - this->wells_->well_connpos[ well_index ];
well.completions.resize(num_perf_well);
for( int i = 0; i < num_perf_well; ++i ) { for( int i = 0; i < num_perf_well; ++i ) {
const auto wi = this->wells_->well_connpos[ well_index ] + i; const auto wi = this->wells_->well_connpos[ well_index ] + i;
const auto active_index = this->wells_->well_cells[ wi ]; const auto active_index = this->wells_->well_cells[ wi ];
auto& completion = well.completions[ active_index ]; auto& completion = well.completions[ i ];
completion.index = active_index; completion.index = active_index;
completion.pressure = this->perfPress()[ well_index + i ]; completion.pressure = this->perfPress()[ well_index + i ];
completion.reservoir_rate = this->perfRates()[ well_index + i ]; completion.reservoir_rate = this->perfRates()[ well_index + i ];
} }
assert(num_perf_well == int(well.completions.size()));
} }
return dw; return dw;