mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
parent
59679f54ad
commit
26c863e310
@ -68,14 +68,27 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorTimeLapse::calculate( int
|
||||
"Calculating " + QString::fromStdString( resVarAddr.fieldName + ": " + resVarAddr.componentName ) );
|
||||
frameCountProgress.setNextProgressIncrement( m_resultCollection->frameCount() );
|
||||
|
||||
RigFemResultAddress resVarNative( resVarAddr.resultPosType,
|
||||
RigFemResultAddress resVarNative( resVarAddr.resultPosType,
|
||||
resVarAddr.fieldName,
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user