Salome HOME
bos #26616 [CEA][Windows] type long MEDCOUPLING failing test
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingCommon.i
index a79ce8306208a0c04ffe58d7adee8db14cbd86d2..ca7e739462a6ff5de0d77d41ddd2d3af8b1be409 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021  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
@@ -37,7 +37,8 @@
 #include "MEDCoupling1GTUMesh.hxx"
 #include "MEDCouplingField.hxx"
 #include "MEDCouplingFieldDouble.hxx"
-#include "MEDCouplingFieldInt.hxx"
+#include "MEDCouplingFieldInt32.hxx"
+#include "MEDCouplingFieldInt64.hxx"
 #include "MEDCouplingFieldFloat.hxx"
 #include "MEDCouplingFieldTemplate.hxx"
 #include "MEDCouplingGaussLocalization.hxx"
@@ -74,12 +75,21 @@ typedef DataArrayInt32 DataArrayIdType;
 %template(i64vec) std::vector<long>;
 #else
 //typedef std::int64_t mcIdType;
-typedef long int mcIdType;
 typedef DataArrayInt64 DataArrayIdType;
+#ifdef WIN32
+%template(ivec) std::vector<long long>;
+typedef long long mcIdType;
+#else 
 %template(ivec) std::vector<long>;
+typedef long int mcIdType;
+#endif
 %template(i32vec) std::vector<int>;
 #endif
-
+#ifdef WIN32
+typedef long long mcPyPtrType;
+#else
+typedef long mcPyPtrType;
+#endif
 
 ////////////////////
 %typemap(out) MEDCoupling::MEDCouplingMesh*
@@ -265,15 +275,24 @@ typedef DataArrayInt64 DataArrayIdType;
 %newobject MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization;
 %newobject MEDCoupling::MEDCouplingFieldDouble::getValueOnMulti;
 %newobject MEDCoupling::MEDCouplingFieldDouble::computeVectorFieldCyl;
-%newobject MEDCoupling::MEDCouplingFieldInt::New;
-%newobject MEDCoupling::MEDCouplingFieldInt::convertToDblField;
-%newobject MEDCoupling::MEDCouplingFieldInt::getArray;
-%newobject MEDCoupling::MEDCouplingFieldInt::deepCopy;
-%newobject MEDCoupling::MEDCouplingFieldInt::clone;
-%newobject MEDCoupling::MEDCouplingFieldInt::cloneWithMesh;
-%newobject MEDCoupling::MEDCouplingFieldInt::buildSubPart;
-%newobject MEDCoupling::MEDCouplingFieldInt::buildSubPartRange;
-%newobject MEDCoupling::MEDCouplingFieldInt::__getitem__;
+%newobject MEDCoupling::MEDCouplingFieldInt32::New;
+%newobject MEDCoupling::MEDCouplingFieldInt32::convertToDblField;
+%newobject MEDCoupling::MEDCouplingFieldInt32::getArray;
+%newobject MEDCoupling::MEDCouplingFieldInt32::deepCopy;
+%newobject MEDCoupling::MEDCouplingFieldInt32::clone;
+%newobject MEDCoupling::MEDCouplingFieldInt32::cloneWithMesh;
+%newobject MEDCoupling::MEDCouplingFieldInt32::buildSubPart;
+%newobject MEDCoupling::MEDCouplingFieldInt32::buildSubPartRange;
+%newobject MEDCoupling::MEDCouplingFieldInt32::__getitem__;
+%newobject MEDCoupling::MEDCouplingFieldInt64::New;
+%newobject MEDCoupling::MEDCouplingFieldInt64::convertToDblField;
+%newobject MEDCoupling::MEDCouplingFieldInt64::getArray;
+%newobject MEDCoupling::MEDCouplingFieldInt64::deepCopy;
+%newobject MEDCoupling::MEDCouplingFieldInt64::clone;
+%newobject MEDCoupling::MEDCouplingFieldInt64::cloneWithMesh;
+%newobject MEDCoupling::MEDCouplingFieldInt64::buildSubPart;
+%newobject MEDCoupling::MEDCouplingFieldInt64::buildSubPartRange;
+%newobject MEDCoupling::MEDCouplingFieldInt64::__getitem__;
 %newobject MEDCoupling::MEDCouplingFieldFloat::New;
 %newobject MEDCoupling::MEDCouplingFieldFloat::convertToDblField;
 %newobject MEDCoupling::MEDCouplingFieldFloat::getArray;
@@ -294,6 +313,7 @@ typedef DataArrayInt64 DataArrayIdType;
 %newobject MEDCoupling::MEDCouplingMesh::buildPartRange;
 %newobject MEDCoupling::MEDCouplingMesh::giveCellsWithType;
 %newobject MEDCoupling::MEDCouplingMesh::getCoordinatesAndOwner;
+%newobject MEDCoupling::MEDCouplingMesh::computeMeshCenterOfMass;
 %newobject MEDCoupling::MEDCouplingMesh::computeCellCenterOfMass;
 %newobject MEDCoupling::MEDCouplingMesh::computeIsoBarycenterOfNodesPerCell;
 %newobject MEDCoupling::MEDCouplingMesh::buildOrthogonalField;
@@ -461,6 +481,10 @@ typedef DataArrayInt64 DataArrayIdType;
 %newobject MEDCoupling::MEDCouplingSkyLineArray::getSuperIndexArray;
 %newobject MEDCoupling::MEDCouplingSkyLineArray::getIndexArray;
 %newobject MEDCoupling::MEDCouplingSkyLineArray::getValuesArray;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::groupPacks;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::uniqueNotSortedByPack;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::AggregatePacks;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::deepCopy;
 
 %feature("unref") MEDCouplingPointSet "$this->decrRef();"
 %feature("unref") MEDCouplingMesh "$this->decrRef();"
@@ -480,7 +504,8 @@ typedef DataArrayInt64 DataArrayIdType;
 %feature("unref") MEDCouplingFieldDiscretizationKriging "$this->decrRef();"
 %feature("unref") MEDCouplingFieldDouble "$this->decrRef();"
 %feature("unref") MEDCouplingFieldFloat "$this->decrRef();"
-%feature("unref") MEDCouplingFieldInt "$this->decrRef();"
+%feature("unref") MEDCouplingFieldInt32 "$this->decrRef();"
+%feature("unref") MEDCouplingFieldInt64 "$this->decrRef();"
 %feature("unref") MEDCouplingMultiFields "$this->decrRef();"
 %feature("unref") MEDCouplingFieldTemplate "$this->decrRef();"
 %feature("unref") MEDCouplingMultiFields "$this->decrRef();"
@@ -529,25 +554,26 @@ typedef DataArrayInt64 DataArrayIdType;
 {
   PyObject *med2vtk_cell_types()
   {
-    Py_ssize_t sz(sizeof(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER)/sizeof(decltype(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[0])));
+    Py_ssize_t sz(sizeof(MEDCOUPLING2VTKTYPETRADUCER)/sizeof(decltype(MEDCOUPLING2VTKTYPETRADUCER[0])));
     PyObject *ret(PyList_New(sz));
     for(Py_ssize_t i=0;i<sz;i++)
       {
-        PyList_SetItem(ret,i,PyInt_FromLong(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[i]));
+        mcIdType elt = MEDCOUPLING2VTKTYPETRADUCER[i]!=MEDCOUPLING2VTKTYPETRADUCER_NONE ? MEDCOUPLING2VTKTYPETRADUCER[i] : -1;
+        PyList_SetItem(ret,i,PyInt_FromLong(elt));
       }
     return ret;
   }
 
   PyObject *vtk2med_cell_types()
   {
-    Py_ssize_t sz(sizeof(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER)/sizeof(decltype(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[0])));
-    auto maxElt(*std::max_element(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER,MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER+sz));
+    Py_ssize_t sz(sizeof(MEDCOUPLING2VTKTYPETRADUCER)/sizeof(decltype(MEDCOUPLING2VTKTYPETRADUCER[0])));
+    auto maxElt(*std::max_element(MEDCOUPLING2VTKTYPETRADUCER,MEDCOUPLING2VTKTYPETRADUCER+sz,[](unsigned char a, unsigned char b) { if(b==MEDCOUPLING2VTKTYPETRADUCER_NONE) return false; else return a<b; } ));
     auto szOut(maxElt+1);
     std::vector< mcIdType > retCpp(szOut,-1);
     mcIdType id(0);
-    for(const mcIdType *it=MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER;it!=MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER+sz;it++,id++)
+    for(const unsigned char *it=MEDCOUPLING2VTKTYPETRADUCER;it!=MEDCOUPLING2VTKTYPETRADUCER+sz;it++,id++)
       {
-        if(*it!=-1)
+        if(*it!=MEDCOUPLING2VTKTYPETRADUCER_NONE)
           retCpp[*it]=id;
       }
     //
@@ -557,6 +583,15 @@ typedef DataArrayInt64 DataArrayIdType;
       PyList_SetItem(ret,id,PyInt_FromLong(*it));
     return ret;
   }
+
+  PyObject *AllGeometricTypes()
+  {
+    Py_ssize_t sz(MEDCouplingUMesh::N_MEDMEM_ORDER);
+    PyObject *ret(PyList_New(sz));
+    for(Py_ssize_t i=0;i<sz;i++)
+      PyList_SetItem(ret,i,PyInt_FromLong(MEDCouplingUMesh::MEDMEM_ORDER[i]));
+    return ret;
+  }
 }
 
 namespace INTERP_KERNEL
@@ -720,6 +755,12 @@ namespace MEDCoupling
          {
            return self->simpleRepr();
          }
+         
+          DataArrayDouble *computeMeshCenterOfMass() const
+          {
+            MCAuto<DataArrayDouble> ret(self->computeMeshCenterOfMass());
+            return ret.retn();
+          }
 
          PyObject *getTime()
          {
@@ -1281,6 +1322,11 @@ namespace MEDCoupling
     
     void deleteSimplePack(const int i);
     void deleteSimplePacks(const DataArrayIdType* idx);
+
+    MEDCouplingSkyLineArray *groupPacks(const DataArrayIdType *indexedPacks) const;
+    MEDCouplingSkyLineArray *uniqueNotSortedByPack() const;
+
+    MEDCouplingSkyLineArray *deepCopy() const;
     
     %extend 
     {
@@ -1371,6 +1417,13 @@ namespace MEDCoupling
           convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType*>(listePacks,SWIGTITraits<mcIdType>::TI,"DataArrayIdType",packs);
           self->replaceSimplePacks(idx, packs);
         }
+
+      static MEDCouplingSkyLineArray *AggregatePacks(PyObject *sks)
+      {
+        std::vector<const MEDCouplingSkyLineArray *> sksCpp;
+        convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingSkyLineArray*>(sks,SWIGTYPE_p_MEDCoupling__MEDCouplingSkyLineArray,"MEDCouplingSkyLineArray",sksCpp);
+        return MEDCoupling::MEDCouplingSkyLineArray::AggregatePacks(sksCpp);
+      }
         
       void replacePack(const mcIdType superIdx, const mcIdType idx, PyObject *pack)
         {
@@ -1389,6 +1442,16 @@ namespace MEDCoupling
            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          } 
+
+      PyObject *thresholdPerPack(mcIdType threshold) const
+      {
+        MCAuto<MEDCouplingSkyLineArray> left, right;
+        self->thresholdPerPack(threshold,left,right);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(left.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingSkyLineArray, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(right.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingSkyLineArray, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
     }
   };
 }
@@ -1996,6 +2059,7 @@ namespace MEDCoupling
     static MEDCouplingUMesh *New();
     static MEDCouplingUMesh *New(const char *meshName, int meshDim);
     void checkConsistencyLight() const;
+    void checkGeomConsistency(double eps=1e-12) const;
     void setMeshDimension(int meshDim);
     void allocateCells(int nbOfCells=0);
     void finishInsertingCells();
@@ -3699,6 +3763,8 @@ namespace MEDCoupling
   public:
     virtual void checkConsistencyLight() const;
     virtual bool areCompatibleForMerge(const MEDCouplingField *other) const;
+    bool areStrictlyCompatible(const MEDCouplingField *other) const;
+    bool areStrictlyCompatibleForMulDiv(const MEDCouplingField *other) const;
     virtual void copyTinyStringsFrom(const MEDCouplingField *other);
     void setMesh(const MEDCoupling::MEDCouplingMesh *mesh);
     void setName(const char *name);
@@ -3842,7 +3908,8 @@ namespace MEDCoupling
   public:
     static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f);
     static MEDCouplingFieldTemplate *New(const MEDCouplingFieldFloat& f);
-    static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt& f);
+    static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt32& f);
+    static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt64& f);
     static MEDCouplingFieldTemplate *New(TypeOfField type);
     std::string simpleRepr() const;
     std::string advancedRepr() const;
@@ -3860,7 +3927,12 @@ namespace MEDCoupling
            return MEDCouplingFieldTemplate::New(f);
          }
          
-         MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f)
+         MEDCouplingFieldTemplate(const MEDCouplingFieldInt32& f)
+         {
+           return MEDCouplingFieldTemplate::New(f);
+         }
+
+         MEDCouplingFieldTemplate(const MEDCouplingFieldInt64& f)
          {
            return MEDCouplingFieldTemplate::New(f);
          }
@@ -3910,7 +3982,8 @@ namespace MEDCoupling
   %template(MEDCouplingFieldTfloat) MEDCoupling::MEDCouplingFieldT<float>;
   %template(MEDCouplingFieldTint) MEDCoupling::MEDCouplingFieldT<int>;
   
-  class MEDCouplingFieldInt;
+  class MEDCouplingFieldInt32;
+  class MEDCouplingFieldInt64;
   class MEDCouplingFieldFloat;
   
   class MEDCouplingFieldDouble : public MEDCouplingFieldT<double>
@@ -3928,7 +4001,7 @@ namespace MEDCoupling
     std::string simpleRepr() const;
     std::string advancedRepr() const;
     std::string  writeVTK(const std::string& fileName, bool isBinary=true) const;
-    MEDCouplingFieldInt *convertToIntField() const;
+    MEDCouplingFieldInt32 *convertToIntField() const;
     MEDCouplingFieldFloat *convertToFloatField() const;
     MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
     MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const;
@@ -5122,34 +5195,34 @@ namespace MEDCoupling
        }
   };
 
-  class MEDCouplingFieldInt : public MEDCouplingFieldT<int>
+  class MEDCouplingFieldInt32 : public MEDCouplingFieldT<int>
   {
   public:
-    static MEDCouplingFieldInt *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
-    static MEDCouplingFieldInt *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
-    bool isEqual(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const;
-    bool isEqualWithoutConsideringStr(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const;
+    static MEDCouplingFieldInt32 *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+    static MEDCouplingFieldInt32 *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+    bool isEqual(const MEDCouplingFieldInt32 *other, double meshPrec, int valsPrec) const;
+    bool isEqualWithoutConsideringStr(const MEDCouplingFieldInt32 *other, double meshPrec, int valsPrec) const;
     void setTimeUnit(const std::string& unit);
     std::string getTimeUnit() const;
     void setTime(double val, int iteration, int order);
     void setArray(DataArrayInt32 *array);
-    MEDCouplingFieldInt *deepCopy() const;
-    MEDCouplingFieldInt *clone(bool recDeepCpy) const;
-    MEDCouplingFieldInt *cloneWithMesh(bool recDeepCpy) const;
+    MEDCouplingFieldInt32 *deepCopy() const;
+    MEDCouplingFieldInt32 *clone(bool recDeepCpy) const;
+    MEDCouplingFieldInt32 *cloneWithMesh(bool recDeepCpy) const;
     MEDCouplingFieldDouble *convertToDblField() const;
-    MEDCouplingFieldInt *buildSubPartRange(int begin, int end, int step) const;
+    MEDCouplingFieldInt32 *buildSubPartRange(int begin, int end, int step) const;
     %extend {
-      MEDCouplingFieldInt(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
+      MEDCouplingFieldInt32(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
       {
-        return MEDCouplingFieldInt::New(type,td);
+        return MEDCouplingFieldInt32::New(type,td);
       }
 
-      MEDCouplingFieldInt(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
+      MEDCouplingFieldInt32(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
       {
-        return MEDCouplingFieldInt::New(ft,td);
+        return MEDCouplingFieldInt32::New(ft,td);
       }
 
-      PyObject *isEqualIfNotWhy(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const
+      PyObject *isEqualIfNotWhy(const MEDCouplingFieldInt32 *other, double meshPrec, int valsPrec) const
       {
         std::string ret1;
         bool ret0=self->isEqualIfNotWhy(other,meshPrec,valsPrec,ret1);
@@ -5173,12 +5246,12 @@ namespace MEDCoupling
         return oss.str();
       }
 
-      MEDCouplingFieldInt *buildSubPart(PyObject *li) const
+      MEDCouplingFieldInt32 *buildSubPart(PyObject *li) const
       {
         return fieldT_buildSubPart(self,li);
       }
 
-      MEDCouplingFieldInt *__getitem__(PyObject *li) const
+      MEDCouplingFieldInt32 *__getitem__(PyObject *li) const
       {
         return fieldT__getitem__(self,li);
       }
@@ -5204,7 +5277,7 @@ namespace MEDCoupling
 
       PyObject *getTinySerializationInformation() const
       {
-        return field_getTinySerializationInformation<MEDCouplingFieldInt>(self);
+        return field_getTinySerializationInformation<MEDCouplingFieldInt32>(self);
       }
       
       PyObject *serialize() const
@@ -5214,7 +5287,7 @@ namespace MEDCoupling
 
       PyObject *__getstate__() const
       {
-        return field__getstate__<MEDCouplingFieldInt>(self,MEDCoupling_MEDCouplingFieldInt_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldInt_serialize);
+        return field__getstate__<MEDCouplingFieldInt32>(self,MEDCoupling_MEDCouplingFieldInt32_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldInt32_serialize);
       }
       
       void __setstate__(PyObject *inp)
@@ -5224,6 +5297,108 @@ namespace MEDCoupling
     }
   };
 
+  class MEDCouplingFieldInt64 : public MEDCouplingFieldT<int>
+  {
+  public:
+    static MEDCouplingFieldInt64 *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+    static MEDCouplingFieldInt64 *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+    bool isEqual(const MEDCouplingFieldInt64 *other, double meshPrec, int valsPrec) const;
+    bool isEqualWithoutConsideringStr(const MEDCouplingFieldInt64 *other, double meshPrec, int valsPrec) const;
+    void setTimeUnit(const std::string& unit);
+    std::string getTimeUnit() const;
+    void setTime(double val, int iteration, int order);
+    void setArray(DataArrayInt64 *array);
+    MEDCouplingFieldInt64 *deepCopy() const;
+    MEDCouplingFieldInt64 *clone(bool recDeepCpy) const;
+    MEDCouplingFieldInt64 *cloneWithMesh(bool recDeepCpy) const;
+    MEDCouplingFieldDouble *convertToDblField() const;
+    MEDCouplingFieldInt64 *buildSubPartRange(int begin, int end, int step) const;
+    %extend {
+      MEDCouplingFieldInt64(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
+      {
+        return MEDCouplingFieldInt64::New(type,td);
+      }
+
+      MEDCouplingFieldInt64(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
+      {
+        return MEDCouplingFieldInt64::New(ft,td);
+      }
+
+      PyObject *isEqualIfNotWhy(const MEDCouplingFieldInt64 *other, double meshPrec, int valsPrec) const
+      {
+        std::string ret1;
+        bool ret0=self->isEqualIfNotWhy(other,meshPrec,valsPrec,ret1);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret0Py=ret0?Py_True:Py_False;
+        Py_XINCREF(ret0Py);
+        PyTuple_SetItem(ret,0,ret0Py);
+        PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
+        return ret;
+      }
+      
+      std::string __str__() const
+      {
+        return self->simpleRepr();
+      }
+
+      std::string __repr__() const
+      {
+        std::ostringstream oss;
+        self->reprQuickOverview(oss);
+        return oss.str();
+      }
+
+      MEDCouplingFieldInt64 *buildSubPart(PyObject *li) const
+      {
+        return fieldT_buildSubPart(self,li);
+      }
+
+      MEDCouplingFieldInt64 *__getitem__(PyObject *li) const
+      {
+        return fieldT__getitem__(self,li);
+      }
+
+      DataArrayInt64 *getArray()
+      {
+        DataArrayInt64 *ret=self->getArray();
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+      
+      PyObject *getTime()
+        {
+        int tmp1,tmp2;
+        double tmp0=self->getTime(tmp1,tmp2);
+        PyObject *res = PyList_New(3);
+        PyList_SetItem(res,0,SWIG_From_double(tmp0));
+        PyList_SetItem(res,1,SWIG_From_int(tmp1));
+        PyList_SetItem(res,2,SWIG_From_int(tmp2));
+        return res;
+        }
+
+      PyObject *getTinySerializationInformation() const
+      {
+        return field_getTinySerializationInformation<MEDCouplingFieldInt64>(self);
+      }
+      
+      PyObject *serialize() const
+      {
+        return field_serialize<Int64>(self);
+      }
+
+      PyObject *__getstate__() const
+      {
+        return field__getstate__<MEDCouplingFieldInt64>(self,MEDCoupling_MEDCouplingFieldInt64_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldInt64_serialize);
+      }
+      
+      void __setstate__(PyObject *inp)
+      {
+        field__setstate__<Int64>(self,inp);
+      }
+    }
+  };
+
   class MEDCouplingFieldFloat : public MEDCouplingFieldT<float>
   {
   public:
@@ -5941,10 +6116,14 @@ def MEDCouplingFieldDoubleReduce(self):
     self.checkConsistencyLight()
     d=(self.getTypeOfField(),self.getTimeDiscretization())
     return MEDCouplingStdReduceFunct,(MEDCouplingFieldDouble,(d,(self.__getstate__()),))
-def MEDCouplingFieldIntReduce(self):
+def MEDCouplingFieldInt32Reduce(self):
     self.checkConsistencyLight()
     d=(self.getTypeOfField(),self.getTimeDiscretization())
-    return MEDCouplingStdReduceFunct,(MEDCouplingFieldInt,(d,(self.__getstate__()),))
+    return MEDCouplingStdReduceFunct,(MEDCouplingFieldInt32,(d,(self.__getstate__()),))
+def MEDCouplingFieldInt64Reduce(self):
+    self.checkConsistencyLight()
+    d=(self.getTypeOfField(),self.getTimeDiscretization())
+    return MEDCouplingStdReduceFunct,(MEDCouplingFieldInt64,(d,(self.__getstate__()),))
 def MEDCouplingFieldFloatReduce(self):
     self.checkConsistencyLight()
     d=(self.getTypeOfField(),self.getTimeDiscretization())
@@ -5967,10 +6146,14 @@ def MEDCouplingFieldTemplateReduce(self):
 MEDCouplingUMesh.ExtractFromIndexedArrays           = DataArrayInt.ExtractFromIndexedArrays
 MEDCouplingUMesh.ExtractFromIndexedArraysSlice      = DataArrayInt.ExtractFromIndexedArraysSlice
 MEDCouplingUMesh.SetPartOfIndexedArrays             = DataArrayInt.SetPartOfIndexedArrays
-##MEDCouplingUMesh.SetPartOfIndexedArraysSlice        = DataArrayInt.SetPartOfIndexedArraysSlice
 MEDCouplingUMesh.SetPartOfIndexedArraysSameIdx      = DataArrayInt.SetPartOfIndexedArraysSameIdx
 MEDCouplingUMesh.RemoveIdsFromIndexedArrays         = DataArrayInt.RemoveIdsFromIndexedArrays
-##MEDCouplingUMesh.SetPartOfIndexedArraysSameIdxSlice = DataArrayInt.SetPartOfIndexedArraysSameIdxSlice
+MEDCouplingFieldInt = MEDCouplingFieldInt32
+
+if MEDCouplingUse64BitIDs():
+  MEDCouplingFieldID = MEDCouplingFieldInt64
+else:
+  MEDCouplingFieldID = MEDCouplingFieldInt32
 
 %}