Make face test robust

This commit is contained in:
Magne Sjaastad 2022-02-03 10:05:46 +01:00
parent 94a541f966
commit 2c0ebfd14c

View File

@ -1126,13 +1126,24 @@ std::vector<WellPathCellIntersectionInfo>
WellPathCellIntersectionInfo extraIntersection;
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
extraIntersection.startPoint = intersectionPoint;
extraIntersection.endPoint = firstIntersection.startPoint;
extraIntersection.startMD = initialMD;
extraIntersection.endMD = firstIntersection.startMD;
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
extraIntersection.intersectedCellFaceOut = firstIntersection.intersectedCellFaceOut;
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
extraIntersection.startPoint = intersectionPoint;
extraIntersection.endPoint = firstIntersection.startPoint;
extraIntersection.startMD = initialMD;
extraIntersection.endMD = firstIntersection.startMD;
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
if ( firstIntersection.intersectedCellFaceIn != cvf::StructGridInterface::NO_FACE )
{
extraIntersection.intersectedCellFaceOut =
cvf::StructGridInterface::oppositeFace( firstIntersection.intersectedCellFaceIn );
}
else if ( firstIntersection.intersectedCellFaceOut != cvf::StructGridInterface::NO_FACE )
{
extraIntersection.intersectedCellFaceOut = firstIntersection.intersectedCellFaceOut;
}
extraIntersection.intersectionLengthsInCellCS = cvf::Vec3d::ZERO;
filteredIntersections.push_back( extraIntersection );