Add support for K filter to polyline intersections (#10302)

* Add support for K filter to polyline intersections
This commit is contained in:
jonjenssen
2023-05-25 08:14:43 +02:00
committed by GitHub
parent fe5c24ef5d
commit 1063d7f3d3
15 changed files with 181 additions and 60 deletions

View File

@@ -61,11 +61,18 @@ void RivEclipseIntersectionGrid::findIntersectingCells( const cvf::BoundingBox&
//--------------------------------------------------------------------------------------------------
bool RivEclipseIntersectionGrid::useCell( size_t cellIndex ) const
{
const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex];
if ( m_showInactiveCells )
return !( cell.isInvalid() || ( cell.subGrid() != nullptr ) );
else
return m_activeCellInfo->isActive( cellIndex ) && ( cell.subGrid() == nullptr );
size_t i, j, k;
m_mainGrid->ijkFromCellIndexUnguarded( cellIndex, &i, &j, &k );
if ( m_intervalTool.isNumberIncluded( k ) )
{
const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex];
if ( m_showInactiveCells )
return !( cell.isInvalid() || ( cell.subGrid() != nullptr ) );
else
return m_activeCellInfo->isActive( cellIndex ) && ( cell.subGrid() == nullptr );
}
return false;
}
//--------------------------------------------------------------------------------------------------
@@ -97,3 +104,11 @@ const RigFault* RivEclipseIntersectionGrid::findFaultFromCellIndexAndCellFace( s
{
return m_mainGrid->findFaultFromCellIndexAndCellFace( reservoirCellIndex, face );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivEclipseIntersectionGrid::setKIntervalFilter( bool enabled, std::string kIntervalStr )
{
m_intervalTool.setInterval( enabled, kIntervalStr );
}