From dd4f362aa47539a093757a3417b01edd4c4e91f3 Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Wed, 16 Sep 2015 12:40:14 +0200 Subject: [PATCH] WellStateFullyImplicitBlackoil: call init of base class first. --- opm/autodiff/WellStateFullyImplicitBlackoil.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp index d84e51472..2b44a5c9a 100644 --- a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp +++ b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp @@ -58,9 +58,10 @@ namespace Opm template void init(const Wells* wells, const State& state, const PrevState& prevState) { - // clear old name mapping - wellMap().clear(); + // call init on base class + BaseType :: init(wells, state); + // if there are no well, do nothing in init if (wells == 0) { return; } @@ -68,10 +69,6 @@ namespace Opm const int nw = wells->number_of_wells; if( nw == 0 ) return ; - // We use the WellState::init() function to do bhp and well rates init. - // The alternative would be to copy that function wholesale. - BaseType :: init(wells, state); - // Initialize perfphaserates_, which must be done here. const int np = wells->number_of_phases; const int nperf = wells->well_connpos[nw]; @@ -85,7 +82,6 @@ namespace Opm if (well_controls_well_is_stopped(ctrl)) { // Shut well: perfphaserates_ are all zero. } else { - // also store the number of perforations in this well const int num_perf_this_well = wells->well_connpos[w + 1] - wells->well_connpos[w]; // Open well: Initialize perfphaserates_ to well // rates divided by the number of perforations.