when there is group control, we should update WellState

since the group targets are updated.
TODO: maybe it is not necessary, need to investigate the design of getBhp() and
getQs().
This commit is contained in:
Kai Bao 2017-03-23 16:41:54 +01:00
parent 087b9471c7
commit 0acb646a4d

View File

@ -1549,11 +1549,14 @@ namespace Opm {
// checking whether control changed
wellhelpers::WellSwitchingLogger logger;
for (int w = 0; w < nw; ++w) {
const WellControls* wc = wells().ctrls[w];
if (updated_control_index[w] != old_control_index[w]) {
WellControls* wc = wells().ctrls[w];
logger.wellSwitched(wells().name[w],
well_controls_iget_type(wc, old_control_index[w]),
well_controls_iget_type(wc, updated_control_index[w]));
}
if (updated_control_index[w] != old_control_index[w] || well_collection_->groupControlActive()) {
updateWellStateWithTarget(wc, updated_control_index[w], w, xw);
}
}