diff --git a/opm/input/eclipse/Schedule/Schedule.hpp b/opm/input/eclipse/Schedule/Schedule.hpp index b2d14bd23..0818f5532 100644 --- a/opm/input/eclipse/Schedule/Schedule.hpp +++ b/opm/input/eclipse/Schedule/Schedule.hpp @@ -654,6 +654,8 @@ namespace Opm bool must_write_rst_file(std::size_t report_step) const; + bool isWList(std::size_t report_step, const std::string& pattern) const; + void applyEXIT(const DeckKeyword&, std::size_t currentStep); SimulatorUpdate applyAction(std::size_t reportStep, const std::string& action_name, const std::vector& matching_wells); diff --git a/src/opm/input/eclipse/Schedule/Schedule.cpp b/src/opm/input/eclipse/Schedule/Schedule.cpp index eee5219be..5a4c24caf 100644 --- a/src/opm/input/eclipse/Schedule/Schedule.cpp +++ b/src/opm/input/eclipse/Schedule/Schedule.cpp @@ -1757,6 +1757,17 @@ File {} line {}.)", pattern, location.keyword, location.filename, location.linen return this->snapshots[report_step].rst_file(rst_config, previous_output); } + bool Schedule::isWList(std::size_t report_step, const std::string& pattern) const + { + const ScheduleState * sched_state; + + if (report_step < this->snapshots.size()) + sched_state = &this->snapshots[report_step]; + else + sched_state = &this->snapshots.back(); + + return sched_state->wlist_manager.get().hasList(pattern); + } const std::map< std::string, int >& Schedule::rst_keywords( size_t report_step ) const { if (report_step == 0)