Salome HOME
Deal with 1D/0D pointlocator into Remapper
[tools/medcoupling.git] / src / INTERP_KERNEL / CurveIntersectorP1P1.txx
index 6fcc16923f63955a62fc7eaa52de5401a7a76182..dd91ee5f288dd07af06b12e17979e43beeb597d5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2019  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
@@ -37,14 +37,14 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P1<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP1P1<MyMeshType,MyMatrix>
   ::getNumberOfRowsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P1<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP1P1<MyMeshType,MyMatrix>
   ::getNumberOfColsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshS.getNumberOfNodes();
@@ -56,22 +56,22 @@ namespace INTERP_KERNEL
   {
     std::vector<typename BASE_INTERSECTOR::TDualSegment> segmentsT, segmentsS;
     BASE_INTERSECTOR::getDualSegments( icellT, BASE_INTERSECTOR::_meshT, segmentsT);
-    for ( int t = 0; t < (int)segmentsT.size(); ++t )
+    for ( ConnType t = 0; t < (ConnType)segmentsT.size(); ++t )
       {
         typename MyMatrix::value_type& resRow = res[ OTT<ConnType,numPol>::ind2C( segmentsT[t]._nodeId )];
         for(typename std::vector<ConnType>::const_iterator
               iter=icellsS.begin(); iter!=icellsS.end(); iter++)
           {
-            int iS = *iter;
+            ConnType iS = *iter;
             BASE_INTERSECTOR::getDualSegments( OTT<ConnType,numPol>::ind2C(iS),
                                                BASE_INTERSECTOR::_meshS, segmentsS);
-            for ( int s = 0; s < (int)segmentsS.size(); ++s )
+            for ( ConnType s = 0; s < (ConnType)segmentsS.size(); ++s )
               {
                 double surf = BASE_INTERSECTOR::intersectSegments(&segmentsT[t]._coords[0],
                                                                   &segmentsS[s]._coords[0]);
                 if(surf!=0.)
                   {
-                    int nS = segmentsS[s]._nodeId;
+                    ConnType nS = segmentsS[s]._nodeId;
                     typename MyMatrix::value_type::const_iterator iterRes=resRow.find(nS);
                     if(iterRes==resRow.end())
                       resRow.insert(std::make_pair(nS,surf));