1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/
25 #include "MEDMEM_Exception.hxx"
26 #include "MEDMEM_Mesh.hxx"
27 #include "MEDMEM_Family.hxx"
28 #include "MEDMEM_Group.hxx"
30 #include "MEDMEM_MedMeshDriver.hxx"
31 #include "MEDMEM_MedFieldDriver.hxx"
32 #include "MEDMEM_Support.hxx"
33 #include "MEDMEM_Field.hxx"
34 #include "MEDMEM_define.hxx"
37 using namespace MEDMEM;
39 int main (int argc, char ** argv) {
42 if (argc <3) { // after 3, ignored !
43 cerr << "Usage : " << argv[0]
44 << " filename meshname" << endl << endl;
48 string filename = argv[1] ;
49 string meshname = argv[2] ;
51 MESH * myMesh= new MESH() ;
52 myMesh->setName(meshname);
53 MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ;
54 myMeshDriver.setMeshName(meshname);
57 myMeshDriver.close() ;
59 cout << * myMesh << endl;
60 MESH * myMesh2 = new MESH(* myMesh);
62 cout << * myMesh2 << endl;