mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Hide loading of date for one time step from public API
ResInsight assumes that loading of data is done for all time steps at a time. Special handling of data loading is required for statistics calculations. Make statistical class a friend to be able to do this operation.
This commit is contained in:
@@ -203,15 +203,13 @@ std::vector<double> RimEclipseContourMapProjection::generateResults( int timeSte
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) );
|
||||
if ( m_resultAggregation == RESULTS_OIL_COLUMN || m_resultAggregation == RESULTS_HC_COLUMN )
|
||||
{
|
||||
resultData->ensureKnownResultLoadedForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SOIL" ),
|
||||
timeStep );
|
||||
resultData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) );
|
||||
}
|
||||
if ( m_resultAggregation == RESULTS_GAS_COLUMN || m_resultAggregation == RESULTS_HC_COLUMN )
|
||||
{
|
||||
resultData->ensureKnownResultLoadedForTimeStep( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"SGAS" ),
|
||||
timeStep );
|
||||
resultData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) );
|
||||
}
|
||||
gridResultValues = calculateColumnResult( m_resultAggregation() );
|
||||
}
|
||||
|
||||
@@ -190,9 +190,11 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults( const QList<ResSpec>
|
||||
RimEclipseCase* sourceCase = m_sourceCases.at( caseIdx );
|
||||
|
||||
// Trigger loading of dataset
|
||||
// NB! Many other functions are based on loading of all time steps at the same time
|
||||
// Use this concept carefully
|
||||
sourceCase->results( poroModel )
|
||||
->ensureKnownResultLoadedForTimeStep( RigEclipseResultAddress( resultType, resultName ),
|
||||
dataAccessTimeStepIndex );
|
||||
->findOrLoadKnownScalarResultForTimeStep( RigEclipseResultAddress( resultType, resultName ),
|
||||
dataAccessTimeStepIndex );
|
||||
|
||||
cvf::ref<RigResultAccessor> resultAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( sourceCase->eclipseCaseData(),
|
||||
|
||||
Reference in New Issue
Block a user