diff --git a/opm/simulators/wells/WellInterface.hpp b/opm/simulators/wells/WellInterface.hpp index 7a912b18f..ef76195e8 100644 --- a/opm/simulators/wells/WellInterface.hpp +++ b/opm/simulators/wells/WellInterface.hpp @@ -313,10 +313,7 @@ public: /// to the rates returned by computeCurrentWellRates(). void updateWellStateRates(const Simulator& ebosSimulator, WellState& well_state, - DeferredLogger& deferred_logger) const; - - void setPrevSurfaceRates(WellState& well_state, - const WellState& prev_well_state) const; + DeferredLogger& deferred_logger) const; void solveWellEquation(const Simulator& ebosSimulator, WellState& well_state, diff --git a/opm/simulators/wells/WellInterfaceGeneric.cpp b/opm/simulators/wells/WellInterfaceGeneric.cpp index ef23bd102..7aac73b38 100644 --- a/opm/simulators/wells/WellInterfaceGeneric.cpp +++ b/opm/simulators/wells/WellInterfaceGeneric.cpp @@ -347,6 +347,17 @@ void WellInterfaceGeneric::setVFPProperties(const VFPProperties* vfp_properties_ vfp_properties_ = vfp_properties_arg; } +void WellInterfaceGeneric::setPrevSurfaceRates(WellState& well_state, + const WellState& prev_well_state) const + { + auto& ws = well_state.well(this->index_of_well_); + if (!this->changedToOpenThisStep()){ + ws.prev_surface_rates = prev_well_state.well(this->index_of_well_).surface_rates; + } else { + ws.prev_surface_rates = ws.surface_rates; + } + } + void WellInterfaceGeneric::setGuideRate(const GuideRate* guide_rate_arg) { guide_rate_ = guide_rate_arg; diff --git a/opm/simulators/wells/WellInterfaceGeneric.hpp b/opm/simulators/wells/WellInterfaceGeneric.hpp index 4e9fbd1d8..512e66d86 100644 --- a/opm/simulators/wells/WellInterfaceGeneric.hpp +++ b/opm/simulators/wells/WellInterfaceGeneric.hpp @@ -94,6 +94,7 @@ public: void closeCompletions(const WellTestState& wellTestState); void setVFPProperties(const VFPProperties* vfp_properties_arg); + void setPrevSurfaceRates(WellState& well_state, const WellState& prev_well_state) const; void setGuideRate(const GuideRate* guide_rate_arg); void setWellEfficiencyFactor(const double efficiency_factor); void setRepRadiusPerfLength(); diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index 8aed0d068..0aeab1e5c 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -1192,20 +1192,6 @@ namespace Opm } } - template - void - WellInterface:: - setPrevSurfaceRates(WellState& well_state, - const WellState& prev_well_state) const - { - auto& ws = well_state.well(this->index_of_well_); - if (!this->changedToOpenThisStep()){ - ws.prev_surface_rates = prev_well_state.well(this->index_of_well_).surface_rates; - } else { - ws.prev_surface_rates = ws.surface_rates; - } - } - template typename WellInterface::Eval WellInterface::getPerfCellPressure(const typename WellInterface::FluidState& fs) const