From 4aa14a4dcbc165642871ff628283f0bbc37b8b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 25 Oct 2016 10:37:18 +0200 Subject: [PATCH] Adapt to changed data::Wells API. --- opm/core/simulator/WellState.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opm/core/simulator/WellState.hpp b/opm/core/simulator/WellState.hpp index a6d7fa722..489e739bf 100644 --- a/opm/core/simulator/WellState.hpp +++ b/opm/core/simulator/WellState.hpp @@ -251,16 +251,18 @@ namespace Opm const int num_perf_well = this->wells_->well_connpos[ well_index + 1 ] - this->wells_->well_connpos[ well_index ]; + well.completions.resize(num_perf_well); for( int i = 0; i < num_perf_well; ++i ) { const auto wi = this->wells_->well_connpos[ well_index ] + i; 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.pressure = this->perfPress()[ well_index + i ]; completion.reservoir_rate = this->perfRates()[ well_index + i ]; } + assert(num_perf_well == int(well.completions.size())); } return dw;