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/
20 #include "MEDMEM_Exception.hxx"
21 #include "MEDMEM_define.hxx"
23 #include "MEDMEM_Field.hxx"
24 #include "MEDMEM_Mesh.hxx"
25 #include "MEDMEM_Med.hxx"
27 using namespace MEDMEM ;
28 using namespace MED_EN ;
32 const char * fileName = "pointe.med";
33 const char * fileName2 = "fieldCellDoubleOfpointe.med";
34 const char * fieldName = "fieldcelldouble";
35 const char * meshName = "maa1";
38 // Test creation of drivers from the standard driver method of an object
39 FIELD<double> * myField = new FIELD<double>();
40 int myDriver1 = myField->addDriver(MED_DRIVER, fileName, fieldName);
42 //This test failed due to inadequate Support implementation
43 myField->rmDriver(); // TESTER LA VALIDITE DE myDriver2 !!!!
45 int myDriver2 = myField->addDriver(MED_DRIVER, fileName2, fieldName);
46 //myField->write(myDriver2);
47 //This test failed due to inadequate Support implementation
48 myField->rmDriver(myDriver2);
50 MESH * myMesh = new MESH();
51 int myDriver3 = myMesh->addDriver(MED_DRIVER, fileName, meshName);
55 MED * myMed = new MED();
56 int myDriver4 = myMed->addDriver(MED_DRIVER, fileName);
57 myMed->readFileStruct();
64 } catch (MEDEXCEPTION& ex){