use nupcol to avoid oscilation between group controls

This commit is contained in:
Tor Harald Sandve 2020-04-27 10:28:24 +02:00
parent 0773d07df5
commit 33afb332fa

View File

@ -1741,6 +1741,14 @@ namespace Opm {
updateGroupIndividualControls(Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
{
const int reportStepIdx = ebosSimulator_.episodeIndex();
const int nupcol = schedule().getNupcol(reportStepIdx);
const int iterationIdx = ebosSimulator_.model().newtonMethod().numIterations();
// don't switch group control when iterationIdx > nupcol
// to avoid oscilations between group controls
if (iterationIdx > nupcol)
return;
const Group& fieldGroup = schedule().getGroup("FIELD", reportStepIdx);
updateGroupIndividualControl(fieldGroup, deferred_logger, switched_groups);
}