Salome HOME
[Intersect2D] Bug fix: residual cell construction
[tools/medcoupling.git] / src / INTERP_KERNEL / Barycentric3DIntersectorP1P1.txx
index 3f6c189252d890a39172501f32ffe30a7485e557..b63bd870c574a06e2cd261559458ed8943d8691a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -33,7 +33,6 @@ namespace INTERP_KERNEL
    * 
    * @param targetMesh  mesh containing the target elements
    * @param srcMesh     mesh containing the source elements
-   * @param policy      splitting policy to be used
    */
   template<class MyMeshType, class MyMatrix>
   Barycentric3DIntersectorP1P1<MyMeshType,MyMatrix>::Barycentric3DIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision):
@@ -56,9 +55,9 @@ namespace INTERP_KERNEL
     std::vector<double> CoordsT;
     const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
     Intersector3DP1P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    std::size_t nbOfNodesT=CoordsT.size()/SPACEDIM;
     const double *coordsS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
-    for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+    for(std::size_t nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
       {
         typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
         if(!resRow.empty())
@@ -72,7 +71,7 @@ namespace INTERP_KERNEL
             //
             std::vector<ConnType> connOfCurCellS;
             Intersector3DP1P1<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) )
+            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],ToConnType(connOfCurCellS.size()),coordsS,cmTypeS,_precision) )
               {
                 double resLoc[4];
                 std::vector<double> localCoordsS;