From e0fd47ef6eed0eed1d62c625c57ae747c0d1418c Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Wed, 13 May 2020 13:01:21 +0200 Subject: [PATCH] #5888 only apply LAS-PP-values within reservoir --- .../ReservoirDataModel/RigGeoMechWellLogExtractor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp b/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp index 622a0be8bc..627498c7de 100644 --- a/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp @@ -244,7 +244,8 @@ std::vector CVF_ASSERT( primary_it != allSources.end() ); std::vector gridValues; - if ( std::find( allSources.begin(), allSources.end(), RigWbsParameter::GRID ) != allSources.end() ) + if ( std::find( allSources.begin(), allSources.end(), RigWbsParameter::GRID ) != allSources.end() || + parameter == RigWbsParameter::PP_Reservoir() ) { RigFemResultAddress nativeAddr = parameter.femAddress( RigWbsParameter::GRID ); @@ -315,7 +316,8 @@ std::vector if ( !lasFileValues.empty() ) { double lasValue = getWellLogIntersectionValue( intersectionIdx, lasFileValues ); - if ( lasValue != std::numeric_limits::infinity() ) + if ( lasValue != std::numeric_limits::infinity() && intersectionIdx < gridValues.size() && + gridValues[intersectionIdx] != std::numeric_limits::infinity() ) { unscaledValues[intersectionIdx] = lasValue; finalSourcesPerSegment[intersectionIdx] = RigWbsParameter::LAS_FILE;