Pass the wells captured from ACTIONX to Schedule::handleWELPI()

This commit is contained in:
Joakim Hove 2020-11-26 14:51:38 +01:00
parent 718faaf43b
commit e38252219f
3 changed files with 5 additions and 4 deletions

View File

@ -505,7 +505,7 @@ namespace Opm
void handleGCONPROD(const DeckKeyword& keyword, std::size_t current_step, const ParseContext& parseContext, ErrorGuard& errors);
void handleGCONINJE(const DeckKeyword& keyword, std::size_t current_step, const ParseContext& parseContext, ErrorGuard& errors);
void handleGLIFTOPT(const DeckKeyword& keyword, std::size_t report_step, const ParseContext& parseContext, ErrorGuard& errors);
void handleWELPI (const DeckKeyword& keyword, std::size_t report_step, const ParseContext& parseContext, ErrorGuard& errors);
void handleWELPI (const DeckKeyword& keyword, std::size_t report_step, const ParseContext& parseContext, ErrorGuard& errors, const std::vector<std::string>& matching_wells = {});
// Normal keyword handlers -- in KeywordHandlers.cpp
void handleBRANPROP (const HandlerContext&, const ParseContext&, ErrorGuard&);

View File

@ -1126,7 +1126,7 @@ namespace {
this->handleWELPI(handlerContext.keyword, handlerContext.currentStep, parseContext, errors);
}
void Schedule::handleWELPI(const DeckKeyword& keyword, std::size_t report_step, const ParseContext& parseContext, ErrorGuard& errors) {
void Schedule::handleWELPI(const DeckKeyword& keyword, std::size_t report_step, const ParseContext& parseContext, ErrorGuard& errors, const std::vector<std::string>& matching_wells) {
// Keyword structure
//
// WELPI
@ -1142,7 +1142,8 @@ namespace {
for (const auto& record : keyword) {
const auto well_names = this->wellNames(record.getItem<WELL_NAME>().getTrimmedString(0),
report_step);
report_step,
matching_wells);
if (well_names.empty())
this->invalidNamePattern(record.getItem<WELL_NAME>().getTrimmedString(0),

View File

@ -1536,7 +1536,7 @@ private:
this->applyWELOPEN(keyword, reportStep, parseContext, errors, result.wells());
if (keyword.name() == "WELPI")
this->handleWELPI(keyword, reportStep, parseContext, errors);
this->handleWELPI(keyword, reportStep, parseContext, errors, result.wells());
}
}