X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNELTest%2FPerfTest.cxx;h=0ab533a13cf74888c132f757d3be2a7a8b42e3e3;hb=1123dccd6613b2e8abba35182759d5c4a11ecc8d;hp=fd139bc9addbeccf5eef84da5ca60b9c06bfaa59;hpb=10f37bf6f33a762626d7f1093b2f5450c1688667;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNELTest/PerfTest.cxx b/src/INTERP_KERNELTest/PerfTest.cxx index fd139bc9a..0ab533a13 100644 --- a/src/INTERP_KERNELTest/PerfTest.cxx +++ b/src/INTERP_KERNELTest/PerfTest.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2014 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 @@ -24,15 +24,11 @@ #include "VectorUtils.hxx" #include "TestInterpKernelUtils.hxx" -#include "MEDMEM_Mesh.hxx" -#include "MEDNormalizedUnstructuredMesh.hxx" +#include "MEDCouplingNormalizedUnstructuredMesh.hxx" #include #include -using namespace MEDMEM; -using namespace MED_EN; - /** * \file PerfTest.cxx * Test program which takes two meshes and calculates their intersection matrix. @@ -71,14 +67,16 @@ namespace INTERP_TEST LOG(1, std::endl << "=== -> intersecting src = " << mesh1 << ", target = " << mesh2 ); LOG(5, "Loading " << mesh1 << " from " << mesh1path); - const MESH sMesh(MED_DRIVER, INTERP_TEST::getResourceFile(mesh1path), mesh1); + MEDCouplingAutoRefCountObjectPtr sMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh1path).c_str(),mesh1); + MEDCouplingAutoRefCountObjectPtr sMesh=sMeshML->getMeshAtLevel(0); LOG(5, "Loading " << mesh2 << " from " << mesh2path); - const MESH tMesh(MED_DRIVER, INTERP_TEST::getResourceFile(mesh2path), mesh2); + MEDCouplingAutoRefCountObjectPtr tMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh2path).c_str(),mesh2); + MEDCouplingAutoRefCountObjectPtr tMesh=tMeshML->getMeshAtLevel(0); - MEDNormalizedUnstructuredMesh<3,3> sMesh_wrapper(&sMesh); - MEDNormalizedUnstructuredMesh<3,3> tMesh_wrapper(&tMesh); + MEDCouplingNormalizedUnstructuredMesh<3,3> sMesh_wrapper(sMesh); + MEDCouplingNormalizedUnstructuredMesh<3,3> tMesh_wrapper(tMesh); Interpolation3D interpolator; interpolator.interpolateMeshes(sMesh_wrapper, tMesh_wrapper,m,"P0P0"); @@ -108,7 +106,7 @@ namespace INTERP_TEST for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter) { numElems += iter->size(); - for(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)) { @@ -137,11 +135,11 @@ int main(int argc, char** argv) assert(argc == 3); // load meshes - const string mesh1 = argv[1]; - const string mesh2 = argv[2]; + const std::string mesh1 = argv[1]; + const std::string mesh2 = argv[2]; - const string mesh1path = mesh1 + ".med"; - const string mesh2path = mesh2 + ".med"; + const std::string mesh1path = mesh1 + ".med"; + const std::string mesh2path = mesh2 + ".med"; IntersectionMatrix m;