From f4a3e90d3b1b3ab7df782c738131d6eef6ec1066 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Fri, 17 Feb 2017 13:28:29 +0100 Subject: [PATCH] correcting the confusing indent in WellState init --- opm/core/simulator/WellState.hpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/opm/core/simulator/WellState.hpp b/opm/core/simulator/WellState.hpp index a3ea21593..492c7b80f 100644 --- a/opm/core/simulator/WellState.hpp +++ b/opm/core/simulator/WellState.hpp @@ -84,8 +84,8 @@ namespace Opm for (int p = 0; p < np; ++p) { wellrates_[np*w + p] = 0.0; } - bhp_[w] = 0; - thp_[w] = 0; + bhp_[w] = 0.; + thp_[w] = 0.; continue; } @@ -138,20 +138,20 @@ namespace Opm // little above or below (depending on if // the well is an injector or producer) // pressure in first perforation cell. - if (well_controls_get_current_type(ctrl) == BHP) { - bhp_[w] = well_controls_get_current_target( ctrl ); - } else { - const int first_cell = wells->well_cells[wells->well_connpos[w]]; - const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99; - bhp_[w] = safety_factor*state.pressure()[first_cell]; + if (well_controls_get_current_type(ctrl) == BHP) { + bhp_[w] = well_controls_get_current_target( ctrl ); + } else { + const int first_cell = wells->well_cells[wells->well_connpos[w]]; + const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99; + bhp_[w] = safety_factor*state.pressure()[first_cell]; } // 3. Thp: assign thp equal to thp control, if applicable, // otherwise assign equal to bhp value. - if (well_controls_get_current_type(ctrl) == THP) { - thp_[w] = well_controls_get_current_target( ctrl ); - } else { - thp_[w] = bhp_[w]; + if (well_controls_get_current_type(ctrl) == THP) { + thp_[w] = well_controls_get_current_target( ctrl ); + } else { + thp_[w] = bhp_[w]; } } }