Add const Runspec& argument to restart loader

This commit is contained in:
Joakim Hove
2021-09-04 19:33:34 +02:00
parent d060d92268
commit 04a44657d6
8 changed files with 10 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(LoadRST) {
auto deck = parser.parseFile("SPE1CASE2.DATA");
auto rst_file = std::make_shared<EclIO::ERst>("SPE1CASE2.X0060");
auto rst_view = std::make_shared<EclIO::RestartFileView>(std::move(rst_file), 60);
auto rst_state = RestartIO::RstState::load(std::move(rst_view));
auto rst_state = RestartIO::RstState::load(std::move(rst_view), Runspec{});
BOOST_REQUIRE_THROW( rst_state.get_well("NO_SUCH_WELL"), std::out_of_range);
auto python = std::make_shared<Python>();
EclipseState ecl_state(deck);
@@ -107,7 +107,7 @@ std::pair<Schedule, Schedule> load_schedule_pair(const std::string& base_deck,
auto restart_deck = parser.parseFile(rst_deck);
auto rst_file = std::make_shared<EclIO::ERst>(rst_fname);
auto rst_view = std::make_shared<EclIO::RestartFileView>(std::move(rst_file), restart_step);
auto rst_state = RestartIO::RstState::load(std::move(rst_view));
auto rst_state = RestartIO::RstState::load(std::move(rst_view), ecl_state.runspec());
EclipseState ecl_state_restart(restart_deck);
Schedule restart_sched(restart_deck, ecl_state_restart, python, {}, &rst_state);

View File

@@ -3618,7 +3618,7 @@ BOOST_AUTO_TEST_CASE(SKIPREST_VFP) {
const auto& rst_filename = es.getIOConfig().getRestartFileName( init_config.getRestartRootName(), report_step, false );
auto rst_file = std::make_shared<Opm::EclIO::ERst>(rst_filename);
auto rst_view = std::make_shared<Opm::EclIO::RestartFileView>(std::move(rst_file), report_step);
const auto rst = Opm::RestartIO::RstState::load(std::move(rst_view));
const auto rst = Opm::RestartIO::RstState::load(std::move(rst_view), es.runspec());
const auto sched = Schedule{ deck, es, python , {}, &rst };
BOOST_CHECK_NO_THROW( sched[3].vfpprod(5) );