mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 12:10:57 -06:00
Performance: Property filter on a time step difference case is slow #10339
This commit is contained in:
parent
709457f7c2
commit
9a159cc02d
@ -104,6 +104,10 @@ bool RigCaseCellResultCalculator::computeDifference( RigEclipseCaseData*
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if result is already computed. If not having an early return here, the same result is recomputed every time data is requested,
|
||||
// and this is a huge performance hit on larger grids.
|
||||
if ( sourceCaseResults->isResultLoaded( address ) ) return true;
|
||||
|
||||
RigEclipseResultAddress nativeAddress( address );
|
||||
nativeAddress.setDeltaCaseId( RigEclipseResultAddress::noCaseDiffValue() );
|
||||
nativeAddress.setDeltaTimeStepIndex( RigEclipseResultAddress::noTimeLapseValue() );
|
||||
@ -178,7 +182,8 @@ bool RigCaseCellResultCalculator::computeDifference( RigEclipseCaseData*
|
||||
RigResultAccessorFactory::createFromResultAddress( baseCase, gridIdx, porosityModel, baseFrameIdx, nativeAddress );
|
||||
if ( baseResultAccessor.isNull() ) continue;
|
||||
|
||||
for ( size_t localGridCellIdx = 0; localGridCellIdx < grid->cellCount(); localGridCellIdx++ )
|
||||
#pragma omp parallel for
|
||||
for ( long localGridCellIdx = 0; localGridCellIdx < static_cast<long>( grid->cellCount() ); localGridCellIdx++ )
|
||||
{
|
||||
size_t reservoirCellIndex = grid->reservoirCellIndex( localGridCellIdx );
|
||||
if ( activeCellInfo->isActive( reservoirCellIndex ) )
|
||||
|
Loading…
Reference in New Issue
Block a user