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

@@ -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