]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Intersec bug fix: ComputeResidual buggy for quad polyg with 2 edges.
authorabn <adrien.bruneton@cea.fr>
Mon, 22 Oct 2018 14:57:40 +0000 (16:57 +0200)
committerabn <adrien.bruneton@cea.fr>
Mon, 22 Oct 2018 15:02:24 +0000 (17:02 +0200)
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx

index bc701619816321a46cbf4179751d2f7af4a3b451..4289d7a24bda588e9184e32683c715bec6ab321c 100644 (file)
@@ -1202,6 +1202,8 @@ void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std::
   for(std::list<QuadraticPolygon *>::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<maxNbOfTurn && ((!pol1Zip.empty() || !edgesInPol2OnBoundaryL.empty())))
     {