Salome HOME
Addition of new reference coords including degenerated cells.
[modules/med.git] / src / MEDCoupling / Test / MEDCouplingBasicsTestInterp.cxx
index 33c4a793de5791661641b77a722826b827f11b5a..cb0e0e8eb213e93d2ba6a89180de0fe86ffc8449 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2013  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
@@ -16,6 +16,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Author : Anthony Geay (CEA/DEN)
 
 #include "MEDCouplingBasicsTestInterp.hxx"
 #include "MEDCouplingUMesh.hxx"
@@ -1524,7 +1525,7 @@ void MEDCouplingBasicsTestInterp::testInterpolationCC()
       {
         sum += s_v->second;
         double vvv;
-#ifdef WNT
+#ifdef WIN32
         double vv = s_v->second / precis;
         if(vv>=0.0)
           {
@@ -1931,9 +1932,8 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1P0Bary_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  myInterpolator.setP1P0BaryMethod(true);
   std::vector<std::map<int,double> > res;
-  INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
+  INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Barycentric,INTERP_KERNEL::BarycentricGeo2D};
   for(int i=0;i<2;i++)
     {
       myInterpolator.setPrecision(1e-12);
@@ -1973,9 +1973,8 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP1P0Bary_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  myInterpolator.setP1P0BaryMethod(true);
   std::vector<std::map<int,double> > res;
-  INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
+  INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Barycentric,INTERP_KERNEL::BarycentricGeo2D};
   for(int i=0;i<2;i++)
     {
       myInterpolator.setPrecision(1e-12);
@@ -2016,9 +2015,9 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P0Bary_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  myInterpolator.setP1P0BaryMethod(true);
   std::vector<std::map<int,double> > res;
   myInterpolator.setPrecision(1e-12);
+  myInterpolator.setIntersectionType(INTERP_KERNEL::Barycentric);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
   CPPUNIT_ASSERT_EQUAL(5,(int)res.size());