6 #include "MEDMEM_Exception.hxx"
7 #include "MEDMEM_Mesh.hxx"
8 #include "MEDMEM_Family.hxx"
9 #include "MEDMEM_Group.hxx"
11 #include "MEDMEM_MedMeshDriver.hxx"
12 #include "MEDMEM_MedFieldDriver.hxx"
13 #include "MEDMEM_Support.hxx"
14 #include "MEDMEM_Field.hxx"
15 #include "MEDMEM_define.hxx"
18 #include "LocalTraceCollector.hxx"
19 #endif /* ifdef _DEBUG_*/
22 using namespace MEDMEM;
24 int main (int argc, char ** argv) {
26 LocalTraceCollector::instance();
27 #endif /* ifdef _DEBUG_*/
31 if (argc <3) { // after 3, ignored !
32 cerr << "Usage : " << argv[0]
33 << " filename meshname" << endl << endl;
37 string filename = argv[1] ;
38 string meshname = argv[2] ;
40 MESH * myMesh= new MESH() ;
41 myMesh->setName(meshname);
42 MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ;
43 myMeshDriver.setMeshName(meshname);
46 myMeshDriver.close() ;
48 cout << * myMesh << endl;
49 MESH * myMesh2 = new MESH(* myMesh);
51 cout << * myMesh2 << endl;