#5888 only apply LAS-PP-values within reservoir

This commit is contained in:
Gaute Lindkvist 2020-05-13 13:01:21 +02:00 committed by GitHub
parent 9446150740
commit e0fd47ef6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,7 +244,8 @@ std::vector<RigGeoMechWellLogExtractor::WbsParameterSource>
CVF_ASSERT( primary_it != allSources.end() );
std::vector<double> 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<RigGeoMechWellLogExtractor::WbsParameterSource>
if ( !lasFileValues.empty() )
{
double lasValue = getWellLogIntersectionValue( intersectionIdx, lasFileValues );
if ( lasValue != std::numeric_limits<double>::infinity() )
if ( lasValue != std::numeric_limits<double>::infinity() && intersectionIdx < gridValues.size() &&
gridValues[intersectionIdx] != std::numeric_limits<double>::infinity() )
{
unscaledValues[intersectionIdx] = lasValue;
finalSourcesPerSegment[intersectionIdx] = RigWbsParameter::LAS_FILE;