Merge pull request #2138 from joakim-hove/welpi-get-wells-from-actionx

Pass the wells captured from ACTIONX to Schedule::handleWELPI()
This commit is contained in:
Joakim Hove 2020-12-02 08:27:17 +01:00 committed by GitHub
commit e9443b02a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -508,7 +508,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());
}
}