#12994 Radial model: Freeze when selecting cell result INDEX_IJK

When a LGR is created to be able to show the radial grid, the active index usage when computing INDEX_IJK was wrong.

wip
This commit is contained in:
Magne Sjaastad committed 2025-10-08 16:03:56 +02:00
1 parent 5d26f53472
commit b771421087
3 files changed
+11 -22

No files matched your search

@@ -55,7 +55,8 @@ bool RigIndexIjkResultCalculator::isMatching( const RigEclipseResultAddress& res
//--------------------------------------------------------------------------------------------------
void RigIndexIjkResultCalculator::calculate( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex )
{
size_t activeCellCount = m_resultsData->activeCellInfo()->reservoirActiveCellCount();
const auto activeReservoirCellIndices = m_resultsData->activeCellInfo()->activeReservoirCellIndices();
const size_t activeCellCount = activeReservoirCellIndices.size();
if ( activeCellCount == 0 ) return;
size_t iResultIndex =
@@ -98,13 +99,12 @@ void RigIndexIjkResultCalculator::calculate( const RigEclipseResultAddress& resV
if ( !( computeIndexI || computeIndexJ || computeIndexK ) ) return;
const auto mainGrid = m_resultsData->m_ownerMainGrid;
const auto activeCells = m_resultsData->activeCellInfo()->activeReservoirCellIndices();
const auto mainGrid = m_resultsData->m_ownerMainGrid;
#pragma omp parallel for
for ( int activeIndex = 0; activeIndex < static_cast<int>( activeCells.size() ); activeIndex++ )
for ( int activeIndex = 0; activeIndex < static_cast<int>( activeReservoirCellIndices.size() ); activeIndex++ )
{
auto cellIdx = activeCells[activeIndex];
auto cellIdx = activeReservoirCellIndices[activeIndex];
if ( cellIdx == cvf::UNDEFINED_SIZE_T ) continue;
const RigCell& cell = mainGrid->cell( cellIdx );