mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
#7339 StimPlanModel: Handle incomplete formation names data.
This commit is contained in:
parent
c6f35cbe1f
commit
13130ae268
@ -225,9 +225,18 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
|||||||
for ( size_t i = 0; i < tvDepthValues.size(); i++ )
|
for ( size_t i = 0; i < tvDepthValues.size(); i++ )
|
||||||
{
|
{
|
||||||
// Avoid using the field name in the match for now
|
// Avoid using the field name in the match for now
|
||||||
QString fieldName = "";
|
QString fieldName = "";
|
||||||
QString faciesName = findFaciesName( *colorLegend, faciesValues[i] );
|
QString faciesName = findFaciesName( *colorLegend, faciesValues[i] );
|
||||||
int idx = static_cast<int>( formationValues[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];
|
QString formationName = formationNamesVector[idx];
|
||||||
double porosity = poroValues[i];
|
double porosity = poroValues[i];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user