mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#829 Use HUGE_VAL for k-layers not covered by formation definitions
This commit is contained in:
parent
1209c908e5
commit
45f56b9fab
@ -667,7 +667,15 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
|
|||||||
for(int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx)
|
for(int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx)
|
||||||
{
|
{
|
||||||
size_t elmNodResIdx = femPart->elementNodeResultIdx(elmIdx, elmNodIdx);
|
size_t elmNodResIdx = femPart->elementNodeResultIdx(elmIdx, elmNodIdx);
|
||||||
dstFrameData[elmNodResIdx] = formNameIdx;
|
|
||||||
|
if (formNameIdx != -1)
|
||||||
|
{
|
||||||
|
dstFrameData[elmNodResIdx] = formNameIdx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dstFrameData[elmNodResIdx] = HUGE_VAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,8 +492,14 @@ void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationName
|
|||||||
if(!m_mainGrid->ijkFromCellIndex(cIdx, &i, &j, &k)) continue;
|
if(!m_mainGrid->ijkFromCellIndex(cIdx, &i, &j, &k)) continue;
|
||||||
|
|
||||||
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k);
|
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k);
|
||||||
|
if (formNameIdx != -1)
|
||||||
fnData[cIdx] = formNameIdx;
|
{
|
||||||
|
fnData[cIdx] = formNameIdx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fnData[cIdx] = HUGE_VAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t cIdx = localCellCount; cIdx < totalGlobCellCount; ++cIdx)
|
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;
|
if(!m_mainGrid->ijkFromCellIndex(mgrdCellIdx, &i, &j, &k)) continue;
|
||||||
|
|
||||||
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k);
|
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k);
|
||||||
|
if (formNameIdx != -1)
|
||||||
fnData[cIdx] = formNameIdx;
|
{
|
||||||
|
fnData[cIdx] = formNameIdx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fnData[cIdx] = HUGE_VAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user