#6305 GeoMech derived result: fix normalization when combined with time lapse.

The results for the different time steps are now normalized before the
difference is computed.
This commit is contained in:
Kristian Bendiksen 2020-08-18 14:37:14 +02:00 committed by Magne Sjaastad
parent 59679f54ad
commit 26c863e310

View File

@ -73,9 +73,22 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorTimeLapse::calculate( int
resVarAddr.componentName,
RigFemResultAddress::noTimeLapseValue(),
resVarAddr.refKLayerIndex );
RigFemScalarResultFrames* srcDataFrames = m_resultCollection->findOrLoadScalarResult( partIndex, resVarNative );
resVarNative.normalizedByHydrostaticPressure = resVarAddr.normalizedByHydrostaticPressure;
RigFemScalarResultFrames* srcDataFrames = nullptr;
RigFemScalarResultFrames* dstDataFrames = m_resultCollection->createScalarResult( partIndex, resVarAddr );
// Normalizable result: needs to be normalized before the diff is calculated
if ( resVarAddr.normalizeByHydrostaticPressure() && RigFemPartResultsCollection::isNormalizableResult( resVarAddr ) )
{
RigFemPartResultCalculatorNormalized normalizedCalculator( *m_resultCollection );
srcDataFrames = normalizedCalculator.calculate( partIndex, resVarNative );
}
else
{
srcDataFrames = m_resultCollection->findOrLoadScalarResult( partIndex, resVarNative );
}
frameCountProgress.incrementProgress();
int frameCount = srcDataFrames->frameCount();