diff --git a/opm/polymer/fullyimplicit/FullyImplicitCompressiblePolymerSolver.cpp b/opm/polymer/fullyimplicit/FullyImplicitCompressiblePolymerSolver.cpp index cfe054ab5..c817a49f3 100644 --- a/opm/polymer/fullyimplicit/FullyImplicitCompressiblePolymerSolver.cpp +++ b/opm/polymer/fullyimplicit/FullyImplicitCompressiblePolymerSolver.cpp @@ -664,18 +664,18 @@ namespace { M rate_distr(nw, np*nw); for (int w = 0; w < nw; ++w) { const WellControls* wc = wells_.ctrls[w]; - if (well_controls_get_current_type(wc) == BHP) { - bhp_targets[w] = well_controls_get_current_target(wc); + if (well_controls_get_current_type(wc) == BHP) { + bhp_targets[w] = well_controls_get_current_target(wc); rate_targets[w] = -1e100; } else if (well_controls_get_current_type(wc) == SURFACE_RATE) { bhp_targets[w] = -1e100; - rate_targets[w] = well_controls_get_current_target(wc); - { - const double* distr = well_controls_get_current_distr(wc); + rate_targets[w] = well_controls_get_current_target(wc); + { + const double* distr = well_controls_get_current_distr(wc); for (int phase = 0; phase < np; ++phase) { - rate_distr.insert(w, phase*nw + w) = distr[phase]; - } - } + rate_distr.insert(w, phase*nw + w) = distr[phase]; + } + } } else { OPM_THROW(std::runtime_error, "Can only handle BHP and SURFACE_RATE type controls."); }