Skip to content

Commit

Permalink
Make sure we read data from file reader only when required
Browse files Browse the repository at this point in the history
Use same pattern as for dynamic results.
  • Loading branch information
magnesj committed Apr 22, 2024
1 parent 91c82f0 commit 1bee1d9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1647,9 +1647,12 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
m_cellScalarResults[scalarResultIndex].resize( 1 );

std::vector<double>& values = m_cellScalarResults[scalarResultIndex][0];
if ( !m_readerInterface->staticResult( resultName, m_porosityModel, &values ) )
if ( values.empty() )
{
resultLoadingSuccess = false;
if ( !m_readerInterface->staticResult( resultName, m_porosityModel, &values ) )
{
resultLoadingSuccess = false;
}
}
}

Expand Down

0 comments on commit 1bee1d9

Please sign in to comment.