From 81be71cac82ffdfc8f6a66793f7ba7f9fe48359f Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Thu, 20 Nov 2014 17:23:12 +0800 Subject: [PATCH] throw if group polymer/salt concentration is set. --- .../eclipse/EclipseState/Schedule/Schedule.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 0856f9cf2..8312864f1 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -336,13 +336,19 @@ namespace Opm { WellPolymerProperties properties(well->getPolymerPropertiesCopy(currentStep)); - if (!record->getItem("POLYMER_CONCENTRATION")->defaultApplied(0)) { - properties.m_polymerConcentration = record->getItem("POLYMER_CONCENTRATION")->getSIDouble(0); - } - if (!record->getItem("SALT_CONCENTRATION")->defaultApplied(0)) { - properties.m_saltConcentration = record->getItem("SALT_CONCENTRATION")->getSIDouble(0); + properties.m_polymerConcentration = record->getItem("POLYMER_CONCENTRATION")->getSIDouble(0); + properties.m_saltConcentration = record->getItem("SALT_CONCENTRATION")->getSIDouble(0); + + auto group_polymer_item = record->getItem("GROUP_POLYMER_CONCENTRATION"); + auto group_salt_item = record->getItem("GROUP_SALT_CONCENTRATION"); + + if (!group_polymer_item->defaultApplied(0)) { + throw std::logic_error("Sorry explicit setting of \`GROUP_POLYMER_CONCENTRATION\` is not supported!"); } + if (!group_salt_item->defaultApplied(0)) { + throw std::logic_error("Sorry explicit setting of \`GROUP_SALT_CONCENTRATION\` is not supported!"); + } well->setPolymerProperties(currentStep, properties); } }