X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNELTest%2FPerfTest.cxx;h=4083addb386e95ccde0fe95cf9d4d91c653d4060;hb=8411b13fec372c7635bf04d2bb81a869dc038fdd;hp=be60bcb0d6efe013a97c9a7e2425cce4bd938c05;hpb=6df2e0e16579c65de3b7ddf71bcc1ab995258fb1;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNELTest/PerfTest.cxx b/src/INTERP_KERNELTest/PerfTest.cxx index be60bcb0d..4083addb3 100644 --- a/src/INTERP_KERNELTest/PerfTest.cxx +++ b/src/INTERP_KERNELTest/PerfTest.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 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 @@ -30,7 +30,6 @@ #include /** - * \file PerfTest.cxx * Test program which takes two meshes and calculates their intersection matrix. * * USAGE : PerfTest mesh1 mesh2 @@ -67,13 +66,13 @@ namespace INTERP_TEST LOG(1, std::endl << "=== -> intersecting src = " << mesh1 << ", target = " << mesh2 ); LOG(5, "Loading " << mesh1 << " from " << mesh1path); - MEDCouplingAutoRefCountObjectPtr sMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh1path).c_str(),mesh1); - MEDCouplingAutoRefCountObjectPtr sMesh=sMeshML->getMeshAtLevel(0); + MCAuto sMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh1path).c_str(),mesh1); + MCAuto sMesh=sMeshML->getMeshAtLevel(0); LOG(5, "Loading " << mesh2 << " from " << mesh2path); - MEDCouplingAutoRefCountObjectPtr tMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh2path).c_str(),mesh2); - MEDCouplingAutoRefCountObjectPtr tMesh=tMeshML->getMeshAtLevel(0); + MCAuto tMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh2path).c_str(),mesh2); + MCAuto tMesh=tMeshML->getMeshAtLevel(0); MEDCouplingNormalizedUnstructuredMesh<3,3> sMesh_wrapper(sMesh); MEDCouplingNormalizedUnstructuredMesh<3,3> tMesh_wrapper(tMesh); @@ -81,9 +80,9 @@ namespace INTERP_TEST Interpolation3D interpolator; interpolator.interpolateMeshes(sMesh_wrapper, tMesh_wrapper,m,"P0P0"); - std::pair eff = countNumberOfMatrixEntries(m); - LOG(1, eff.first << " of " << numTargetElems * numSrcElems << " intersections calculated : ratio = " - << double(eff.first) / double(numTargetElems * numSrcElems)); +// std::pair eff = countNumberOfMatrixEntries(m); +// 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)); @@ -106,7 +105,7 @@ namespace INTERP_TEST for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter) { numElems += iter->size(); - for(std::map::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2) + for(std::map::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2) { if(!INTERP_KERNEL::epsilonEqual(iter2->second, 0.0, VOL_PREC)) {