StimPlan Model: Provide default value for facies

This commit is contained in:
Kristian Bendiksen
2023-05-26 09:55:12 +02:00
parent cca852ef1f
commit a3efc16615
7 changed files with 61 additions and 9 deletions

View File

@@ -991,6 +991,29 @@ double RimStimPlanModel::defaultPermeability() const
return m_stimPlanModelTemplate() ? m_stimPlanModelTemplate()->defaultPermeability() : RiaDefines::defaultPermeability();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimStimPlanModel::defaultFaciesValue() const
{
RimStimPlanModelTemplate* templ = m_stimPlanModelTemplate();
if ( templ )
{
// Map the facies to a value using the color legend
RimFaciesProperties* faciesProperties = templ->faciesProperties();
if ( faciesProperties )
{
RimColorLegend* faciesColorLegend = faciesProperties->colorLegend();
if ( faciesColorLegend )
{
return findFaciesValue( *faciesColorLegend, templ->defaultFacies() );
}
}
}
return std::numeric_limits<double>::infinity();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1008,6 +1031,10 @@ double RimStimPlanModel::getDefaultForMissingValue( RiaDefines::CurveProperty cu
{
return 1.0;
}
else if ( curveProperty == RiaDefines::CurveProperty::FACIES )
{
return defaultFaciesValue();
}
else
{
return std::numeric_limits<double>::infinity();