Salome HOME
Load interpolation matrix from the outside
[tools/medcoupling.git] / src / INTERP_KERNELTest / PerfTest.cxx
index be60bcb0d6efe013a97c9a7e2425cce4bd938c05..c7cdab566853ba1938a306811dbf31e1024ae913 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  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
@@ -67,13 +67,13 @@ namespace INTERP_TEST
       LOG(1, std::endl << "=== -> intersecting src = " << mesh1 << ", target = " << mesh2 );
 
       LOG(5, "Loading " << mesh1 << " from " << mesh1path);
-      MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> sMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh1path).c_str(),mesh1);
-      MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> sMesh=sMeshML->getMeshAtLevel(0);
+      MCAuto<MEDFileUMesh> sMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh1path).c_str(),mesh1);
+      MCAuto<MEDCouplingUMesh> sMesh=sMeshML->getMeshAtLevel(0);
 
 
       LOG(5, "Loading " << mesh2 << " from " << mesh2path);
-      MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> tMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh2path).c_str(),mesh2);
-    MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> tMesh=tMeshML->getMeshAtLevel(0);
+      MCAuto<MEDFileUMesh> tMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh2path).c_str(),mesh2);
+      MCAuto<MEDCouplingUMesh> tMesh=tMeshML->getMeshAtLevel(0);
 
       MEDCouplingNormalizedUnstructuredMesh<3,3> sMesh_wrapper(sMesh);
       MEDCouplingNormalizedUnstructuredMesh<3,3> tMesh_wrapper(tMesh);
@@ -82,8 +82,8 @@ namespace INTERP_TEST
       interpolator.interpolateMeshes(sMesh_wrapper, tMesh_wrapper,m,"P0P0");
 
       std::pair<int, int> eff = countNumberOfMatrixEntries(m);
-      LOG(1, eff.first << " of " << numTargetElems * numSrcElems << " intersections calculated : ratio = "
-          << double(eff.first) / double(numTargetElems * numSrcElems));
+//      LOG(1, eff.first << " of " << numTargetElems * numSrcElems << " intersections calculated : ratio = "
+//          << double(eff.first) / double(numTargetElems * numSrcElems));
       LOG(1, eff.second << " non-zero elements of " << eff.first << " total : filter efficiency = "
           << double(eff.second) / double(eff.first));