added: utility function Schedule::isWList
checks if the given pattern is the name of a WList
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user