added: utility function Schedule::isWList

checks if the given pattern is the name of a WList
This commit is contained in:
Arne Morten Kvarving
2023-10-04 17:46:37 +02:00
parent 8ed1b4c21e
commit 3f40960469
2 changed files with 13 additions and 0 deletions

View File

@@ -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<std::string>& matching_wells);

View File

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