removing one unnecessary if condition

This commit is contained in:
Kai Bao
2017-04-06 14:53:44 +02:00
parent e627f35176
commit 8fa3c4b324

View File

@@ -1835,11 +1835,11 @@ namespace Opm {
// update/setup guide rates for each well based on the well_potentials // update/setup guide rates for each well based on the well_potentials
well_collection_->setGuideRatesWithPotentials(wellsPointer(), phase_usage_, well_potentials); well_collection_->setGuideRatesWithPotentials(wellsPointer(), phase_usage_, well_potentials);
}
// handling the situation that wells does not have a valid control // handling the situation that wells do not have a valid control
// it happens the well specified with GRUP and restarting due to non-convergencing // it happens the well specified with GRUP and restarting due to non-convergencing
// putting the well under group control for this situation // putting the well under group control for this situation
if (wellCollection()->groupControlActive()) {
for (int w = 0; w < nw; ++w) { for (int w = 0; w < nw; ++w) {
WellControls* wc = wells().ctrls[w]; WellControls* wc = wells().ctrls[w];
const int ctrl_index = well_controls_get_current(wc); const int ctrl_index = well_controls_get_current(wc);
@@ -1852,9 +1852,7 @@ namespace Opm {
well_node.setIndividualControl(false); well_node.setIndividualControl(false);
} }
} }
}
}
applyVREPGroupControl(well_state); applyVREPGroupControl(well_state);
if (!wellCollection()->groupControlApplied()) { if (!wellCollection()->groupControlApplied()) {