#3534 Completion Export : Guard for missing width values

This commit is contained in:
Magne Sjaastad 2018-10-19 15:15:03 +02:00
parent 5cddab62ac
commit 59f0112f2e

View File

@ -174,9 +174,10 @@ double RigEclipseToStimPlanCalculator::areaWeightedWidth() const
auto stimPlanFractureTemplate = dynamic_cast<const RimStimPlanFractureTemplate*>(m_fracture->fractureTemplate());
if (stimPlanFractureTemplate)
{
RiaWeightedMeanCalculator<double> calc;
auto widthValues = stimPlanFractureTemplate->widthResultValues();
if (!widthValues.empty())
{
RiaWeightedMeanCalculator<double> calc;
for (const auto& singleCellCalc : m_singleFractureCellCalculators)
{
@ -190,6 +191,11 @@ double RigEclipseToStimPlanCalculator::areaWeightedWidth() const
width = calc.weightedMean();
}
else
{
width = stimPlanFractureTemplate->computeFractureWidth(m_fracture);
}
}
return width;
}