6 #include "MEDMEM_InterpolationHighLevelObjects.hxx"
12 const int DIMENSION = 3;
14 const int isConvexFromMesh = 1;
16 const char * fromFileName = "fromMesh.med";
17 const char * fromMeshName = "fromMesh";
19 MESH * fromMesh = new MESH(MED_DRIVER,fromFileName,fromMeshName);
21 const char * toFileName = "toMesh.med";
22 const char * toMeshName = "toMesh";
24 MESH * toMesh = new MESH(MED_DRIVER,toFileName,toMeshName);
26 Meta_Wrapper<DIMENSION> * fromWrapper = new Meta_Wrapper<DIMENSION>
28 fromMesh->getNumberOfNodes(),
29 const_cast<double *> (fromMesh->getCoordinates(MED_FULL_INTERLACE)),
30 const_cast<CONNECTIVITY *> (fromMesh->getConnectivityptr())
33 Meta_Wrapper<DIMENSION> * toWrapper = new Meta_Wrapper<DIMENSION>
35 toMesh->getNumberOfNodes(),
36 const_cast<double *> (toMesh->getCoordinates(MED_FULL_INTERLACE))
39 Meta_Mapping<DIMENSION> * mapping = new Meta_Mapping<DIMENSION> (fromWrapper,toWrapper);
41 mapping->Cree_Mapping(isConvexFromMesh);
43 vector<int> vectormapping = mapping->Get_Mapping();
45 for (i=0;i<vectormapping.size();i++)
47 cout<<"Le noeud "<<i<<" de "<<toMeshName<<" est contenu dans la maille "<<vectormapping[i]<<" de "<<fromMeshName<<endl;