Salome HOME
Updated copyright comment
[tools/medcoupling.git] / src / INTERP_KERNEL / MappedBarycentric2DIntersectorP1P1.txx
index f399844d6eee91b0dcc058c581a6da728c3e1303..8dc1cc360248632713656171df78c00966f7e867 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -43,7 +43,7 @@ namespace INTERP_KERNEL
   {
     std::vector<double> CoordsT;
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    ConnType nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM;
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
       {
         NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iter));
@@ -53,12 +53,12 @@ namespace INTERP_KERNEL
         PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(*iter),CoordsS);
         std::vector<double> CoordsTTmp(CoordsT);
         if(SPACEDIM==3)
-          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],CoordsS.size()/SPACEDIM,nbOfNodesT);
+          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],ToConnType(CoordsS.size())/SPACEDIM,nbOfNodesT);
         const ConnType *startOfCellNodeConnT=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
-        for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+        for(ConnType nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
           {
             typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
-            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2D(&CoordsTTmp[nodeIdT*SPACEDIM],&CoordsS[0],4,PlanarIntersector<MyMeshType,MyMatrix>::_precision) )
+            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2DSimple(&CoordsTTmp[nodeIdT*SPACEDIM],&CoordsS[0],4,PlanarIntersector<MyMeshType,MyMatrix>::_precision) )
               {
                 double mco[2];  // mapped coordinates in the quad4
                 std::vector<const double*> coo(4);
@@ -74,7 +74,7 @@ namespace INTERP_KERNEL
                 resLoc[3] =  mco[0]     * (1.-mco[1]);
 
                 const ConnType *startOfCellNodeConnS=PlanarIntersector<MyMeshType,MyMatrix>::_connectS+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[*iter]);
-                for(int nodeIdS=0;nodeIdS<4;nodeIdS++)
+                for(ConnType nodeIdS=0;nodeIdS<4;nodeIdS++)
                   {
                     if(fabs(resLoc[nodeIdS])>PlanarIntersector<MyMeshType,MyMatrix>::_precision)
                       {
@@ -96,13 +96,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }