dont switch from GRUP if check_group_constrains_well_iterations=false

This commit is contained in:
Tor Harald Sandve 2024-10-23 09:08:37 +02:00
parent afcfedb9f1
commit e184f96024

View File

@ -307,8 +307,10 @@ namespace Opm
const bool hasGroupControl = this->isInjector() ? inj_controls.hasControl(Well::InjectorCMode::GRUP) :
prod_controls.hasControl(Well::ProducerCMode::GRUP);
changed = this->checkIndividualConstraints(ws, summary_state, deferred_logger, inj_controls, prod_controls);
bool isGroupControl = ws.production_cmode == Well::ProducerCMode::GRUP || ws.injection_cmode == Well::InjectorCMode::GRUP;
if (! (isGroupControl && !this->param_.check_group_constraints_inner_well_iterations_)) {
changed = this->checkIndividualConstraints(ws, summary_state, deferred_logger, inj_controls, prod_controls);
}
if (hasGroupControl && this->param_.check_group_constraints_inner_well_iterations_) {
changed = changed || this->checkGroupConstraints(well_state, group_state, schedule, summary_state,deferred_logger);
}