]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/test_MEDMEM_PolyDriverMedMeshRead.cxx
Salome HOME
remove a reference to the $MED_ROOT_DIR in the Makefile.in wich is useless
[modules/med.git] / src / MEDMEM / test_MEDMEM_PolyDriverMedMeshRead.cxx
1 // This program test the implementation of the class MED_MESH_RDONLY_DRIVER for Polygons and Polyhedron. //
2
3 #include "MEDMEM_define.hxx"
4 #include "MEDMEM_Mesh.hxx"
5 #include "MEDMEM_MedMeshDriver.hxx"
6
7 #ifdef _DEBUG_
8 #include "LocalTraceCollector.hxx"
9 #endif /* ifdef _DEBUG_*/
10
11 using namespace std;
12 using namespace MEDMEM;
13
14
15 int main (int argc, char ** argv)
16 {
17   if (argc <3) // after 3, ignored !
18     {
19       cerr << "Usage : " << argv[0] 
20            << " filename meshname" << endl << endl;
21       exit(-1);
22     }
23
24 #ifdef _DEBUG_
25   LocalTraceCollector::instance();
26 #endif /* ifdef _DEBUG_*/
27
28   string filename = argv[1];
29   string meshname = argv[2];
30
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();
38
39   cout << * myMesh << endl;
40
41   delete myMesh;
42   return 0;
43 }