From 9dc2452ba1ba8926656e99fd95914d0e9209d7ac Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Thu, 22 Nov 2018 09:30:38 +0100 Subject: [PATCH] #3739 Fix crash in Well Bore Stability plots for synt_small.odb --- .../ReservoirDataModel/RigGeoMechWellLogExtractor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp b/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp index 42f26f00a9..bf147f136b 100644 --- a/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp @@ -113,7 +113,7 @@ float RigGeoMechWellLogExtractor::calculatePorePressureInSegment(int64_t interse double porePressure = hydroStaticPorePressureBar; // 1: Try pore pressure from the grid - if (porePressure == hydroStaticPorePressureBar && averageSegmentPorePressureBar != std::numeric_limits::infinity()) + if (porePressure == hydroStaticPorePressureBar && averageSegmentPorePressureBar > 0.0) { porePressure = averageSegmentPorePressureBar; } @@ -137,6 +137,8 @@ float RigGeoMechWellLogExtractor::calculatePorePressureInSegment(int64_t interse porePressure = pascalToBar(poreElementPressuresPascal[elmIdx]); } // 4: If no pore-pressure was found, the default value of hydrostatic pore pressure is used. + + CVF_ASSERT(porePressure >= 0.0); return porePressure; }