Add Schedule handler overload for GLIFTOPT - to support ACTIONX

This commit is contained in:
Joakim Hove 2020-11-03 07:55:53 +01:00
parent 6aefc2c17a
commit ada1f9d144
2 changed files with 10 additions and 5 deletions

View File

@ -497,6 +497,7 @@ namespace Opm
// Keyword Handlers
void handlePYACTION (std::shared_ptr<const Python> python, const std::string& input_path, const DeckKeyword&, std::size_t currentStep);
void handleGCONPROD(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);
// Normal keyword handlers -- in KeywordHandlers.cpp
void handleBRANPROP (const HandlerContext&, const ParseContext&, ErrorGuard&);

View File

@ -505,14 +505,18 @@ namespace {
}
}
void Schedule::handleGLIFTOPT(const HandlerContext& handlerContext, const ParseContext& parseContext, ErrorGuard&errors) {
auto glo = std::make_shared<GasLiftOpt>( this->glo(handlerContext.currentStep) );
void Schedule::handleGLIFTOPT(const HandlerContext& handlerContext, const ParseContext& parseContext, ErrorGuard& errors) {
this->handleGLIFTOPT(handlerContext.keyword, handlerContext.currentStep, parseContext, errors);
}
for (const auto& record : handlerContext.keyword) {
void Schedule::handleGLIFTOPT(const DeckKeyword& keyword, std::size_t report_step, const ParseContext& parseContext, ErrorGuard&errors) {
auto glo = std::make_shared<GasLiftOpt>( this->glo(report_step) );
for (const auto& record : keyword) {
const std::string& groupNamePattern = record.getItem<ParserKeywords::GLIFTOPT::GROUP_NAME>().getTrimmedString(0);
const auto group_names = this->groupNames(groupNamePattern);
if (group_names.empty())
invalidNamePattern(groupNamePattern, handlerContext.currentStep, parseContext, errors, handlerContext.keyword);
invalidNamePattern(groupNamePattern, report_step, parseContext, errors, keyword);
const auto& max_gas_item = record.getItem<ParserKeywords::GLIFTOPT::MAX_LIFT_GAS_SUPPLY>();
const double max_lift_gas_value = max_gas_item.hasValue(0)
@ -533,7 +537,7 @@ namespace {
}
}
this->m_glo.update(handlerContext.currentStep, std::move(glo));
this->m_glo.update(report_step, std::move(glo));
}
void Schedule::handleGPMAINT(const HandlerContext& handlerContext, const ParseContext& parseContext, ErrorGuard& errors) {