mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
StimPlan Model: Provide default value for facies
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user