#3739 Fix crash in Well Bore Stability plots for synt_small.odb

This commit is contained in:
Gaute Lindkvist 2018-11-22 09:30:38 +01:00
parent fcc8ee6e27
commit 9dc2452ba1

View File

@ -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<float>::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;
}