diff --git a/opm/simulators/wells/PerfData.cpp b/opm/simulators/wells/PerfData.cpp index a1b685ab4..9bb2d55a4 100644 --- a/opm/simulators/wells/PerfData.cpp +++ b/opm/simulators/wells/PerfData.cpp @@ -40,5 +40,9 @@ PerfData::PerfData(std::size_t num_perf, const PhaseUsage& pu_arg): } +std::size_t PerfData::size() const { + return this->pressure.size(); +} + } diff --git a/opm/simulators/wells/PerfData.hpp b/opm/simulators/wells/PerfData.hpp index 96eb6cd55..68a5b1395 100644 --- a/opm/simulators/wells/PerfData.hpp +++ b/opm/simulators/wells/PerfData.hpp @@ -35,6 +35,8 @@ private: public: PerfData(std::size_t num_perf, const PhaseUsage& pu); + std::size_t size() const; + std::vector pressure; std::vector rates; std::vector phase_rates; diff --git a/opm/simulators/wells/WellState.cpp b/opm/simulators/wells/WellState.cpp index 06d84e5e8..5e71d77d7 100644 --- a/opm/simulators/wells/WellState.cpp +++ b/opm/simulators/wells/WellState.cpp @@ -46,7 +46,6 @@ void WellState::base_init(const std::vector& cellPressures, this->perf_water_throughput_.clear(); this->perf_water_velocity_.clear(); this->perfphaserates_.clear(); - this->perfrates_.clear(); this->perfRateBrine_.clear(); this->perfRateSolvent_.clear(); this->perfRatePolymer_.clear(); @@ -112,7 +111,6 @@ void WellState::initSingleWell(const std::vector& cellPressures, this->segment_state.add(well.name(), SegmentState{}); this->perfdata.add(well.name(), PerfData{num_perf_this_well, this->phase_usage_}); this->perfpress_.add(well.name(), std::vector(num_perf_this_well, -1e100)); - this->perfrates_.add(well.name(), std::vector(num_perf_this_well, 0)); this->perfphaserates_.add(well.name(), std::vector(np*num_perf_this_well, 0)); this->perf_skin_pressure_.add(well.name(), std::vector(num_perf_this_well, 0)); this->perf_water_velocity_.add(well.name(), std::vector(num_perf_this_well, 0)); @@ -710,8 +708,8 @@ void WellState::reportConnections(data::Well& well, const auto& pd = this->well_perf_data_[well_index]; const int num_perf_well = pd.size(); well.connections.resize(num_perf_well); - - const auto& perf_rates = this->perfRates(well_index); + const auto& perf_data = this->perfData(well_index); + const auto& perf_rates = perf_data.rates; const auto& perf_pressure = this->perfPress(well_index); for( int i = 0; i < num_perf_well; ++i ) { const auto active_index = this->well_perf_data_[well_index][i].cell_index; diff --git a/opm/simulators/wells/WellState.hpp b/opm/simulators/wells/WellState.hpp index f4ec1ce35..afca21e98 100644 --- a/opm/simulators/wells/WellState.hpp +++ b/opm/simulators/wells/WellState.hpp @@ -398,12 +398,6 @@ public: std::vector& wellRates(std::size_t well_index) { return wellrates_[well_index]; } const std::vector& wellRates(std::size_t well_index) const { return wellrates_[well_index]; } - /// One rate per well connection. - std::vector& perfRates(std::size_t well_index) { return this->perfrates_[well_index]; } - const std::vector& perfRates(std::size_t well_index) const { return this->perfrates_[well_index]; } - std::vector& perfRates(const std::string& wname) { return this->perfrates_[wname]; } - const std::vector& perfRates(const std::string& wname) const { return this->perfrates_[wname]; } - /// One pressure per well connection. std::vector& perfPress(std::size_t well_index) { return perfpress_[well_index]; } const std::vector& perfPress(std::size_t well_index) const { return perfpress_[well_index]; } @@ -447,7 +441,6 @@ private: WellContainer> wellrates_; PhaseUsage phase_usage_; WellContainer perfdata; - WellContainer> perfrates_; WellContainer> perfpress_; WellContainer> perfphaserates_; diff --git a/tests/test_wellstate.cpp b/tests/test_wellstate.cpp index 0a6d911b2..c132352c9 100644 --- a/tests/test_wellstate.cpp +++ b/tests/test_wellstate.cpp @@ -292,6 +292,7 @@ BOOST_AUTO_TEST_CASE(Pressure) const auto& perf_data = wstate.perfData("PROD01"); + (void) perf_data; } // ---------------------------------------------------------------------