mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-19 16:32:56 -06:00
Access tuning class from ScheduleState
This commit is contained in:
parent
42a6a3b573
commit
fe788cdb05
@ -876,7 +876,7 @@ public:
|
||||
if (enableTuning_) {
|
||||
// if support for the TUNING keyword is enabled, we get the initial time
|
||||
// steping parameters from it instead of from command line parameters
|
||||
const auto& tuning = schedule.getTuning(0);
|
||||
const auto& tuning = schedule[0].tuning();
|
||||
initialTimeStepSize_ = tuning.TSINIT;
|
||||
maxTimeStepAfterWellEvent_ = tuning.TMAXWC;
|
||||
maxTimeStepSize_ = tuning.TSMAXZ;
|
||||
@ -1060,7 +1060,7 @@ public:
|
||||
bool tuningEvent = false;
|
||||
if (episodeIdx > 0 && enableTuning_ && events.hasEvent(Opm::ScheduleEvents::TUNING_CHANGE, episodeIdx))
|
||||
{
|
||||
const auto& tuning = schedule.getTuning(episodeIdx);
|
||||
const auto& tuning = schedule[episodeIdx].tuning();
|
||||
initialTimeStepSize_ = tuning.TSINIT;
|
||||
maxTimeStepAfterWellEvent_ = tuning.TMAXWC;
|
||||
maxTimeStepSize_ = tuning.TSMAXZ;
|
||||
|
@ -166,8 +166,7 @@ public:
|
||||
bool enableTUNING = EWOMS_GET_PARAM(TypeTag, bool, EnableTuning);
|
||||
if (enableAdaptive) {
|
||||
if (enableTUNING) {
|
||||
adaptiveTimeStepping_ = std::make_unique<TimeStepper>(
|
||||
schedule().getTuning(timer.currentStepNum()), terminalOutput_);
|
||||
adaptiveTimeStepping_ = std::make_unique<TimeStepper>(schedule()[timer.currentStepNum()].tuning(), terminalOutput_);
|
||||
}
|
||||
else {
|
||||
adaptiveTimeStepping_ = std::make_unique<TimeStepper>(terminalOutput_);
|
||||
@ -247,7 +246,7 @@ public:
|
||||
if (adaptiveTimeStepping_) {
|
||||
if (enableTUNING) {
|
||||
if (events.hasEvent(ScheduleEvents::TUNING_CHANGE,timer.currentStepNum())) {
|
||||
adaptiveTimeStepping_->updateTUNING(schedule().getTuning(timer.currentStepNum()));
|
||||
adaptiveTimeStepping_->updateTUNING(schedule()[timer.currentStepNum()].tuning());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user