#14806 NNC: Only test candidates in the neighbor pillar column for I and J fault faces

Computing additional NNCs spent most of its time running quad overlap tests on
candidate cells outside the neighbor pillar column. Most of these touch the
fault face along an edge only. Restrict candidates for I and J faces to the
neighbor column. This intentionally skips a small number of non-zero area
overlaps outside the column.
This commit is contained in:
Magne Sjaastad committed 2026-10-05 08:39:07 +02:00
1 parent 4977941896
commit c04dbbeec3
1 file changed
+4 -9
@@ -285,17 +285,12 @@ void RigCellFaceGeometryTools::extractConnectionsForFace( const RigFault::FaultF
size_t ck = std::numeric_limits<size_t>::max();
mainGrid->ijkFromCellIndexUnguarded( candidateCellIndex, &ci, &cj, &ck );
// For I and J faces, only consider cells in the neighbor pillar column. Cells in other columns mostly
// touch the face along an edge, and testing them for overlap dominates the computation time.
auto gridAxis = cvf::StructGridInterface::gridAxisFromFace( sourceCellFace );
if ( gridAxis == cvf::StructGridInterface::GridAxisType::AXIS_I )
if ( gridAxis == cvf::StructGridInterface::GridAxisType::AXIS_I || gridAxis == cvf::StructGridInterface::GridAxisType::AXIS_J )
{
if ( ni != ci )
{
continue;
}
}
else if ( gridAxis == cvf::StructGridInterface::GridAxisType::AXIS_J )
{
if ( nj != cj )
if ( ni != ci || nj != cj )
{
continue;
}