diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp index 4b6a7bde69..0c90b2c678 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp @@ -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; + } } } diff --git a/ApplicationCode/ReservoirDataModel/RigCaseData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseData.cpp index d7e12650df..b9749dbd51 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseData.cpp @@ -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; + } } }