Salome HOME
Minor: portability issue. On CentOS5.2, MPI_Datatype is an int.
[tools/medcoupling.git] / src / INTERP_KERNEL / Interpolation3D2D.txx
index b971d8978cbf282a5360446e5789f60f5e4de933..674317e1af0327042fc94f17fe5744b07cd8e907 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  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
@@ -63,7 +63,7 @@ namespace INTERP_KERNEL
   int Interpolation3D2D::interpolateMeshes(const MyMeshType& srcMesh,
                                            const MyMeshType& targetMesh,
                                            MyMatrixType& matrix,
-                                           const char *method)
+                                           const std::string& method)
   {
     typedef typename MyMeshType::MyConnType ConnType;
     // create MeshElement objects corresponding to each element of the two meshes
@@ -92,15 +92,18 @@ namespace INTERP_KERNEL
         switch(InterpolationOptions::getIntersectionType())
           {
           case Triangulation:
-             intersector=new Polyhedron3D2DIntersectorP0P0<MyMeshType,MyMatrixType>(targetMesh,
-                                                                                    srcMesh,
-                                                                                    dimCaracteristic,
-                                                                                    getPrecision(),
-                                                                                    intersectFaces,
-                                                                                    getSplittingPolicy());
+            intersector=new Polyhedron3D2DIntersectorP0P0<MyMeshType,MyMatrixType>(targetMesh,
+                                                                                   srcMesh,
+                                                                                   dimCaracteristic,
+                                                                                   getPrecision(),
+                                                                                   intersectFaces,
+                                                                                   getSplittingPolicy());
+            break;
+          case PointLocator:
+            intersector=new PointLocator3DIntersectorP0P0<MyMeshType,MyMatrixType>(targetMesh,srcMesh,getPrecision());
             break;
           default:
-            throw INTERP_KERNEL::Exception("Invalid 3D intersection type for P0P0 interp specified : must be Triangulation.");
+            throw INTERP_KERNEL::Exception("Invalid 3D to 2D intersection type for P0P0 interp specified : must be Triangulation or PointLocator.");
           }
       }
     else