-// 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
#include "VectorUtils.hxx"
#include "TestInterpKernelUtils.hxx"
-#include "MEDMEM_Mesh.hxx"
-#include "MEDNormalizedUnstructuredMesh.hxx"
+#include "MEDCouplingNormalizedUnstructuredMesh.hxx"
#include <cassert>
#include <string>
-using namespace MEDMEM;
-using namespace MED_EN;
-
/**
* \file PerfTest.cxx
* Test program which takes two meshes and calculates their intersection matrix.
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<MEDFileUMesh> sMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh1path).c_str(),mesh1);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> sMesh=sMeshML->getMeshAtLevel(0);
LOG(5, "Loading " << mesh2 << " from " << mesh2path);
- const MESH tMesh(MED_DRIVER, INTERP_TEST::getResourceFile(mesh2path), mesh2);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> tMeshML=MEDFileUMesh::New(INTERP_TEST::getResourceFile(mesh2path).c_str(),mesh2);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> 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");
for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter)
{
numElems += iter->size();
- for(map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
+ for(std::map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
{
if(!INTERP_KERNEL::epsilonEqual(iter2->second, 0.0, VOL_PREC))
{
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;