Using new function well_controls_invert_current().

This commit is contained in:
Joakim Hove 2014-01-06 12:08:29 +01:00
parent bf95c9f768
commit 3d171bd961

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 {