Using new function well_controls_invert_current().

This commit is contained in:
Joakim Hove committed 2014-01-06 12:08:29 +01:00
1 parent fdf7bdba85
commit ad73015cb9
1 file changed
+2 -4
+2 -4
View File
@@ -757,15 +757,13 @@ namespace Opm
if (line.openshutflag_ == "SHUT") {
int cur_ctrl = well_controls_get_current(w_->ctrls[index]);
if (cur_ctrl >= 0) {
cur_ctrl = ~cur_ctrl;
well_controls_set_current(w_->ctrls[index] , cur_ctrl);
well_controls_invert_current(w_->ctrls[index]);
}
assert(well_controls_get_current(w_->ctrls[index]) < 0);
} else if (line.openshutflag_ == "OPEN") {
int cur_ctrl = well_controls_get_current(w_->ctrls[index]);
if (cur_ctrl < 0) {
cur_ctrl = ~cur_ctrl;
well_controls_set_current(w_->ctrls[index] , cur_ctrl);
well_controls_invert_current(w_->ctrls[index]);
}
assert(well_controls_get_current(w_->ctrls[index]) >= 0);
} else {