Salome HOME
Implementation of MEDCoupling1SGTUMesh.computeTriangleHeight and DataArrayDouble...
[tools/medcoupling.git] / src / INTERP_KERNEL / PlanarIntersectorP1P0PL.txx
index 37de732d551680efa2db65788ab376a6aa1870f1..c48412b2e5e5ea38e83655d9651ac7f47820a129 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -32,9 +32,9 @@ namespace INTERP_KERNEL
 {
   template<class MyMeshType, class MyMatrix>
   PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS,
-                                                                        double dimCaracteristic, double md3DSurf,
+                                                                        double dimCaracteristic, double md3DSurf, double minDot3DSurf,
                                                                         double medianPlane, double precision, int orientation):
-    PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0)
+    PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0)
   {
   }
 
@@ -46,7 +46,7 @@ namespace INTERP_KERNEL
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
     double baryT[SPACEDIM];
     double baryTTmp[SPACEDIM];
-    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],CoordsT.size()/SPACEDIM,baryT);
+    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],ToConnType(CoordsT.size())/SPACEDIM,baryT);
     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));
@@ -67,7 +67,7 @@ namespace INTERP_KERNEL
             PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],littleTargetCell,3,3);
             std::copy(littleTargetCell,littleTargetCell+3,baryTTmp);
           }
-        if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2D(baryTTmp,&CoordsS[0],3,PlanarIntersector<MyMeshType,MyMatrix>::_precision))
+        if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2DSimple(baryTTmp,&CoordsS[0],3,PlanarIntersector<MyMeshType,MyMatrix>::_precision))
           {
             double resLoc[3];
             barycentric_coords<SPACEDIM>(&CoordsS[0],baryTTmp,resLoc);
@@ -93,13 +93,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfElements();
   }
   
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }