Utilize private restartconfig

This commit is contained in:
Joakim Hove 2021-03-07 09:31:10 +01:00
parent 4ed085ddc3
commit 9ad5d69744
3 changed files with 6 additions and 7 deletions

View File

@ -457,7 +457,7 @@ public:
// written to disk (every N report step)
int outputInterval = EWOMS_GET_PARAM(TypeTag, int, EclOutputInterval);
if (outputInterval >= 0)
schedule().restart().overrideRestartWriteInterval(outputInterval);
schedule().rst_override_interval(outputInterval);
// Initialize parallelWells with all local wells
const auto& schedule_wells = schedule().getWellsatEnd();

View File

@ -253,10 +253,10 @@ public:
// Summary output is for all steps
const Opm::SummaryConfig summaryConfig = simulator_.vanguard().summaryConfig();
const auto& schedule = simulator_.vanguard().schedule();
// Only output RESTART_AUXILIARY asked for by the user.
const Opm::RestartConfig& restartConfig = simulator_.vanguard().schedule().restart();
std::map<std::string, int> rstKeywords = restartConfig.getRestartKeywords(reportStepNum);
std::map<std::string, int> rstKeywords = schedule.rst_keywords(reportStepNum);
for (auto& [keyword, should_write] : rstKeywords) {
if (this->isOutputCreationDirective_(keyword)) {
// 'BASIC', 'FREQ' and similar. Don't attempt to create
@ -265,7 +265,7 @@ public:
should_write = 0;
}
else {
should_write = restartConfig.getKeyword(keyword, reportStepNum);
should_write = schedule.rst_keyword(reportStepNum, keyword);
}
}
@ -300,7 +300,6 @@ public:
// Well RFT data
if (!substep) {
const auto& schedule = simulator_.vanguard().schedule();
const auto& rft_config = schedule[reportStepNum].rft_config();
for (const auto& well: schedule.getWells(reportStepNum)) {
@ -334,7 +333,7 @@ public:
// 1) when we want to restart
// 2) when it is ask for by the user via restartConfig
// 3) when it is not a substep
if (!isRestart && (!restartConfig.getWriteRestartFile(reportStepNum, log) || substep))
if (!isRestart && (!schedule.write_rst_file(reportStepNum, log) || substep))
return;
// always output saturation of active phases

View File

@ -1417,7 +1417,7 @@ namespace Opm {
computeAverageFormationFactor(B_avg);
const Opm::SummaryConfig& summaryConfig = ebosSimulator_.vanguard().summaryConfig();
const bool write_restart_file = ebosSimulator_.vanguard().schedule().restart().getWriteRestartFile(reportStepIdx);
const bool write_restart_file = ebosSimulator_.vanguard().schedule().write_rst_file(reportStepIdx);
int exception_thrown = 0;
for (const auto& well : well_container_) {
const bool needed_for_summary = ((summaryConfig.hasSummaryKey( "WWPI:" + well->name()) ||