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
commit 06e5e6b6ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}