#2615 Compaction. Fixed compaction calculation expression

This commit is contained in:
Bjørn Erik Jensen 2018-04-05 11:45:33 +02:00
parent c2c7671b2e
commit d44ffbc1b5

View File

@ -1490,7 +1490,11 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateCompactionValues
}
}
compactionFrame[n] = u3Frames->frameData(t)[closestRefNodeIdx] - u3Frames->frameData(t)[n];
cvf::Vec3f currentNodeCoord = part->nodes().coordinates[n];
if(currentNodeCoord.z() >= refElement.intersectionPoint.z())
compactionFrame[n] = -(u3Frames->frameData(t)[n] - u3Frames->frameData(t)[closestRefNodeIdx]);
else
compactionFrame[n] = -(u3Frames->frameData(t)[closestRefNodeIdx] - u3Frames->frameData(t)[n]);
}
else
{