1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef MED_MESH_DRIVER21_HXX
23 #define MED_MESH_DRIVER21_HXX
27 #include "MEDMEM_MedMeshDriver.hxx"
28 #include "MEDMEM_define.hxx"
29 #include "MEDMEM_Compatibility21_22.hxx"
35 Generic part : implement open and close methods.
45 class MEDMEM_EXPORT MED_MESH_DRIVER21 : public virtual MED_MESH_DRIVER
49 med_2_1::med_idt _medIdt;
54 static const med_2_1::med_geometrie_element all_cell_type[MED_NBR_GEOMETRIE_MAILLE];
56 static const char * const all_cell_type_tab [MED_NBR_GEOMETRIE_MAILLE];
65 MED_MESH_DRIVER21(const string & fileName,
67 MED_EN::med_mode_acces accessMode) ;
71 MED_MESH_DRIVER21(const MED_MESH_DRIVER21 & driver) ;
76 virtual ~MED_MESH_DRIVER21() ;
84 Driver Med for MESH : Read only.
86 Implement read method.
90 class MEDMEM_EXPORT MED_MESH_RDONLY_DRIVER21 : public virtual IMED_MESH_RDONLY_DRIVER,
91 public virtual MED_MESH_DRIVER21
98 MED_MESH_RDONLY_DRIVER21() ;
102 MED_MESH_RDONLY_DRIVER21(const string & fileName, MESH * ptrMesh) ;
106 MED_MESH_RDONLY_DRIVER21(const MED_MESH_RDONLY_DRIVER21 & driver) ;
111 virtual ~MED_MESH_RDONLY_DRIVER21() ;
113 void activateFacesComputation() { _computeFaces=true; }
114 void desactivateFacesComputation() { _computeFaces=false; }
118 int getCONNECTIVITY();
120 int getNodalConnectivity(CONNECTIVITY * Connectivity) ;
121 int getNodesFamiliesNumber(int * MEDArrayNodeFamily) ;
122 int getCellsFamiliesNumber(int** Arrays, CONNECTIVITY* Connectivity, MED_EN::medEntityMesh entity) ;
125 GENDRIVER * copy ( void ) const ;
133 Driver Med for MESH : Write only.
135 Implement write method.
139 class MEDMEM_EXPORT MED_MESH_WRONLY_DRIVER21 : public virtual IMED_MESH_WRONLY_DRIVER, public virtual MED_MESH_DRIVER21 {
146 MED_MESH_WRONLY_DRIVER21() ;
150 MED_MESH_WRONLY_DRIVER21(const string & fileName, MESH * ptrMesh) ;
154 MED_MESH_WRONLY_DRIVER21(const MED_MESH_WRONLY_DRIVER21 & driver) ;
159 virtual ~MED_MESH_WRONLY_DRIVER21() ;
162 Write MESH in the specified file.
164 void write( void ) const;
167 int writeCoordinates () const;
168 int writeConnectivities (MED_EN::medEntityMesh entity) const;
169 int writeFamilyNumbers () const;
170 int writeFamilies (vector<FAMILY*> & families) const;
171 int writeGRID() const;
173 GENDRIVER * copy ( void ) const ;
179 Driver Med for MESH : Read write.
180 - Use read method from MED_MESH_RDONLY_DRIVER
181 - Use write method from MED_MESH_WRONLY_DRIVER
185 class MEDMEM_EXPORT MED_MESH_RDWR_DRIVER21 : public IMED_MESH_RDWR_DRIVER, public MED_MESH_RDONLY_DRIVER21, public MED_MESH_WRONLY_DRIVER21 {
192 MED_MESH_RDWR_DRIVER21() ;
196 MED_MESH_RDWR_DRIVER21(const string & fileName, MESH * ptrMesh) ;
200 MED_MESH_RDWR_DRIVER21(const MED_MESH_RDWR_DRIVER21 & driver) ;
205 ~MED_MESH_RDWR_DRIVER21() ;
208 Write MESH in the specified file.
210 void write(void) const;
212 Read MESH in the specified file.
217 GENDRIVER * copy(void) const ;
222 #endif /* MED_MESH_DRIVER21_HXX */