NNC computations : Skip cells other than main grid cells

This commit is contained in:
Magne Sjaastad 2020-02-24 15:49:09 +01:00
parent f38967e7cb
commit 0b2d3085f1

View File

@ -193,6 +193,11 @@ std::vector<RigConnection> RigCellFaceGeometryTools::computeOtherNncs( const Rig
size_t sourceReservoirCellIndex = f.m_nativeReservoirCellIndex;
cvf::StructGridInterface::FaceType sourceCellFace = f.m_nativeFace;
if ( sourceReservoirCellIndex >= mainGrid->cellCount() )
{
continue;
}
const std::vector<cvf::Vec3d>& mainGridNodes = mainGrid->nodes();
cvf::BoundingBox bb;
@ -242,6 +247,11 @@ std::vector<RigConnection> RigCellFaceGeometryTools::computeOtherNncs( const Rig
continue;
}
if ( candidateCellIndex >= mainGrid->cellCount() )
{
continue;
}
if ( neighborCellIndex != std::numeric_limits<size_t>::max() )
{
// Find target IJK index based on source cell and cell face