Trying always to give a valid control when initing WellState.

Without the fix, when we specify GRUP control for WCONINJE, the control
mode will be initialized to be -1.
This commit is contained in:
Kai Bao 2016-10-31 15:35:32 +01:00
parent 8474ff2895
commit 75e0ff0018

View File

@ -166,8 +166,10 @@ namespace Opm
// If the set of controls have changed, this may not be identical
// to the last control, but it must be a valid control.
currentControls()[ newIndex ] = old_control_index;
} else {
assert(well_controls_get_num(wells->ctrls[w]) > 0);
currentControls()[ newIndex ] = 0;
}
}
}
}