From be160a9fe62656612b3f408f0cda4fcbb6a9a2f4 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 7 Jun 2021 07:42:36 +0200 Subject: [PATCH] #3693 Intersect : Use active state of LGR cell to define visibility Eclipse reports parent cell to LGR cells as active, and this property has been tested for in code. Intersect reports inactive cell in the parent grid cell. Then we have to only check the active state of the LGR cell, not the parent cell. --- .../RivReservoirViewPartMgr.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp b/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp index 1d993bcd17..0c17667f84 100644 --- a/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp +++ b/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp @@ -639,12 +639,11 @@ void RivReservoirViewPartMgr::computeNativeVisibility( cvf::UByteArray* for ( int cellIndex = 0; cellIndex < static_cast( grid->cellCount() ); cellIndex++ ) { const RigCell& cell = grid->cell( cellIndex ); - size_t reservoirCellIndex = cell.mainGridCellIndex(); + size_t reservoirCellIndex = grid->reservoirCellIndex( cellIndex ); + bool isCellActive = activeCellInfo->isActive( reservoirCellIndex ); - if ( !invalidCellsIsVisible && cell.isInvalid() || - !inactiveCellsIsVisible && !activeCellInfo->isActive( reservoirCellIndex ) || - !activeCellsIsVisible && activeCellInfo->isActive( reservoirCellIndex ) || - ( *cellIsInWellStatuses )[cellIndex] ) + if ( !invalidCellsIsVisible && cell.isInvalid() || !inactiveCellsIsVisible && !isCellActive || + !activeCellsIsVisible && isCellActive || ( *cellIsInWellStatuses )[cellIndex] ) { ( *cellVisibility )[cellIndex] = false; } @@ -693,8 +692,8 @@ void RivReservoirViewPartMgr::computeOverriddenCellVisibility( cvf::UByteArray* for ( int mcIdx = 0; mcIdx < cellCount; ++mcIdx ) { - ( *cellVisibility )[lcIdx] |= ( *totCellVisibility )[cellIndicesInMasterCase[mcIdx]]; // If any is visible, - // show + ( *cellVisibility )[lcIdx] |= ( *totCellVisibility )[cellIndicesInMasterCase[mcIdx]]; // If any is + // visible, show } #else @@ -772,8 +771,8 @@ void RivReservoirViewPartMgr::computeFilterVisibility( RivCellSetEnum if ( geometryType == RANGE_FILTERED_WELL_CELLS ) { - geometryType = RANGE_FILTERED; // Use the range filtering in the parent grid, not the well cells in the - // parent grid + geometryType = RANGE_FILTERED; // Use the range filtering in the parent grid, not the well cells in + // the parent grid } RivReservoirPartMgr* reservoirGridPartMgr = &m_geometries[geometryType];