Salome HOME
Copyright update 2022
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderCommon.i
index a66fb85dcec8c4c99166ac654659ce0bf1a5c11e..a0368584d4bc57a67e1ca624370634ca6b0d2edd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2017-2022  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
@@ -42,6 +42,8 @@
 #include "MEDLoaderTypemaps.i"
 #include "SauvReader.hxx"
 #include "SauvWriter.hxx"
+#include "MeshFormatReader.hxx"
+#include "MeshFormatWriter.hxx"
 
 using namespace MEDCoupling;
 %}
@@ -120,6 +122,7 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileUMesh::getDirectUndergroundSingleGeoTypeMesh;
 %newobject MEDCoupling::MEDFileUMesh::extractFamilyFieldOnGeoType;
 %newobject MEDCoupling::MEDFileUMesh::extractNumberFieldOnGeoType;
+%newobject MEDCoupling::MEDFileUMesh::computeFetchedNodeIds;
 %newobject MEDCoupling::MEDFileUMesh::zipCoords;
 %newobject MEDCoupling::MEDFileUMesh::deduceNodeSubPartFromCellSubPart;
 %newobject MEDCoupling::MEDFileUMesh::extractPart;
@@ -182,16 +185,27 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileFieldMultiTS::getFieldAtLevelOld;
 %newobject MEDCoupling::MEDFileFieldMultiTS::getUndergroundDataArray;
 %newobject MEDCoupling::MEDFileFieldMultiTS::convertToInt;
-
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::New;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::field;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::LoadSpecificEntities;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::getUndergroundDataArray;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::convertToDouble;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtLevel;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtTopLevel;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldOnMeshAtLevel;
-%newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtLevelOld;
+%newobject MEDCoupling::MEDFileFieldMultiTS::Aggregate;
+
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::New;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::field;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::LoadSpecificEntities;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::getUndergroundDataArray;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::convertToDouble;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::getFieldAtLevel;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::getFieldAtTopLevel;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::getFieldOnMeshAtLevel;
+%newobject MEDCoupling::MEDFileInt32FieldMultiTS::getFieldAtLevelOld;
+
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::New;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::field;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::LoadSpecificEntities;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::getUndergroundDataArray;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::convertToDouble;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::getFieldAtLevel;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::getFieldAtTopLevel;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::getFieldOnMeshAtLevel;
+%newobject MEDCoupling::MEDFileInt64FieldMultiTS::getFieldAtLevelOld;
 
 %newobject MEDCoupling::MEDFileFloatFieldMultiTS::New;
 %newobject MEDCoupling::MEDFileFloatFieldMultiTS::field;
@@ -216,15 +230,25 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileField1TS::getFieldAtLevelOld;
 %newobject MEDCoupling::MEDFileField1TS::getUndergroundDataArray;
 %newobject MEDCoupling::MEDFileField1TS::convertToInt;
-
-%newobject MEDCoupling::MEDFileIntField1TS::New;
-%newobject MEDCoupling::MEDFileIntField1TS::field;
-%newobject MEDCoupling::MEDFileIntField1TS::getFieldAtLevel;
-%newobject MEDCoupling::MEDFileIntField1TS::getFieldAtTopLevel;
-%newobject MEDCoupling::MEDFileIntField1TS::getFieldOnMeshAtLevel;
-%newobject MEDCoupling::MEDFileIntField1TS::getFieldAtLevelOld;
-%newobject MEDCoupling::MEDFileIntField1TS::getUndergroundDataArray;
-%newobject MEDCoupling::MEDFileIntField1TS::convertToDouble;
+%newobject MEDCoupling::MEDFileField1TS::convertToInt64;
+
+%newobject MEDCoupling::MEDFileInt32Field1TS::New;
+%newobject MEDCoupling::MEDFileInt32Field1TS::field;
+%newobject MEDCoupling::MEDFileInt32Field1TS::getFieldAtLevel;
+%newobject MEDCoupling::MEDFileInt32Field1TS::getFieldAtTopLevel;
+%newobject MEDCoupling::MEDFileInt32Field1TS::getFieldOnMeshAtLevel;
+%newobject MEDCoupling::MEDFileInt32Field1TS::getFieldAtLevelOld;
+%newobject MEDCoupling::MEDFileInt32Field1TS::getUndergroundDataArray;
+%newobject MEDCoupling::MEDFileInt32Field1TS::convertToDouble;
+
+%newobject MEDCoupling::MEDFileInt64Field1TS::New;
+%newobject MEDCoupling::MEDFileInt64Field1TS::field;
+%newobject MEDCoupling::MEDFileInt64Field1TS::getFieldAtLevel;
+%newobject MEDCoupling::MEDFileInt64Field1TS::getFieldAtTopLevel;
+%newobject MEDCoupling::MEDFileInt64Field1TS::getFieldOnMeshAtLevel;
+%newobject MEDCoupling::MEDFileInt64Field1TS::getFieldAtLevelOld;
+%newobject MEDCoupling::MEDFileInt64Field1TS::getUndergroundDataArray;
+%newobject MEDCoupling::MEDFileInt64Field1TS::convertToDouble;
 
 %newobject MEDCoupling::MEDFileFloatField1TS::New;
 %newobject MEDCoupling::MEDFileFloatField1TS::field;
@@ -289,6 +313,7 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::SauvReader::New;
 %newobject MEDCoupling::SauvReader::loadInMEDFileDS;
 
+
 %newobject MEDCoupling::MEDFileMeshStruct::New;
 %newobject MEDCoupling::MEDMeshMultiLev::prepare;
 %newobject MEDCoupling::MEDMeshMultiLev::buildDataArray;
@@ -296,6 +321,10 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileFastCellSupportComparator::New;
 %newobject MEDCoupling::MEDFileFastCellSupportComparator::buildFromScratchDataSetSupport;
 
+%newobject MEDCoupling::MeshFormatReader::loadInMEDFileDS;
+%newobject MEDCoupling::MeshFormatReader::MeshFormatReader;
+%newobject MEDCoupling::MeshFormatWriter::MeshFormatWriter;
+
 %feature("unref") MEDFileMesh "$this->decrRef();"
 %feature("unref") MEDFileUMesh "$this->decrRef();"
 %feature("unref") MEDFileCMesh "$this->decrRef();"
@@ -304,11 +333,13 @@ using namespace MEDCoupling;
 %feature("unref") MEDFileFieldLoc "$this->decrRef();"
 %feature("unref") MEDFileAnyTypeField1TS "$this->decrRef();"
 %feature("unref") MEDFileField1TS "$this->decrRef();"
-%feature("unref") MEDFileIntField1TS "$this->decrRef();"
+%feature("unref") MEDFileInt32Field1TS "$this->decrRef();"
+%feature("unref") MEDFileInt64Field1TS "$this->decrRef();"
 %feature("unref") MEDFileFloatField1TS "$this->decrRef();"
 %feature("unref") MEDFileAnyTypeFieldMultiTS "$this->decrRef();"
 %feature("unref") MEDFileFieldMultiTS "$this->decrRef();"
-%feature("unref") MEDFileIntFieldMultiTS "$this->decrRef();"
+%feature("unref") MEDFileInt32FieldMultiTS "$this->decrRef();"
+%feature("unref") MEDFileInt64FieldMultiTS "$this->decrRef();"
 %feature("unref") MEDFileFloatFieldMultiTS "$this->decrRef();"
 %feature("unref") MEDFileMeshSupports "$this->decrRef();"
 %feature("unref") MEDFileStructureElements "$this->decrRef();"
@@ -423,7 +454,7 @@ namespace MEDCoupling
     PyTuple_SetItem(ret,1,b.retn());
     return ret.retn();
   }
-  
+
   MEDCoupling::MEDCouplingField *ReadFieldSwig(const std::string& fileName)
   {
     MCAuto<MEDCoupling::MEDCouplingField> ret(MEDCoupling::ReadField(fileName));
@@ -435,13 +466,13 @@ namespace MEDCoupling
     MCAuto<MEDCoupling::MEDCouplingField> ret(MEDCoupling::ReadField(fileName,fieldName));
     return ret.retn();
   }
-  
+
   MEDCoupling::MEDCouplingField *ReadFieldSwig(const std::string& fileName, const std::string& fieldName, int iteration, int order)
   {
     MCAuto<MEDCoupling::MEDCouplingField> ret(MEDCoupling::ReadField(fileName,fieldName,iteration,order));
     return ret.retn();
   }
-  
+
   MEDCoupling::MEDCouplingField *ReadFieldSwig(MEDCoupling::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order)
   {
     MCAuto<MEDCoupling::MEDCouplingField> ret(MEDCoupling::ReadField(type,fileName,meshName,meshDimRelToMax,fieldName,iteration,order));
@@ -462,7 +493,7 @@ namespace MEDCoupling
       }
     return ret;
   }
-  
+
   PyObject *GetAllFieldIterationsSwig(const std::string& fileName, const std::string& fieldName)
     {
       std::vector< std::pair< std::pair<int,int>, double> > res=MEDCoupling::GetAllFieldIterations(fileName,fieldName);
@@ -478,7 +509,7 @@ namespace MEDCoupling
         }
       return ret;
     }
-  
+
   PyObject *GetCellFieldIterationsSwig(const std::string& fileName, const std::string& meshName, const std::string& fieldName)
     {
       std::vector< std::pair<int,int> > res=MEDCoupling::GetCellFieldIterations(fileName,meshName,fieldName);
@@ -552,7 +583,7 @@ namespace MEDCoupling
       PyTuple_SetItem(ret,3,SWIG_From_long(numberOfNodes));
       return ret;
     }
-  
+
   PyObject *ReadFieldsOnSameMeshSwig(MEDCoupling::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax,
                                      const std::string& fieldName, PyObject *liIts)
     {
@@ -560,28 +591,28 @@ namespace MEDCoupling
       std::vector<MEDCoupling::MEDCouplingFieldDouble *> res=MEDCoupling::ReadFieldsOnSameMesh(type,fileName,meshName,meshDimRelToMax,fieldName,its);
       return convertFieldDoubleVecToPy(res);
     }
-  
+
   void WriteUMeshesPartitionSwig(const std::string& fileName, const std::string& meshName, PyObject *li, bool writeFromScratch)
   {
     std::vector<const MEDCoupling::MEDCouplingUMesh *> v;
     convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",v);
     MEDCoupling::WriteUMeshesPartition(fileName,meshName,v,writeFromScratch);
   }
-  
+
   void WriteUMeshesPartitionDepSwig(const std::string& fileName, const std::string& meshName, PyObject *li, bool writeFromScratch)
   {
     std::vector<const MEDCoupling::MEDCouplingUMesh *> v;
     convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",v);
     MEDCoupling::WriteUMeshesPartitionDep(fileName,meshName,v,writeFromScratch);
   }
-  
+
   void WriteUMeshesSwig(const std::string& fileName, PyObject *li, bool writeFromScratch)
   {
     std::vector<const MEDCoupling::MEDCouplingUMesh *> v;
     convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",v);
     MEDCoupling::WriteUMeshes(fileName,v,writeFromScratch);
   }
-  
+
   PyObject *GetTypesOfFieldSwig(const std::string& fileName, const std::string& meshName, const std::string& fieldName)
     {
       std::vector< MEDCoupling::TypeOfField > v=MEDCoupling::GetTypesOfField(fileName,meshName,fieldName);
@@ -591,7 +622,7 @@ namespace MEDCoupling
         PyList_SetItem(ret,i,PyInt_FromLong((int)v[i]));
       return ret;
     }
-  
+
   MEDCoupling::MEDCouplingUMesh *ReadUMeshFromGroupsSwig(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, PyObject *li)
     {
       std::vector<std::string> grps;
@@ -618,12 +649,13 @@ namespace MEDCoupling
     int getZipConnPolicy();
     void setZipConnPolicy(int newVal);
   };
-  
+
   class MEDFileWritableStandAlone : public MEDFileWritable
   {
   public:
     void write(const std::string& fileName, int mode) const;
     void write33(const std::string& fileName, int mode) const;
+    void write30(const std::string& fileName, int mode) const;
     %extend
        {
          DataArrayByte *serialize() const
@@ -643,12 +675,14 @@ namespace MEDCoupling
          }
        }
   };
-  
+
   class MEDFileMeshReadSelector
   {
   public:
     MEDFileMeshReadSelector();
     MEDFileMeshReadSelector(unsigned int code);
+    mcIdType getNumberOfCoordsLoadSessions();
+    void setNumberOfCoordsLoadSessions(mcIdType newNbOfCoordsLoadSessions);
     unsigned int getCode() const;
     void setCode(unsigned int newCode);
     bool isCellFamilyFieldReading() const;
@@ -673,7 +707,7 @@ namespace MEDCoupling
         self->reprAll(oss);
         return oss.str();
       }
-      
+
       std::string __repr__() const
       {
         std::ostringstream oss; oss << "MEDFileMeshReadSelector C++ instance at " << self << " (with code=" << self->getCode() << ").";
@@ -726,7 +760,7 @@ namespace MEDCoupling
       {
         return self->simpleRepr();
       }
-      
+
       DataArrayIdType *getCorrespondence() const
       {
         const DataArrayIdType *ret(self->getCorrespondence());
@@ -750,6 +784,7 @@ namespace MEDCoupling
     void setIteration(int it);
     int getIteration() const;
     void pushCorrespondence(MEDFileJointCorrespondence* correspondence);
+    void clearCorrespondences();
     int getNumberOfCorrespondences() const;
     void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName) const;
     std::string simpleRepr() const;
@@ -769,7 +804,7 @@ namespace MEDCoupling
       {
         return self->simpleRepr();
       }
-      
+
       MEDFileJointCorrespondence *getCorrespondenceAtPos(int i) const
       {
         MEDFileJointCorrespondence *ret(self->getCorrespondenceAtPos(i));
@@ -814,7 +849,7 @@ namespace MEDCoupling
       {
         return MEDFileJoint::New();
       }
-      
+
       MEDFileJoint(const std::string& fileName, const std::string& mName, int num)
       {
         return MEDFileJoint::New(fileName,mName,num);
@@ -829,7 +864,7 @@ namespace MEDCoupling
       {
         return self->simpleRepr();
       }
-      
+
       MEDFileJointOneStep *getStepAtPos(int i) const
       {
         MEDFileJointOneStep *ret(self->getStepAtPos(i));
@@ -866,7 +901,7 @@ namespace MEDCoupling
       {
         return MEDFileJoints::New();
       }
-      
+
       MEDFileJoints(const std::string& fileName, const std::string& meshName)
       {
         return MEDFileJoints::New(fileName,meshName);
@@ -915,7 +950,7 @@ namespace MEDCoupling
       }
     }
   };
-  
+
   class MEDFileEquivalenceBase : public RefCountObject, public MEDFileWritableStandAlone
   {
   private:
@@ -962,7 +997,7 @@ namespace MEDCoupling
         if(ret) ret->incrRef();
         return ret;
       }
-      
+
       PyObject *getTypes() const
       {
         std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getTypes());
@@ -1000,14 +1035,14 @@ namespace MEDCoupling
         if(ret) ret->incrRef();
         return ret;
       }
-      
+
       MEDFileEquivalenceCell *getCell()
       {
         MEDFileEquivalenceCell *ret(self->getCell());
         if(ret) ret->incrRef();
         return ret;
       }
-      
+
       MEDFileEquivalenceNode *getNode()
       {
         MEDFileEquivalenceNode *ret(self->getNode());
@@ -1016,7 +1051,7 @@ namespace MEDCoupling
       }
     }
   };
-  
+
   class MEDFileEquivalences : public RefCountObject, public MEDFileWritableStandAlone
   {
   private:
@@ -1201,6 +1236,12 @@ namespace MEDCoupling
            return self->getMeshAtLevel(meshDimRelToMaxExt,false);
          }
 
+         static INTERP_KERNEL::NormalizedCellType ConvertFromMEDFileGeoType(int geoType)
+         {
+            med_geometry_type geoType2((med_geometry_type) geoType);
+            return MEDFileMesh::ConvertFromMEDFileGeoType(geoType2);
+         }
+
          PyObject *getTime()
          {
            int tmp1,tmp2;
@@ -1230,7 +1271,7 @@ namespace MEDCoupling
            convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType *>(li,SWIGTITraits<mcIdType>::TI,"DataArrayInt",grps);
            self->setGroupsAtLevel(meshDimRelToMaxExt,grps,renum);
          }
-         
+
          PyObject *areFamsEqual(const MEDFileMesh *other) const
          {
            std::string what;
@@ -1306,7 +1347,7 @@ namespace MEDCoupling
              tmp->incrRef();
            return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
          }
-         
+
          PyObject *getNameFieldAtLevel(int meshDimRelToMaxExt) const
          {
            const DataArrayAsciiChar *tmp=self->getNameFieldAtLevel(meshDimRelToMaxExt);
@@ -1324,7 +1365,7 @@ namespace MEDCoupling
            PyTuple_SetItem(ret,1,SWIG_From_bool(ret1));
            return ret;
          }
-         
+
          PyObject *unPolyze()
          {
            DataArrayIdType *ret3=0;
@@ -1400,6 +1441,7 @@ namespace MEDCoupling
     MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const;
     MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const;
     void forceComputationOfParts() const;
+    void computeRevNum() const;
     //
     void setFamilyNameAttachedOnId(int id, const std::string& newFamName);
     void setCoords(DataArrayDouble *coords);
@@ -1409,6 +1451,7 @@ namespace MEDCoupling
     void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m);
     void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false);
     void optimizeFamilies();
+    DataArrayIdType *computeFetchedNodeIds() const;
     DataArrayIdType *zipCoords();
     DataArrayIdType *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
     DataArrayIdType *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
@@ -1417,7 +1460,7 @@ namespace MEDCoupling
     MEDFileUMesh *quadraticToLinear(double eps=1e-12) const;
     MEDCouplingMappedExtrudedMesh *convertToExtrudedMesh() const;
     %extend
-       { 
+       {
          MEDFileUMesh(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
          {
            return MEDFileUMesh::New(fileName,mName,dt,it,mrs);
@@ -1454,6 +1497,22 @@ namespace MEDCoupling
            return MEDFileUMesh::LoadPartOf(fileName,mName,typesCpp2,slicPerTyp,dt,it,mrs);
          }
 
+         static PyObject *LoadPartCoords(const std::string& fileName, const std::string& mName, int dt, int it, const std::vector<std::string>& infosOnComp, mcIdType startNodeId, mcIdType stopNodeId)
+         {
+           MCAuto<DataArrayDouble> coords;
+           MCAuto<PartDefinition> partCoords;
+           MCAuto<DataArrayIdType> famCoords,numCoords;
+           MCAuto<DataArrayAsciiChar> nameCoord;
+           MEDFileUMesh::LoadPartCoords(fileName,mName,dt,it,infosOnComp,startNodeId,stopNodeId,coords,partCoords,famCoords,numCoords,nameCoord);
+           PyObject *ret(PyTuple_New(5));
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(coords.retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,convertPartDefinition(partCoords.retn(),SWIG_POINTER_OWN | 0));
+           PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(famCoords.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(numCoords.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(nameCoord.retn()),SWIGTYPE_p_MEDCoupling__DataArrayAsciiChar, SWIG_POINTER_OWN | 0 ));
+           return ret;
+         }
+
          PyObject *__getstate__()
          {
            std::vector<double> a0;
@@ -1581,7 +1640,7 @@ namespace MEDCoupling
            std::vector< std::pair<int,mcIdType> > ret(self->getAllDistributionOfTypes());
            return convertVecPairIntToPy(ret);
          }
-         
+
          DataArrayIdType *deduceNodeSubPartFromCellSubPart(PyObject *extractDef) const
          {
            std::map<int, MCAuto<DataArrayIdType> > extractDefCpp;
@@ -1609,7 +1668,7 @@ namespace MEDCoupling
            convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",ms);
            self->setGroupsFromScratch(meshDimRelToMax,ms,renum);
          }
-         
+
          void setGroupsOnSetMesh(int meshDimRelToMax, PyObject *li, bool renum=false)
          {
            std::vector<const MEDCouplingUMesh *> ms;
@@ -1643,7 +1702,7 @@ namespace MEDCoupling
            PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
-         
+
          MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const
          {
            MEDCoupling1GTUMesh *ret(self->getDirectUndergroundSingleGeoTypeMesh(gt));
@@ -1713,7 +1772,7 @@ namespace MEDCoupling
          {
            return MEDFileCMesh::New(db);
          }
-         
+
          PyObject *getMesh() const
          {
            const MEDCouplingCMesh *tmp=self->getMesh();
@@ -1732,6 +1791,8 @@ namespace MEDCoupling
     static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
     static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     void setMesh(MEDCouplingCurveLinearMesh *m);
+    int getSpaceDimension() const;
+    int getMeshDimension() const;
     %extend
        {
          MEDFileCurveLinearMesh()
@@ -1753,7 +1814,7 @@ namespace MEDCoupling
          {
            return MEDFileCurveLinearMesh::New(db);
          }
-         
+
          PyObject *getMesh() const
          {
            const MEDCouplingCurveLinearMesh *tmp=self->getMesh();
@@ -1775,7 +1836,7 @@ namespace MEDCoupling
     void setOneTimeStep(MEDFileMesh *mesh1TimeStep);
     void cartesianizeMe();
     %extend
-       { 
+       {
          MEDFileMeshMultiTS()
          {
            return MEDFileMeshMultiTS::New();
@@ -1892,7 +1953,7 @@ namespace MEDCoupling
          {
            return self->getNumberOfMeshes();
          }
-         
+
          MEDFileMesh *getMeshAtPos(int i) const
            {
              MEDFileMesh *ret=self->getMeshAtPos(i);
@@ -1987,7 +2048,7 @@ namespace MEDCoupling
            loc->incrRef();
          return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_MEDCoupling__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
        }
-       
+
        PyObject *getLocalization(const std::string& locName) const
        {
          const MEDFileFieldLoc *loc=&self->getLocalization(locName);
@@ -1995,7 +2056,7 @@ namespace MEDCoupling
            loc->incrRef();
          return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_MEDCoupling__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
        }
-       
+
        PyObject *zipPflsNames()
        {
          std::vector< std::pair<std::vector<std::string>, std::string > > ret=self->zipPflsNames();
@@ -2037,7 +2098,7 @@ namespace MEDCoupling
          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
          self->changeLocsRefsNamesGen(v);
        }
-       
+
        void changeLocsNamesInStruct(PyObject *li)
        {
          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
@@ -2131,7 +2192,7 @@ namespace MEDCoupling
       {
         self->setProfileNameOnLeaf(0,typ,locId,newPflName,forceRenameOnGlob);
       }
-      
+
       void setLocNameOnLeaf(INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false)
       {
         self->setLocNameOnLeaf(0,typ,locId,newLocName,forceRenameOnGlob);
@@ -2142,7 +2203,7 @@ namespace MEDCoupling
         std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
         return self->changeMeshNames(modifTab);
       }
-      
+
       PyObject *getTypesOfFieldAvailable() const
       {
         std::vector<TypeOfField> ret=self->getTypesOfFieldAvailable();
@@ -2244,7 +2305,8 @@ namespace MEDCoupling
     static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true);
     static MEDFileField1TS *New(DataArrayByte *db);
     static MEDFileField1TS *New();
-    MEDCoupling::MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const;
+    MEDCoupling::MEDFileInt32Field1TS *convertToInt(bool isDeepCpyGlobs=true) const;
+    MEDCoupling::MEDFileInt64Field1TS *convertToInt64(bool isDeepCpyGlobs=true) const;
     void copyTimeInfoFrom(MEDCouplingFieldDouble *mcf);
     MEDCouplingFieldDouble *field(const MEDFileMesh *mesh) const;
     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
@@ -2264,7 +2326,7 @@ namespace MEDCoupling
          {
            return MEDFileField1TS::New(fileName,loadAll);
          }
-         
+
          MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
          {
            return MEDFileField1TS::New(fileName,fieldName,loadAll);
@@ -2284,7 +2346,7 @@ namespace MEDCoupling
          {
            return MEDFileField1TS::New();
          }
-         
+
          void copyTinyInfoFrom(const MEDCouplingFieldDouble *field)
          {
            const DataArrayDouble *arr=0;
@@ -2292,12 +2354,12 @@ namespace MEDCoupling
              arr=field->getArray();
            self->copyTinyInfoFrom(field,arr);
          }
-         
+
          std::string __str__() const
          {
            return self->simpleRepr();
          }
-         
+
          PyObject *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) const
          {
            return MEDFileField1TS_getFieldWithProfile<double>(self,type,meshDimRelToMax,mesh);
@@ -2352,51 +2414,51 @@ namespace MEDCoupling
        }
   };
 
-  class MEDFileIntField1TS : public MEDFileAnyTypeField1TS
+  class MEDFileInt32Field1TS : public MEDFileAnyTypeField1TS
   {
   public:
-    static MEDFileIntField1TS *New();
-    static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true);
-    static MEDFileIntField1TS *New(DataArrayByte *db);
-    static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
-    static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+    static MEDFileInt32Field1TS *New();
+    static MEDFileInt32Field1TS *New(const std::string& fileName, bool loadAll=true);
+    static MEDFileInt32Field1TS *New(DataArrayByte *db);
+    static MEDFileInt32Field1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+    static MEDFileInt32Field1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
     MEDCoupling::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
     //
-    void setFieldNoProfileSBT(const MEDCouplingFieldInt *field);
-    void setFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
-    void setFieldProfileFlatly(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
-    void copyTimeInfoFrom(MEDCouplingFieldInt *mcf);
-    MEDCouplingFieldInt *field(const MEDFileMesh *mesh) const;
-    MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
+    void setFieldNoProfileSBT(const MEDCouplingFieldInt32 *field);
+    void setFieldProfile(const MEDCouplingFieldInt32 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void setFieldProfileFlatly(const MEDCouplingFieldInt32 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void copyTimeInfoFrom(MEDCouplingFieldInt32 *mcf);
+    MEDCouplingFieldInt32 *field(const MEDFileMesh *mesh) const;
+    MEDCouplingFieldInt32 *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
     %extend
     {
-      MEDFileIntField1TS()
+      MEDFileInt32Field1TS()
       {
-        return MEDFileIntField1TS::New();
+        return MEDFileInt32Field1TS::New();
       }
 
-      MEDFileIntField1TS(const std::string& fileName, bool loadAll=true)
+      MEDFileInt32Field1TS(const std::string& fileName, bool loadAll=true)
       {
-        return MEDFileIntField1TS::New(fileName,loadAll);
+        return MEDFileInt32Field1TS::New(fileName,loadAll);
       }
 
-      MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
+      MEDFileInt32Field1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
       {
-        return MEDFileIntField1TS::New(fileName,fieldName,loadAll);
+        return MEDFileInt32Field1TS::New(fileName,fieldName,loadAll);
       }
 
-      MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true)
+      MEDFileInt32Field1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true)
       {
-        return MEDFileIntField1TS::New(fileName,fieldName,iteration,order,loadAll);
+        return MEDFileInt32Field1TS::New(fileName,fieldName,iteration,order,loadAll);
       }
 
-      MEDFileIntField1TS(DataArrayByte *db)
+      MEDFileInt32Field1TS(DataArrayByte *db)
       {
-        return MEDFileIntField1TS::New(db);
+        return MEDFileInt32Field1TS::New(db);
       }
 
       std::string __str__() const
@@ -2406,9 +2468,9 @@ namespace MEDCoupling
 
       PyObject *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) const
       {
-         return MEDFileField1TS_getFieldWithProfile<int>(self,type,meshDimRelToMax,mesh);
+         return MEDFileField1TS_getFieldWithProfile<Int32>(self,type,meshDimRelToMax,mesh);
       }
-      
+
       DataArrayInt32 *getUndergroundDataArray() const
       {
         DataArrayInt32 *ret=self->getUndergroundDataArray();
@@ -2419,7 +2481,79 @@ namespace MEDCoupling
 
       PyObject *getUndergroundDataArrayExt() const
       {
-        return MEDFileField1TS_getUndergroundDataArrayExt<int>(self);
+        return MEDFileField1TS_getUndergroundDataArrayExt<Int32>(self);
+      }
+    }
+  };
+
+  class MEDFileInt64Field1TS : public MEDFileAnyTypeField1TS
+  {
+  public:
+    static MEDFileInt64Field1TS *New();
+    static MEDFileInt64Field1TS *New(const std::string& fileName, bool loadAll=true);
+    static MEDFileInt64Field1TS *New(DataArrayByte *db);
+    static MEDFileInt64Field1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+    static MEDFileInt64Field1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+    MEDCoupling::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
+    //
+    void setFieldNoProfileSBT(const MEDCouplingFieldInt64 *field);
+    void setFieldProfile(const MEDCouplingFieldInt64 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void setFieldProfileFlatly(const MEDCouplingFieldInt64 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void copyTimeInfoFrom(MEDCouplingFieldInt64 *mcf);
+    MEDCouplingFieldInt64 *field(const MEDFileMesh *mesh) const;
+    MEDCouplingFieldInt64 *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
+    %extend
+    {
+      MEDFileInt64Field1TS()
+      {
+        return MEDFileInt64Field1TS::New();
+      }
+
+      MEDFileInt64Field1TS(const std::string& fileName, bool loadAll=true)
+      {
+        return MEDFileInt64Field1TS::New(fileName,loadAll);
+      }
+
+      MEDFileInt64Field1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
+      {
+        return MEDFileInt64Field1TS::New(fileName,fieldName,loadAll);
+      }
+
+      MEDFileInt64Field1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true)
+      {
+        return MEDFileInt64Field1TS::New(fileName,fieldName,iteration,order,loadAll);
+      }
+
+      MEDFileInt64Field1TS(DataArrayByte *db)
+      {
+        return MEDFileInt64Field1TS::New(db);
+      }
+
+      std::string __str__() const
+      {
+        return self->simpleRepr();
+      }
+
+      PyObject *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) const
+      {
+         return MEDFileField1TS_getFieldWithProfile<Int64>(self,type,meshDimRelToMax,mesh);
+      }
+
+      DataArrayInt64 *getUndergroundDataArray() const
+      {
+        DataArrayInt64 *ret=self->getUndergroundDataArray();
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+
+      PyObject *getUndergroundDataArrayExt() const
+      {
+        return MEDFileField1TS_getUndergroundDataArrayExt<Int64>(self);
       }
     }
   };
@@ -2480,7 +2614,7 @@ namespace MEDCoupling
       {
          return MEDFileField1TS_getFieldWithProfile<float>(self,type,meshDimRelToMax,mesh);
       }
-      
+
       DataArrayFloat *getUndergroundDataArray() const
       {
         DataArrayFloat *ret=self->getUndergroundDataArray();
@@ -2488,7 +2622,7 @@ namespace MEDCoupling
           ret->incrRef();
         return ret;
       }
-      
+
       PyObject *getUndergroundDataArrayExt() const
       {
         return MEDFileField1TS_getUndergroundDataArrayExt<float>(self);
@@ -2586,13 +2720,13 @@ namespace MEDCoupling
         else
           throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::__getitem__ : invalid input params ! expected fmts[int], fmts[int,int] or fmts[double] to request time step !");
       }
-      
+
       PyObject *getIterations() const
       {
         std::vector< std::pair<int,int> > res(self->getIterations());
         return convertVecPairIntToPy(res);
       }
-      
+
       PyObject *getTimeSteps() const
       {
         std::vector<double> ret1;
@@ -2609,7 +2743,7 @@ namespace MEDCoupling
           }
         return ret2;
       }
-      
+
       PyObject *getTypesOfFieldAvailable() const
       {
         std::vector< std::vector<TypeOfField> > ret=self->getTypesOfFieldAvailable();
@@ -2624,7 +2758,7 @@ namespace MEDCoupling
           }
         return ret2;
       }
-      
+
       PyObject *getNonEmptyLevels(int iteration, int order, const std::string& mname=std::string()) const
       {
         std::vector<int> ret1;
@@ -2634,7 +2768,7 @@ namespace MEDCoupling
         PyTuple_SetItem(elt,1,convertIntArrToPyList2(ret1));
         return elt;
       }
-      
+
       PyObject *getFieldSplitedByType(int iteration, int order, const std::string& mname=std::string()) const
       {
         std::vector<INTERP_KERNEL::NormalizedCellType> types;
@@ -2690,7 +2824,7 @@ namespace MEDCoupling
             return ret;
           }
       }
-      
+
       void __delitem__(PyObject *elts)
       {
         if(PySlice_Check(elts))
@@ -2706,7 +2840,7 @@ namespace MEDCoupling
               self->eraseTimeStepIds(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
           }
       }
-      
+
       void eraseTimeStepIds(PyObject *li)
       {
         mcIdType sw;
@@ -2849,7 +2983,7 @@ namespace MEDCoupling
           }
         return retPy;
       }
-      
+
       static PyObject *MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(PyObject *li, const MEDFileMesh *mesh)
       {
         std::vector<MEDFileAnyTypeFieldMultiTS *> vectFMTS;
@@ -2884,8 +3018,9 @@ namespace MEDCoupling
     }
   };
 
-  class MEDFileIntFieldMultiTS;
-  
+  class MEDFileInt32FieldMultiTS;
+  class MEDFileInt64FieldMultiTS;
+
   class MEDFileFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
   {
   public:
@@ -2903,9 +3038,20 @@ namespace MEDCoupling
     //
     void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
     void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
-    MEDFileIntFieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const;
+    MEDFileInt32FieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const;
     %extend
        {
+         static MEDFileAnyTypeFieldMultiTS *Aggregate(PyObject *fmtssPy, PyObject *dtsPy)
+         {
+            std::vector<const MEDFileAnyTypeFieldMultiTS *> fmtss;
+            convertFromPyObjVectorOfObj<const MEDFileAnyTypeFieldMultiTS *>(fmtssPy,SWIGTYPE_p_MEDCoupling__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",fmtss);
+            std::vector< std::vector< std::pair<mcIdType,mcIdType> > > dts2;
+            convertPyToVectorVectorPairInt(dtsPy,dts2);
+            std::vector< std::vector< std::pair<int,mcIdType> > > dts(MEDVectorVectorMIIterator(0,dts2),MEDVectorVectorMIIterator(dts2.size(),dts2));
+            MCAuto<MEDFileAnyTypeFieldMultiTS> ret = MEDFileFieldMultiTS::Aggregate(fmtss,dts);
+            return ret.retn();
+         }
+
          MEDFileFieldMultiTS()
          {
            return MEDFileFieldMultiTS::New();
@@ -2920,7 +3066,7 @@ namespace MEDCoupling
          {
            return MEDFileFieldMultiTS::New(fileName,fieldName,loadAll);
          }
-         
+
          MEDFileFieldMultiTS(DataArrayByte *db)
          {
            return MEDFileFieldMultiTS::New(db);
@@ -2938,7 +3084,7 @@ namespace MEDCoupling
              }
            return MEDFileFieldMultiTS::LoadSpecificEntities(fileName,fieldName,entitiesCpp,loadAll);
          }
-         
+
          std::string __str__() const
          {
            return self->simpleRepr();
@@ -2994,7 +3140,7 @@ namespace MEDCoupling
              ret->incrRef();
            return ret;
          }
-         
+
          PyObject *getUndergroundDataArrayExt(int iteration, int order) const
          {
            std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > > elt1Cpp;
@@ -3043,50 +3189,50 @@ namespace MEDCoupling
     }
   };
 
-  class MEDFileIntFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
+  class MEDFileInt32FieldMultiTS : public MEDFileAnyTypeFieldMultiTS
   {
   public:
-    static MEDFileIntFieldMultiTS *New();
-    static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
-    static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
-    static MEDFileIntFieldMultiTS *New(DataArrayByte *db);
+    static MEDFileInt32FieldMultiTS *New();
+    static MEDFileInt32FieldMultiTS *New(const std::string& fileName, bool loadAll=true);
+    static MEDFileInt32FieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+    static MEDFileInt32FieldMultiTS *New(DataArrayByte *db);
     //
-    void appendFieldNoProfileSBT(const MEDCouplingFieldInt *field);
-    void appendFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void appendFieldNoProfileSBT(const MEDCouplingFieldInt32 *field);
+    void appendFieldProfile(const MEDCouplingFieldInt32 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     MEDCoupling::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
-    MEDCouplingFieldInt *field(int iteration, int order, const MEDFileMesh *mesh) const;
-    MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
-    MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
+    MEDCouplingFieldInt32 *field(int iteration, int order, const MEDFileMesh *mesh) const;
+    MEDCouplingFieldInt32 *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt32 *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
     %extend
     {
-      MEDFileIntFieldMultiTS()
+      MEDFileInt32FieldMultiTS()
       {
-        return MEDFileIntFieldMultiTS::New();
+        return MEDFileInt32FieldMultiTS::New();
       }
-      
-      MEDFileIntFieldMultiTS(const std::string& fileName, bool loadAll=true)
+
+      MEDFileInt32FieldMultiTS(const std::string& fileName, bool loadAll=true)
       {
-        return MEDFileIntFieldMultiTS::New(fileName,loadAll);
+        return MEDFileInt32FieldMultiTS::New(fileName,loadAll);
       }
-      
-      MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
+
+      MEDFileInt32FieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
       {
-        return MEDFileIntFieldMultiTS::New(fileName,fieldName,loadAll);
+        return MEDFileInt32FieldMultiTS::New(fileName,fieldName,loadAll);
       }
 
-      MEDFileIntFieldMultiTS(DataArrayByte *db)
+      MEDFileInt32FieldMultiTS(DataArrayByte *db)
       {
-        return MEDFileIntFieldMultiTS::New(db);
+        return MEDFileInt32FieldMultiTS::New(db);
       }
-      
-      static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
+
+      static MEDFileInt32FieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
       {
         std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
         std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > entitiesCpp(convertVecPairIntToVecPairTOFCT(tmp));
-        return MEDFileIntFieldMultiTS::LoadSpecificEntities(fileName,fieldName,entitiesCpp,loadAll);
+        return MEDFileInt32FieldMultiTS::LoadSpecificEntities(fileName,fieldName,entitiesCpp,loadAll);
       }
 
       std::string __str__() const
@@ -3099,7 +3245,7 @@ namespace MEDCoupling
          DataArrayIdType *ret1=0;
          DataArrayInt32 *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
          PyObject *ret=PyTuple_New(2);
-         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<int>::TI, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<Int32>::TI, SWIG_POINTER_OWN | 0 ));
          PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
          return ret;
       }
@@ -3114,6 +3260,77 @@ namespace MEDCoupling
     }
   };
 
+  class MEDFileInt64FieldMultiTS : public MEDFileAnyTypeFieldMultiTS
+  {
+  public:
+    static MEDFileInt64FieldMultiTS *New();
+    static MEDFileInt64FieldMultiTS *New(const std::string& fileName, bool loadAll=true);
+    static MEDFileInt64FieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+    static MEDFileInt64FieldMultiTS *New(DataArrayByte *db);
+    //
+    void appendFieldNoProfileSBT(const MEDCouplingFieldInt64 *field);
+    void appendFieldProfile(const MEDCouplingFieldInt64 *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    MEDCoupling::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
+    MEDCouplingFieldInt64 *field(int iteration, int order, const MEDFileMesh *mesh) const;
+    MEDCouplingFieldInt64 *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
+    MEDCouplingFieldInt64 *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
+    %extend
+    {
+      MEDFileInt64FieldMultiTS()
+      {
+        return MEDFileInt64FieldMultiTS::New();
+      }
+
+      MEDFileInt64FieldMultiTS(const std::string& fileName, bool loadAll=true)
+      {
+        return MEDFileInt64FieldMultiTS::New(fileName,loadAll);
+      }
+
+      MEDFileInt64FieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
+      {
+        return MEDFileInt64FieldMultiTS::New(fileName,fieldName,loadAll);
+      }
+
+      MEDFileInt64FieldMultiTS(DataArrayByte *db)
+      {
+        return MEDFileInt64FieldMultiTS::New(db);
+      }
+
+      static MEDFileInt64FieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
+      {
+        std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
+        std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > entitiesCpp(convertVecPairIntToVecPairTOFCT(tmp));
+        return MEDFileInt64FieldMultiTS::LoadSpecificEntities(fileName,fieldName,entitiesCpp,loadAll);
+      }
+
+      std::string __str__() const
+      {
+        return self->simpleRepr();
+      }
+
+      PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const
+      {
+         DataArrayIdType *ret1=0;
+         DataArrayInt64 *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
+         PyObject *ret=PyTuple_New(2);
+         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<Int64>::TI, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+         return ret;
+      }
+
+      DataArrayInt64 *getUndergroundDataArray(int iteration, int order) const
+      {
+        DataArrayInt64 *ret=self->getUndergroundDataArray(iteration,order);
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+    }
+  };
+
   class MEDFileFloatFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
   {
   public:
@@ -3137,12 +3354,12 @@ namespace MEDCoupling
       {
         return MEDFileFloatFieldMultiTS::New();
       }
-      
+
       MEDFileFloatFieldMultiTS(const std::string& fileName, bool loadAll=true)
       {
         return MEDFileFloatFieldMultiTS::New(fileName,loadAll);
       }
-      
+
       MEDFileFloatFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true)
       {
         return MEDFileFloatFieldMultiTS::New(fileName,fieldName,loadAll);
@@ -3152,7 +3369,7 @@ namespace MEDCoupling
       {
         return MEDFileFloatFieldMultiTS::New(db);
       }
-      
+
       static MEDFileFloatFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
       {
         std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
@@ -3184,7 +3401,7 @@ namespace MEDCoupling
       }
     }
   };
-  
+
   class MEDFileMeshSupports : public RefCountObject, public MEDFileWritableStandAlone
   {
   public:
@@ -3202,7 +3419,7 @@ namespace MEDCoupling
          }
        }
   };
+
   class MEDFileStructureElements : public RefCountObject, public MEDFileWritableStandAlone
   {
   public:
@@ -3266,12 +3483,12 @@ namespace MEDCoupling
          {
            return MEDFileFields::NewAdv(fileName,loadAll,entities);
          }
-         
+
          std::string __str__() const
          {
            return self->simpleRepr();
          }
-         
+
          MEDFileFields *partOfThisOnStructureElements() const
          {
            MCAuto<MEDFileFields> ret(self->partOfThisOnStructureElements());
@@ -3283,7 +3500,7 @@ namespace MEDCoupling
            MCAuto<MEDFileFields> ret(self->partOfThisLyingOnSpecifiedMeshSEName(meshName,seName));
            return ret.retn();
          }
-         
+
          static MEDFileFields *LoadSpecificEntities(const std::string& fileName, PyObject *entities, bool loadAll=true)
          {
            std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
@@ -3335,7 +3552,7 @@ namespace MEDCoupling
            std::vector< std::pair<int,int> > ts=convertTimePairIdsFromPy(timeSteps);
            return self->partOfThisNotLyingOnSpecifiedTimeSteps(ts);
          }
-         
+
          PyObject *__getitem__(PyObject *obj)
          {
            if(obj && PyList_Check(obj))
@@ -3369,7 +3586,7 @@ namespace MEDCoupling
          {
            return self->iterator();
          }
-         
+
          bool changeMeshNames(PyObject *li)
          {
            std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
@@ -3387,7 +3604,7 @@ namespace MEDCoupling
              }
            return self->getPosFromFieldName(convertPyObjectToStr(elt0,msg));
          }
-         
+
          std::vector<int> getPosOfFields(PyObject *elts) const
          {
            if(PyList_Check(elts))
@@ -3415,7 +3632,7 @@ namespace MEDCoupling
            convertFromPyObjVectorOfObj<MEDCoupling::MEDFileAnyTypeFieldMultiTS *>(fields,SWIGTYPE_p_MEDCoupling__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",tmp);
            self->pushFields(tmp);
          }
-         
+
          void __delitem__(PyObject *elts)
          {
            if(elts && PySlice_Check(elts))
@@ -3502,7 +3719,7 @@ namespace MEDCoupling
       {
         return MEDFileParameterDouble1TS::New();
       }
-      
+
       MEDFileParameterDouble1TS(const std::string& fileName)
       {
         return MEDFileParameterDouble1TS::New(fileName);
@@ -3559,7 +3776,7 @@ namespace MEDCoupling
       {
         return MEDFileParameterMultiTS::New();
       }
-      
+
       MEDFileParameterMultiTS(const std::string& fileName)
       {
         return MEDFileParameterMultiTS::New(fileName);
@@ -3574,7 +3791,7 @@ namespace MEDCoupling
       {
         return self->simpleRepr();
       }
-      
+
       PyObject *isEqual(const MEDFileParameterMultiTS *other, double eps) const
       {
         std::string what;
@@ -3586,7 +3803,7 @@ namespace MEDCoupling
         PyList_SetItem(res,1,PyString_FromString(what.c_str()));
         return res;
       }
-      
+
       void eraseTimeStepIds(PyObject *ids)
       {
         mcIdType sw;
@@ -3688,7 +3905,7 @@ namespace MEDCoupling
         if(!idsToRemove.empty())
           self->eraseTimeStepIds(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
       }
-      
+
       MEDFileParameter1TS *getTimeStepAtPos(int posId) const
       {
         MEDFileParameter1TS *ret=self->getTimeStepAtPos(posId);
@@ -3752,7 +3969,7 @@ namespace MEDCoupling
       {
         return MEDFileParameters::New();
       }
-      
+
       MEDFileParameters(const std::string& fileName)
       {
         return MEDFileParameters::New(fileName);
@@ -3762,7 +3979,7 @@ namespace MEDCoupling
       {
         return MEDFileParameters::New(db);
       }
-      
+
       std::string __str__() const
       {
         return self->simpleRepr();
@@ -3788,7 +4005,7 @@ namespace MEDCoupling
       {
         return self->getNumberOfParams();
       }
-      
+
       MEDFileParameterMultiTS *getParamAtPos(int i) const
       {
         MEDFileParameterMultiTS *ret=self->getParamAtPos(i);
@@ -3804,7 +4021,7 @@ namespace MEDCoupling
           ret->incrRef();
         return ret;
       }
-      
+
       PyObject *isEqual(const MEDFileParameters *other, double eps) const
       {
         std::string what;
@@ -3931,7 +4148,7 @@ namespace MEDCoupling
       }
     }
   };
-  
+
   ///////////////
 
   class MEDFileMeshStruct;
@@ -3949,7 +4166,7 @@ namespace MEDCoupling
   protected:
     ~MEDFileMeshStruct();
   };
-  
+
   class MEDMeshMultiLev : public RefCountObject
   {
   public:
@@ -3986,7 +4203,7 @@ namespace MEDCoupling
         PyTuple_SetItem(ret,1,ret1Py);
         return ret;
       }
-      
+
       PyObject *retrieveFamilyIdsOnNodes() const
       {
         DataArrayIdType *famIds(0);
@@ -4133,6 +4350,32 @@ namespace MEDCoupling
       }
     }
   };
+
+  class MeshFormatReader
+  {
+  public:
+    MeshFormatReader(const std::string& meshFileName, const std::vector<std::string>& fieldFileName);
+    MeshFormatReader();
+    MEDFileData* loadInMedFileDS();
+    void setMeshName(const std::string& theMeshName);
+    std::string getMeshName() const;
+    void setFile(const std::string& theFileName);
+    void setFieldFileNames(const std::vector<std::string>& theFieldFileNames);
+    std::vector<std::string> getFieldFileNames() const;
+  };
+  class MeshFormatWriter
+  {
+  public:
+    MeshFormatWriter(const std::string& meshFileName, const std::vector<std::string>& fieldFileNames);
+    MeshFormatWriter();
+    void setMeshFileName(const std::string& meshFileName);
+    std::string getMeshFileName() const;
+    void setFieldFileNames(const std::vector<std::string>& fieldFileNames);
+    std::vector<std::string> getFieldFileNames() const;
+    void setMEDFileDS(MEDCoupling::MEDFileData* mfd);
+    void write();
+  };
+
 }
 
 %pythoncode %{
@@ -4144,4 +4387,12 @@ def exit1TS(self, exctype, exc, tb):
     pass
 MEDFileAnyTypeField1TS.__enter__=enter1TS
 MEDFileAnyTypeField1TS.__exit__=exit1TS
+MEDFileIntField1TS = MEDFileInt32Field1TS
+MEDFileIntFieldMultiTS = MEDFileInt32FieldMultiTS
+if MEDCouplingUse64BitIDs():
+  MEDFileIDField1TS = MEDFileInt64Field1TS
+  MEDFileIDFieldMultiTS = MEDFileInt64FieldMultiTS
+else:
+  MEDFileIDField1TS = MEDFileInt32Field1TS
+  MEDFileIDFieldMultiTS = MEDFileInt32FieldMultiTS
 %}