6 #include "MEDMEM_InterpolationHighLevelObjects.hxx"
9 #include "LocalTraceCollector.hxx"
10 #endif /* ifdef _DEBUG_*/
12 using namespace MEDMEM;
13 using namespace MED_EN;
18 LocalTraceCollector::instance();
19 #endif /* ifdef _DEBUG_*/
23 const int DIMENSION = 3;
25 const int isConvexFromMesh = 1;
27 const char * fromFileName = "fromMesh.med";
28 const char * fromMeshName = "fromMesh";
30 MESH * fromMesh = new MESH(MED_DRIVER,fromFileName,fromMeshName);
32 const char * toFileName = "toMesh.med";
33 const char * toMeshName = "toMesh";
35 MESH * toMesh = new MESH(MED_DRIVER,toFileName,toMeshName);
37 Meta_Wrapper<DIMENSION> * fromWrapper = new Meta_Wrapper<DIMENSION>
39 fromMesh->getNumberOfNodes(),
40 const_cast<double *> (fromMesh->getCoordinates(MED_FULL_INTERLACE)),
41 const_cast<CONNECTIVITY *> (fromMesh->getConnectivityptr())
44 Meta_Wrapper<DIMENSION> * toWrapper = new Meta_Wrapper<DIMENSION>
46 toMesh->getNumberOfNodes(),
47 const_cast<double *> (toMesh->getCoordinates(MED_FULL_INTERLACE))
50 Meta_Mapping<DIMENSION> * mapping = new Meta_Mapping<DIMENSION> (fromWrapper,toWrapper);
52 mapping->Cree_Mapping(isConvexFromMesh);
54 vector<int> vectormapping = mapping->Get_Mapping();
56 for (i=0;i<vectormapping.size();i++)
58 cout<<"Le noeud "<<i<<" de "<<toMeshName<<" est contenu dans la maille "<<vectormapping[i]<<" de "<<fromMeshName<<endl;