From c0641560eeb79c03c57d8cd42bd3fa4e309675a3 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 bc7016198..4289d7a24 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -1202,6 +1202,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