1 // This program test the implementation of the class MED_MESH_RDONLY_DRIVER for Polygons and Polyhedron. //
3 #include "MEDMEM_define.hxx"
4 #include "MEDMEM_Mesh.hxx"
5 #include "MEDMEM_MedMeshDriver.hxx"
8 #include "LocalTraceCollector.hxx"
9 #endif /* ifdef _DEBUG_*/
12 using namespace MEDMEM;
15 int main (int argc, char ** argv)
17 if (argc <3) // after 3, ignored !
19 cerr << "Usage : " << argv[0]
20 << " filename meshname" << endl << endl;
25 LocalTraceCollector::instance();
26 #endif /* ifdef _DEBUG_*/
28 string filename = argv[1];
29 string meshname = argv[2];
31 MESH * myMesh = new MESH();
32 myMesh->setName(meshname);
33 MED_MESH_RDONLY_DRIVER myMeshReadDriver(filename,myMesh);
34 myMeshReadDriver.setMeshName(meshname);
35 myMeshReadDriver.open();
36 myMeshReadDriver.read();
37 myMeshReadDriver.close();
39 cout << * myMesh << endl;