From 9bb64df26eb71a993ba93e8b8c9f85ded618faee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 27 Jun 2019 19:21:35 +0200 Subject: [PATCH] Keyword Information: Add Means to Replace Post-Processor This is a special purpose hook that is mainly intended to add a post-processor after the keyword information is established only if certain conditions are satisfied (e.g., if certain keyword relations like the run using 'SGOF' tables hold). Immediate use case is to install a post-processor for SOGCR to subtract the scaled connate water saturation from defaulted SOGCR values if the simulation run uses family I (SWOF/SGOF) saturation function descriptions. --- opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp b/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp index 6025754fa..cabdc1420 100644 --- a/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp +++ b/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp @@ -21,6 +21,7 @@ #include #include +#include #include /* @@ -85,6 +86,11 @@ class GridPropertySupportedKeywordInfo { const post& postProcessor() const; bool isDefaultInitializable() const; + void setPostProcessor(post processor) + { + this->m_postProcessor = std::move(processor); + } + private: std::string m_keywordName;