Merge pull request #4690 from OPM/bug-#4688-contour-diff

#4668 Make contour time and case diff work
This commit is contained in:
Gaute Lindkvist 2019-09-11 08:58:06 +02:00 committed by GitHub
commit 6de86013ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 1 deletions

View File

@ -202,7 +202,10 @@ std::vector<double> RimEclipseContourMapProjection::generateResults( int timeSte
else if ( !( cellColors->hasStaticResult() && timeStep > 0 ) )
{
m_currentResultName = cellColors->resultVariable();
RigEclipseResultAddress resAddr( cellColors->resultType(), cellColors->resultVariable() );
RigEclipseResultAddress resAddr( cellColors->resultType(),
cellColors->resultVariable(),
cellColors->timeLapseBaseTimeStep(),
cellColors->caseDiffIndex() );
if ( resAddr.isValid() && resultData->hasResultEntry( resAddr ) )
{
gridResultValues = resultData->cellScalarResults( resAddr, timeStep );

View File

@ -1009,6 +1009,26 @@ QString RimEclipseResultDefinition::diffResultUiShortNameHTML() const
return diffResult.join( "<br>" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimEclipseResultDefinition::timeLapseBaseTimeStep() const
{
return m_timeLapseBaseTimestep;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimEclipseResultDefinition::caseDiffIndex() const
{
if ( m_differenceCase )
{
return m_differenceCase->caseId();
}
return -1;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -106,6 +106,9 @@ public:
QString diffResultUiShortName() const;
QString diffResultUiShortNameHTML() const;
int timeLapseBaseTimeStep() const;
int caseDiffIndex() const;
void loadResult();
RigEclipseResultAddress eclipseResultAddress() const;
void setFromEclipseResultAddress( const RigEclipseResultAddress& resultAddress );