Add extra checks for result indexes and update opm-common with dual poro fixes

This commit is contained in:
jonjenssen authored and JJ committed 2025-10-28 06:37:21 +01:00
1 parent c0b881ce7d
commit e0893cfa6f
3 files changed
+3 -2

No files matched your search

@@ -77,7 +77,7 @@ void RigCellVolumeResultCalculator::calculate( const RigEclipseResultAddress& re
nativeResvCellIndex++ )
{
size_t resultIndex = m_resultsData->activeCellInfo()->cellResultIndex( nativeResvCellIndex );
if ( resultIndex != cvf::UNDEFINED_SIZE_T )
if ( ( resultIndex != cvf::UNDEFINED_SIZE_T ) && ( resultIndex < cellResultCount ) )
{
const RigCell& cell = m_resultsData->m_ownerMainGrid->cell( nativeResvCellIndex );
if ( !cell.subGrid() )
@@ -1906,6 +1906,7 @@ void RigCaseCellResultsData::computeDepthRelatedResults()
size_t resultIndex = activeCellInfo()->cellResultIndex( cellIdx );
if ( resultIndex == cvf::UNDEFINED_SIZE_T ) continue;
if ( resultIndex >= actCellCount ) continue;
bool isTemporaryGrid = cell.hostGrid()->isTempGrid();