From 768b3d44d03cab84e57e2588d461489d7a01fc76 Mon Sep 17 00:00:00 2001 From: abn Date: Mon, 22 Oct 2018 16:57:40 +0200 Subject: [PATCH] Intersec bug fix: ComputeResidual buggy for quad polyg with 2 edges. --- .../Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index ef169e3d6..bbd3d0097 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -1218,6 +1218,8 @@ void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std:: for(std::list::const_iterator itMNT=pol1Zip.begin();itMNT!=pol1Zip.end();itMNT++,iiMNT++) nbOfTurn+=(*itMNT)->size(); maxNbOfTurn=maxNbOfTurn*nbOfTurn; maxNbOfTurn*=maxNbOfTurn; + // [ABN] at least 3 turns for very small cases (typically one (quad) edge against one (quad or lin) edge forming a new cell)! + maxNbOfTurn = maxNbOfTurn<3 ? 3 : maxNbOfTurn; nbOfTurn=0; while(nbOfTurn