Support radial grids as cylindrical cells

* Add minimum angular count to system preferences
* Refactors grid view updates and radial grid handling
* Improves radial grid handling and LGR creation
This commit is contained in:
Magne Sjaastad
2025-09-24 09:46:00 +02:00
committed by GitHub
parent d494725da8
commit 6ef5db2530
14 changed files with 479 additions and 137 deletions
@@ -741,6 +741,30 @@ void RigEclipseCaseData::computeActiveCellsGeometryBoundingBoxOptimized()
}
}
if ( m_mainGrid->totalTemporaryGridCellCount() > 0 )
{
// When we have LGRs for radial grids, we must loop over all local grids. The local grids can contain coordinates not present
// in the main grid
for ( size_t i = 0; i < m_mainGrid->gridCount(); i++ )
{
auto localGrid = m_mainGrid->gridByIndex( i );
for ( size_t localCellIndex = 0; localCellIndex < localGrid->cellCount(); localCellIndex++ )
{
size_t globalCellIndex = localGrid->reservoirCellIndex( localCellIndex );
if ( globalCellIndex < activeInfos[acIdx]->reservoirCellCount() && activeInfos[acIdx]->isActive( globalCellIndex ) )
{
std::array<cvf::Vec3d, 8> hexCorners = localGrid->cellCornerVertices( localCellIndex );
for ( const auto& corner : hexCorners )
{
bb.add( corner );
}
}
}
}
}
activeInfos[acIdx]->setGeometryBoundingBox( bb );
}