#829 Use HUGE_VAL for k-layers not covered by formation definitions

This commit is contained in:
Magne Sjaastad 2016-09-07 13:31:49 +02:00
parent 1209c908e5
commit 45f56b9fab
2 changed files with 25 additions and 5 deletions

View File

@ -667,7 +667,15 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
for(int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx)
{
size_t elmNodResIdx = femPart->elementNodeResultIdx(elmIdx, elmNodIdx);
dstFrameData[elmNodResIdx] = formNameIdx;
if (formNameIdx != -1)
{
dstFrameData[elmNodResIdx] = formNameIdx;
}
else
{
dstFrameData[elmNodResIdx] = HUGE_VAL;
}
}
}

View File

@ -492,8 +492,14 @@ void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationName
if(!m_mainGrid->ijkFromCellIndex(cIdx, &i, &j, &k)) continue;
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k);
fnData[cIdx] = formNameIdx;
if (formNameIdx != -1)
{
fnData[cIdx] = formNameIdx;
}
else
{
fnData[cIdx] = HUGE_VAL;
}
}
for (size_t cIdx = localCellCount; cIdx < totalGlobCellCount; ++cIdx)
@ -505,8 +511,14 @@ void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationName
if(!m_mainGrid->ijkFromCellIndex(mgrdCellIdx, &i, &j, &k)) continue;
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k);
fnData[cIdx] = formNameIdx;
if (formNameIdx != -1)
{
fnData[cIdx] = formNameIdx;
}
else
{
fnData[cIdx] = HUGE_VAL;
}
}
}