1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef MESHCOLLECTIONDRIVER_HXX_
20 #define MESHCOLLECTIONDRIVER_HXX_
22 #include "MEDSPLITTER.hxx"
24 namespace MEDSPLITTER{
28 class MEDSPLITTER_EXPORT MESHCollectionDriver
32 MESHCollectionDriver(MESHCollection*);
33 virtual ~MESHCollectionDriver(){}
35 virtual int read(char*)=0;
36 int readSeq(char*,char*);
38 virtual void write(char*)=0;
39 virtual void readFields (vector <MEDMEM::FIELD<int> *>& filenames, char* fieldname,
40 int itnumber, int ordernumber) =0;
41 virtual void readFields (vector <MEDMEM::FIELD<double> *>& filenames, char* fieldname,
42 int itnumber, int ordernumber) =0;
43 virtual void writeFields(vector <MEDMEM::FIELD<int> *>& filenames, char* fieldname)=0;
44 virtual void writeFields(vector <MEDMEM::FIELD<double> *>& filenames, char* fieldname)=0;
46 void readFileStruct(vector <string>& field_names,vector<int>& iternumber,vector <int>& ordernumber,vector <int> & types);
48 int getFieldType(const std::string& fieldname);
49 // void exportFamily(vector<int*>,MED_EN::medEntityMesh, const string& name);
53 void readSubdomain(const string& meshname, vector<int*>& cellglobal,
54 vector<int*>& faceglobal,
55 vector<int*>& nodeglobal, int idomain);
56 void writeSubdomain(int idomain,int nbdomain, char*filename);
58 void writeElementJoint(medEntityMesh entity ,
64 med_2_3::med_idt fid );
65 void jointSort(int* elems, int nbelems, bool is_first);
69 MESHCollection* m_collection;
71 std::vector <std::string> m_filename;
78 #endif /*MESHCOLLECTIONDRIVER_HXX_*/