#7339 StimPlanModel: Handle incomplete formation names data.

This commit is contained in:
Kristian Bendiksen 2021-02-05 15:38:02 +01:00
parent c6f35cbe1f
commit 13130ae268

View File

@ -228,6 +228,15 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
QString fieldName = "";
QString faciesName = findFaciesName( *colorLegend, faciesValues[i] );
int idx = static_cast<int>( formationValues[i] );
if ( std::isinf( formationValues[i] ) || idx < 0 || idx >= static_cast<int>( formationNamesVector.size() ) )
{
RiaLogging::error( QString( "Unknown formation found in elastic properties. Value: %1, tvd: %2" )
.arg( formationValues[i] )
.arg( tvDepthValues[i] ) );
values.clear();
return false;
}
QString formationName = formationNamesVector[idx];
double porosity = poroValues[i];