Salome HOME
Merge branch 'V8_0_BR'
[tools/medcoupling.git] / src / MEDPartitioner / MEDPARTITIONER_MeshCollectionDriver.hxx
index af6a8758a7f7ada18d89d0bc001ecf55ace151aa..c378a34089fa80765f689586bec91360143704fe 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include <vector>
 #include <string>
 
+namespace ParaMEDMEM
+{
+  class DataArrayDouble;
+  class MEDCouplingFieldDouble;
+  class MEDFileData;
+  class MEDFileMesh;
+  class MEDFileUMesh;
+}
+
 namespace MEDPARTITIONER
 {
   class MeshCollection;
@@ -37,12 +46,15 @@ namespace MEDPARTITIONER
     virtual ~MeshCollectionDriver() { }
     virtual int read(const char*, ParaDomainSelector* sel=0) = 0;
     int readSeq(const char*,const char*);
+    ParaMEDMEM::MEDFileData *getMEDFileData();
     virtual void write(const char*, ParaDomainSelector* sel=0) const = 0;
+    void readMEDFileData(const ParaMEDMEM::MEDFileData* filedata);
   protected:
-    void readSubdomain(std::vector<int*>& cellglobal,
-                       std::vector<int*>& faceglobal,
-                       std::vector<int*>& nodeglobal, int idomain);
     void readSubdomain(int idomain);
+    void readData(ParaMEDMEM::MEDFileUMesh* mfm, int idomain) const;
+    void readFileData(std::string file,std::string meshname,int idomain) const;
+    ParaMEDMEM::MEDFileMesh* getMesh(int idomain) const;
+    ParaMEDMEM::MEDCouplingFieldDouble* getField(std::string key, std::string description, ParaMEDMEM::DataArrayDouble* data, ParaMEDMEM::MEDFileMesh* mfm, int idomain) const;
     void writeMedFile(int idomain, const std::string& distfilename) const;
   protected:
     MeshCollection* _collection;