Merge pull request #2565 from totto82/avoidOscNupcol

use nupcol to avoid oscillation between group controls
This commit is contained in:
Atgeirr Flø Rasmussen
2020-04-27 16:02:32 +02:00
committed by GitHub

View File

@@ -1745,6 +1745,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);
}