mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2565 from totto82/avoidOscNupcol
use nupcol to avoid oscillation between group controls
This commit is contained in:
@@ -1745,6 +1745,14 @@ namespace Opm {
|
|||||||
updateGroupIndividualControls(Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
updateGroupIndividualControls(Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
||||||
{
|
{
|
||||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
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);
|
const Group& fieldGroup = schedule().getGroup("FIELD", reportStepIdx);
|
||||||
updateGroupIndividualControl(fieldGroup, deferred_logger, switched_groups);
|
updateGroupIndividualControl(fieldGroup, deferred_logger, switched_groups);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user