From 5aa037799ab1a6ffeb2cfa5a05bad66d5fbb662d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 7 Aug 2014 17:00:22 +0200 Subject: [PATCH] Update checkWELSPECSConsistency() method. Now accounts for new refDepthDefaulted() method and semantics. --- opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index ab1fef732..8b173a4af 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -162,8 +162,13 @@ namespace Opm { if (well->getHeadJ() != record->getItem("HEAD_J")->getInt(0) - 1) { throw std::invalid_argument("Unable process WELSPECS for well " + well->name() + ", HEAD_J deviates from existing value"); } - if (well->getRefDepth() != record->getItem("REF_DEPTH")->getSIDouble(0)) { - throw std::invalid_argument("Unable process WELSPECS for well " + well->name() + ", REF_DEPTH deviates from existing value"); + if (well->getRefDepthDefaulted() != record->getItem("REF_DEPTH")->defaultApplied()) { + throw std::invalid_argument("Unable process WELSPECS for well " + well->name() + ", REF_DEPTH defaulted state deviates from existing value"); + } + if (!well->getRefDepthDefaulted()) { + if (well->getRefDepth() != record->getItem("REF_DEPTH")->getSIDouble(0)) { + throw std::invalid_argument("Unable process WELSPECS for well " + well->name() + ", REF_DEPTH deviates from existing value"); + } } }