Salome HOME
Small modif linked to previous commit + small doc on it
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingCommon.i
index c81baf3b56808824440d0d4b640cfb22fb9529fd..bf0016815c9947fecc9a56d6f5dbaa262f1f5d7c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  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,6 +37,7 @@
 #include "MEDCoupling1GTUMesh.hxx"
 #include "MEDCouplingField.hxx"
 #include "MEDCouplingFieldDouble.hxx"
+#include "MEDCouplingFieldInt.hxx"
 #include "MEDCouplingFieldTemplate.hxx"
 #include "MEDCouplingGaussLocalization.hxx"
 #include "MCAuto.hxx"
@@ -172,6 +173,8 @@ using namespace INTERP_KERNEL;
 %init %{ import_array(); %}
 #endif
 
+%init %{ initializeMe(); %}
+
 %feature("autodoc", "1");
 %feature("docstring");
 
@@ -183,6 +186,7 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingFieldDouble::getEndArray;
 %newobject MEDCoupling::MEDCouplingFieldDouble::MergeFields;
 %newobject MEDCoupling::MEDCouplingFieldDouble::MeldFields;
+%newobject MEDCoupling::MEDCouplingFieldDouble::convertToIntField;
 %newobject MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct;
 %newobject MEDCoupling::MEDCouplingFieldDouble::determinant;
 %newobject MEDCoupling::MEDCouplingFieldDouble::eigenValues;
@@ -210,6 +214,8 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingFieldDouble::findIdsInRange;
 %newobject MEDCoupling::MEDCouplingFieldDouble::buildSubPart;
 %newobject MEDCoupling::MEDCouplingFieldDouble::buildSubPartRange;
+%newobject MEDCoupling::MEDCouplingFieldDouble::voronoize;
+%newobject MEDCoupling::MEDCouplingFieldDouble::convertQuadraticCellsToLinear;
 %newobject MEDCoupling::MEDCouplingFieldDouble::__getitem__;
 %newobject MEDCoupling::MEDCouplingFieldDouble::__neg__;
 %newobject MEDCoupling::MEDCouplingFieldDouble::__add__;
@@ -228,6 +234,16 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingFieldDouble::nodeToCellDiscretization;
 %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::MEDCouplingFieldTemplate::New;
 %newobject MEDCoupling::MEDCouplingMesh::deepCopy;
 %newobject MEDCoupling::MEDCouplingMesh::clone;
@@ -251,6 +267,7 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingMesh::simplexize;
 %newobject MEDCoupling::MEDCouplingMesh::buildUnstructured;
 %newobject MEDCoupling::MEDCouplingMesh::MergeMeshes;
+%newobject MEDCoupling::MEDCouplingMesh::getDirectAccessOfCoordsArrIfInStructure;
 %newobject MEDCoupling::MEDCouplingPointSet::zipCoordsTraducer;
 %newobject MEDCoupling::MEDCouplingPointSet::getCellsInBoundingBox;
 %newobject MEDCoupling::MEDCouplingPointSet::findBoundaryNodes;
@@ -276,6 +293,7 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity;
 %newobject MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity2;
 %newobject MEDCoupling::MEDCouplingUMesh::explode3DMeshTo1D;
+%newobject MEDCoupling::MEDCouplingUMesh::explodeMeshIntoMicroEdges;
 %newobject MEDCoupling::MEDCouplingUMesh::buildExtrudedMesh;
 %newobject MEDCoupling::MEDCouplingUMesh::buildSpreadZonesWithPoly;
 %newobject MEDCoupling::MEDCouplingUMesh::MergeUMeshes;
@@ -284,6 +302,7 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed;
 %newobject MEDCoupling::MEDCouplingUMesh::buildNewNumberingFromCommNodesFrmt;
 %newobject MEDCoupling::MEDCouplingUMesh::conformize2D;
+%newobject MEDCoupling::MEDCouplingUMesh::conformize3D;
 %newobject MEDCoupling::MEDCouplingUMesh::colinearize2D;
 %newobject MEDCoupling::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes;
 %newobject MEDCoupling::MEDCouplingUMesh::sortCellsInMEDFileFrmt;
@@ -302,6 +321,7 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField;
 %newobject MEDCoupling::MEDCouplingUMesh::keepCellIdsByType;
 %newobject MEDCoupling::MEDCouplingUMesh::Build0DMeshFromCoords;
+%newobject MEDCoupling::MEDCouplingUMesh::Build1DMeshFromCoords;
 %newobject MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells;
 %newobject MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DCells;
 %newobject MEDCoupling::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh;
@@ -316,6 +336,7 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingUMesh::buildUnionOf3DMesh;
 %newobject MEDCoupling::MEDCouplingUMesh::generateGraph;
 %newobject MEDCoupling::MEDCouplingUMesh::orderConsecutiveCells1D;
+%newobject MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane;
 %newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast;
 %newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic;
 %newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic;
@@ -393,13 +414,9 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::DenseMatrix::__add__;
 %newobject MEDCoupling::DenseMatrix::__sub__;
 %newobject MEDCoupling::DenseMatrix::__mul__;
-%newobject MEDCoupling::PartDefinition::New;
-%newobject MEDCoupling::PartDefinition::toDAI;
-%newobject MEDCoupling::PartDefinition::__add__;
-%newobject MEDCoupling::PartDefinition::composeWith;
-%newobject MEDCoupling::PartDefinition::tryToSimplify;
-%newobject MEDCoupling::DataArrayPartDefinition::New;
-%newobject MEDCoupling::SlicePartDefinition::New;
+%newobject MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell;
+%newobject MEDCoupling::MEDCouplingGaussLocalization::buildRefCell;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::BuildFromPolyhedronConn;
 
 %feature("unref") MEDCouplingPointSet "$this->decrRef();"
 %feature("unref") MEDCouplingMesh "$this->decrRef();"
@@ -430,9 +447,7 @@ using namespace INTERP_KERNEL;
 %feature("unref") MEDCouplingDataForGodFather "$this->decrRef();"
 %feature("unref") MEDCouplingAMRAttribute "$this->decrRef();"
 %feature("unref") DenseMatrix "$this->decrRef();"
-%feature("unref") PartDefinition "$this->decrRef();"
-%feature("unref") DataArrayPartDefinition "$this->decrRef();"
-%feature("unref") SlicePartDefinition "$this->decrRef();"
+%feature("unref") MEDCouplingSkyLineArray "$this->decrRef();"
 
 %rename(assign) *::operator=;
 %ignore MEDCoupling::MEDCouplingGaussLocalization::pushTinySerializationIntInfo;
@@ -447,6 +462,14 @@ using namespace INTERP_KERNEL;
 %include "MEDCouplingRefCountObject.i"
 %include "MEDCouplingMemArray.i"
 
+%{
+  void initializeMe()
+  {// AGY : here initialization of C++ traits in MEDCouplingDataArrayTypemaps.i for code factorization. Awful, I know, but no other solutions.
+    SWIGTITraits<double>::TI=SWIGTYPE_p_MEDCoupling__DataArrayDouble;
+    SWIGTITraits<float>::TI=SWIGTYPE_p_MEDCoupling__DataArrayFloat;
+  }
+%}
+
 namespace INTERP_KERNEL
 { 
   /*!
@@ -513,6 +536,7 @@ namespace MEDCoupling
   class DataArrayInt;
   class DataArrayDouble;
   class MEDCouplingUMesh;
+  class MEDCouplingCMesh;
   class MEDCouplingFieldDouble;
 
   %extend RefCountObject
@@ -617,6 +641,15 @@ namespace MEDCoupling
            PyList_SetItem(res,2,SWIG_From_int(tmp2));
            return res;
          }
+
+         DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const throw(INTERP_KERNEL::Exception)
+         {
+           const DataArrayDouble *ret(self->getDirectAccessOfCoordsArrIfInStructure());
+           DataArrayDouble *ret2(const_cast<DataArrayDouble *>(ret));
+           if(ret2)
+             ret2->incrRef();
+           return ret2;
+         }
          
          int getCellContainingPoint(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
          {
@@ -801,7 +834,7 @@ namespace MEDCoupling
            int spaceDim=self->getSpaceDimension();
            INTERP_KERNEL::AutoPtr<double> tmp=new double[2*spaceDim];
            self->getBoundingBox(tmp);
-           PyObject *ret=convertDblArrToPyListOfTuple(tmp,2,spaceDim);
+           PyObject *ret=convertDblArrToPyListOfTuple<double>(tmp,2,spaceDim);
            return ret;
          }
 
@@ -1140,28 +1173,118 @@ namespace MEDCoupling
     void setWeights(const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
     //
     static bool AreAlmostEqual(const std::vector<double>& v1, const std::vector<double>& v2, double eps);
+    //
+    %extend 
+    {
+      DataArrayDouble *localizePtsInRefCooForEachCell(const DataArrayDouble *ptsInRefCoo, const MEDCouplingUMesh *mesh) const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<DataArrayDouble> ret(self->localizePtsInRefCooForEachCell(ptsInRefCoo,mesh));
+        return ret.retn();
+      }
+
+      MEDCouplingUMesh *buildRefCell() const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<MEDCouplingUMesh> ret(self->buildRefCell());
+        return ret.retn();
+      }
+    }
   };
 
   class MEDCouplingSkyLineArray
   {
-  public:
-    MEDCouplingSkyLineArray();
-    MEDCouplingSkyLineArray( const MEDCouplingSkyLineArray &myArray );
-    MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value );
-    MEDCouplingSkyLineArray( const std::vector<int>& index, const std::vector<int>& value );
+  public:  
+    static MEDCouplingSkyLineArray *BuildFromPolyhedronConn( const DataArrayInt* c, const DataArrayInt* cI ) throw(INTERP_KERNEL::Exception);
   
     void set( DataArrayInt* index, DataArrayInt* value );
+    void set3( DataArrayInt* superIndex, DataArrayInt* index, DataArrayInt* value );
+    
+    int getSuperNumberOf() const;
     int getNumberOf() const;
     int getLength() const;
+    
+    DataArrayInt* getSuperIndexArray() const;
     DataArrayInt* getIndexArray() const;
-    DataArrayInt* getValueArray() const;
-      %extend 
+    DataArrayInt* getValuesArray() const;
+
+    void deletePack(const int i, const int j) throw(INTERP_KERNEL::Exception);
+    
+    %extend 
+    {
+      MEDCouplingSkyLineArray() throw(INTERP_KERNEL::Exception)
+      {
+        return MEDCouplingSkyLineArray::New();
+      }
+
+      MEDCouplingSkyLineArray( const std::vector<int>& index, const std::vector<int>& value) throw(INTERP_KERNEL::Exception)
+      {
+        return MEDCouplingSkyLineArray::New(index, value);
+      }
+
+      MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value ) throw(INTERP_KERNEL::Exception)
+      {
+        return MEDCouplingSkyLineArray::New(index, value);
+      }
+
+      MEDCouplingSkyLineArray( const MEDCouplingSkyLineArray & other ) throw(INTERP_KERNEL::Exception)
+      {
+        return MEDCouplingSkyLineArray::New(other);
+      }
+
+      std::string __str__() const throw(INTERP_KERNEL::Exception)
+      {
+        return self->simpleRepr();
+      }
+     
+      PyObject *getSimplePackSafe(int absolutePackId) const throw(INTERP_KERNEL::Exception)
+      {
+        std::vector<int> ret;
+        self->getSimplePackSafe(absolutePackId,ret);
+        return convertIntArrToPyList2(ret);
+      }
+
+      PyObject *findPackIds(PyObject *superPackIndices, PyObject *pack) const throw(INTERP_KERNEL::Exception)
+      {
+          std::vector<int> vpack, vspIdx, out;
+          
+          convertPyToNewIntArr3(superPackIndices,vspIdx);
+          convertPyToNewIntArr3(pack,vpack);
+          
+          self->findPackIds(vspIdx, vpack.data(), vpack.data()+vpack.size(), out);
+          return convertIntArrToPyList2(out);
+      }
+      
+      void pushBackPack(const int i, PyObject *pack) throw(INTERP_KERNEL::Exception)
+        {
+          std::vector<int> vpack;
+          convertPyToNewIntArr3(pack,vpack);
+          self->pushBackPack(i,vpack.data(), vpack.data()+vpack.size());
+        }
+        
+      void replaceSimplePack(const int idx, PyObject *pack) throw(INTERP_KERNEL::Exception)
+        {
+          std::vector<int> vpack;
+          convertPyToNewIntArr3(pack,vpack);
+          self->replaceSimplePack(idx, vpack.data(), vpack.data()+vpack.size());
+        }
+        
+      void replacePack(const int superIdx, const int idx, PyObject *pack) throw(INTERP_KERNEL::Exception)
+        {
+          std::vector<int> vpack;
+          convertPyToNewIntArr3(pack,vpack);
+          self->replacePack(superIdx, idx, vpack.data(), vpack.data()+vpack.size());
+        }
+
+      PyObject *convertToPolyhedronConn() const throw(INTERP_KERNEL::Exception)
          {
-           std::string __str__() const throw(INTERP_KERNEL::Exception)
-           {
-             return self->simpleRepr();
-           }
-         }
+           MCAuto<DataArrayInt> d0=DataArrayInt::New();
+           MCAuto<DataArrayInt> d1=DataArrayInt::New();
+           self->convertToPolyhedronConn(d0,d1);
+           PyObject *ret=PyTuple_New(2);
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           return ret;
+         } 
+    }
   };
 }
 
@@ -1612,7 +1735,7 @@ namespace MEDCoupling
              int sz;
              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
              INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
-             MEDCoupling::MEDCouplingPointSet::Rotate2DAlg(c,angle,nbNodes,coo);
+             MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,coo);
              for(int i=0;i<sz;i++)
                PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
            }
@@ -1628,7 +1751,7 @@ namespace MEDCoupling
                                                             "Rotate2DAlg",2,true,nbNodes);
              if(sw!=2 && sw!=3)
                throw INTERP_KERNEL::Exception("Invalid call to MEDCouplingPointSet::Rotate2DAlg : try another overload method !");
-             MEDCoupling::MEDCouplingPointSet::Rotate2DAlg(c,angle,nbNodes,const_cast<double *>(coo));
+             MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,const_cast<double *>(coo));
            }
            
            static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
@@ -1637,7 +1760,7 @@ namespace MEDCoupling
              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
              INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
              INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
-             MEDCoupling::MEDCouplingPointSet::Rotate3DAlg(c,v,angle,nbNodes,coo);
+             MEDCoupling::DataArrayDouble::Rotate3DAlg(c,v,angle,nbNodes,coo,coo);
              for(int i=0;i<sz;i++)
                PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
            }
@@ -1654,7 +1777,7 @@ namespace MEDCoupling
              if(sw!=2 && sw!=3)
                throw INTERP_KERNEL::Exception("Invalid call to MEDCouplingPointSet::Rotate3DAlg : try another overload method !");
              INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
-             MEDCoupling::MEDCouplingPointSet::Rotate3DAlg(c,v,angle,nbNodes,const_cast<double *>(coo));
+             MEDCoupling::DataArrayDouble::Rotate3DAlg(c,v,angle,nbNodes,coo,const_cast<double *>(coo));
            }
          }
     };
@@ -1771,6 +1894,7 @@ namespace MEDCoupling
     MEDCouplingUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
     //tools
     DataArrayInt *conformize2D(double eps) throw(INTERP_KERNEL::Exception);
+    DataArrayInt *conformize3D(double eps) throw(INTERP_KERNEL::Exception);
     DataArrayInt *colinearize2D(double eps) throw(INTERP_KERNEL::Exception);
     void shiftNodeNumbersInConn(int delta) throw(INTERP_KERNEL::Exception);
     std::vector<bool> getQuadraticStatus() const throw(INTERP_KERNEL::Exception);
@@ -1785,6 +1909,7 @@ namespace MEDCoupling
     MEDCouplingUMesh *buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
     MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
     MEDCouplingUMesh *explode3DMeshTo1D(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
+    MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
     void orientCorrectlyPolyhedrons() throw(INTERP_KERNEL::Exception);
     bool isPresenceOfQuadratic() const throw(INTERP_KERNEL::Exception);
     bool isFullyQuadratic() const throw(INTERP_KERNEL::Exception);
@@ -1805,10 +1930,10 @@ namespace MEDCoupling
     DataArrayInt *findAndCorrectBadOriented3DExtrudedCells() throw(INTERP_KERNEL::Exception);
     DataArrayInt *findAndCorrectBadOriented3DCells() throw(INTERP_KERNEL::Exception);
     MEDCoupling::MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
+    MEDCouplingSkyLineArray *generateGraph() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *buildUnionOf2DMesh() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *buildUnionOf3DMesh() const throw(INTERP_KERNEL::Exception);
-    MEDCouplingSkyLineArray *generateGraph() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *orderConsecutiveCells1D() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *getBoundingBoxForBBTreeFast() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
@@ -1854,6 +1979,12 @@ namespace MEDCoupling
         return self->cellIterator();
       }
 
+      static MEDCouplingUMesh *Build1DMeshFromCoords(DataArrayDouble *da) throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::Build1DMeshFromCoords(da));
+        return ret.retn();
+      }
+      
       PyObject *getAllGeoTypesSorted() const throw(INTERP_KERNEL::Exception)
       {
         std::vector<INTERP_KERNEL::NormalizedCellType> result=self->getAllGeoTypesSorted();
@@ -2114,6 +2245,16 @@ namespace MEDCoupling
         return ret;
       }
 
+      static PyObject *PartitionBySpreadZone(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
+      {
+        std::vector<DataArrayInt *> retCpp(MEDCouplingUMesh::PartitionBySpreadZone(arrIn,arrIndxIn));
+        int sz=retCpp.size();
+        PyObject *ret=PyList_New(sz);
+        for(int i=0;i<sz;i++)
+          PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
       PyObject *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, PyObject *ids) const throw(INTERP_KERNEL::Exception)
       {
         int size;
@@ -2487,7 +2628,7 @@ namespace MEDCoupling
         double vals[6];
         std::copy(vec,vec+3,vals);
         std::copy(pos,pos+3,vals+3);
-        return convertDblArrToPyListOfTuple(vals,3,2);
+        return convertDblArrToPyListOfTuple<double>(vals,3,2);
       }
       
       static MEDCouplingUMesh *MergeUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
@@ -2537,6 +2678,35 @@ namespace MEDCoupling
         return ret;
       }
 
+      PyObject *explodeIntoEdges() const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<DataArrayInt> desc,descIndex,revDesc,revDescIndx;
+        MCAuto<MEDCouplingUMesh> m(self->explodeIntoEdges(desc,descIndex,revDesc,revDescIndx));
+        PyObject *ret=PyTuple_New(5);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(desc.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(descIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(revDesc.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(revDescIndx.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
+      PyObject *explodeMeshIntoMicroEdges() const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<DataArrayInt> d0=DataArrayInt::New();
+        MCAuto<DataArrayInt> d1=DataArrayInt::New();
+        MCAuto<DataArrayInt> d2=DataArrayInt::New();
+        MCAuto<DataArrayInt> d3=DataArrayInt::New();
+        MEDCouplingUMesh *m=self->explodeMeshIntoMicroEdges(d0,d1,d2,d3);
+        PyObject *ret=PyTuple_New(5);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
       PyObject *buildDescendingConnectivity() const throw(INTERP_KERNEL::Exception)
       {
         MCAuto<DataArrayInt> d0=DataArrayInt::New();
@@ -2589,6 +2759,26 @@ namespace MEDCoupling
         return ret;
       }
 
+      PyObject *computeEnlargedNeighborsOfNodes() const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<DataArrayInt> neighbors,neighborsIdx;
+        self->computeEnlargedNeighborsOfNodes(neighbors,neighborsIdx);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+      
+      PyObject *computeCellNeighborhoodFromNodesOne(const DataArrayInt *nodeNeigh, const DataArrayInt *nodeNeighI) const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<DataArrayInt> cellNeigh,cellNeighIndex;
+        self->computeCellNeighborhoodFromNodesOne(nodeNeigh,nodeNeighI,cellNeigh,cellNeighIndex);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeigh.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeighIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+      
       static PyObject *ComputeNeighborsOfCellsAdv(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *revDesc, const DataArrayInt *revDescI) throw(INTERP_KERNEL::Exception)
       {
         DataArrayInt *neighbors=0,*neighborsIdx=0;
@@ -2733,6 +2923,21 @@ namespace MEDCoupling
         return ret;
       }
 
+      MEDCouplingUMesh *clipSingle3DCellByPlane(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
+      {
+        double val,val2;
+        DataArrayDouble *a,*a2;
+        DataArrayDoubleTuple *aa,*aa2;
+        std::vector<double> bb,bb2;
+        int sw;
+        const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st paramater for origin.";
+        const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd paramater for vector.";
+        const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,3,true);
+        const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,3,true);
+        MCAuto<MEDCouplingUMesh> ret(self->clipSingle3DCellByPlane(orig,vect,eps));
+        return ret.retn();
+      }
+
       DataArrayInt *getCellIdsCrossingPlane(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
       {
         int spaceDim=self->getSpaceDimension();
@@ -2780,7 +2985,7 @@ namespace MEDCoupling
           default:
             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertToPolyTypes : unexpected input array type recognized !");
           }
-      }
+      }      
     }
     void convertAllToPoly();
     void convertExtrudedPolyhedra() throw(INTERP_KERNEL::Exception);
@@ -2798,13 +3003,20 @@ namespace MEDCoupling
   {
   public:
     static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception);
+    static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingCMesh *mesh3D) throw(INTERP_KERNEL::Exception);
     MEDCouplingUMesh *build3DUnstructuredMesh() const throw(INTERP_KERNEL::Exception);
+    int get2DCellIdForExtrusion() const;
     %extend {
       MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception)
       {
         return MEDCouplingMappedExtrudedMesh::New(mesh3D,mesh2D,cell2DId);
       }
 
+      MEDCouplingMappedExtrudedMesh(const MEDCouplingCMesh *mesh3D) throw(INTERP_KERNEL::Exception)
+      {
+        return MEDCouplingMappedExtrudedMesh::New(mesh3D);
+      }
+
       MEDCouplingMappedExtrudedMesh()
       {
         return MEDCouplingMappedExtrudedMesh::New();
@@ -3717,6 +3929,7 @@ namespace MEDCoupling
   {
   public:
     static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception);
+    static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt& f) throw(INTERP_KERNEL::Exception);
     static MEDCouplingFieldTemplate *New(TypeOfField type);
     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
     std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
@@ -3726,6 +3939,11 @@ namespace MEDCoupling
          {
            return MEDCouplingFieldTemplate::New(f);
          }
+
+         MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDCouplingFieldTemplate::New(f);
+         }
          
          MEDCouplingFieldTemplate(TypeOfField type) throw(INTERP_KERNEL::Exception)
          {
@@ -3746,6 +3964,8 @@ namespace MEDCoupling
        }
   };
   
+  class MEDCouplingFieldInt;
+  
   class MEDCouplingFieldDouble : public MEDCoupling::MEDCouplingField
   {
   public:
@@ -3759,6 +3979,7 @@ namespace MEDCoupling
     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
     std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
     std::string  writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldInt *convertToIntField() const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
     MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const;
     MEDCouplingFieldDouble *deepCopy() const;
@@ -3866,6 +4087,31 @@ namespace MEDCoupling
         self->reprQuickOverview(oss);
         return oss.str();
       }
+      
+      MEDCouplingFieldDouble *voronoize(double eps) const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<MEDCouplingFieldDouble> ret(self->voronoize(eps));
+        return ret.retn();
+      }
+
+      MEDCouplingFieldDouble *convertQuadraticCellsToLinear() const throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<MEDCouplingFieldDouble> ret(self->convertQuadraticCellsToLinear());
+        return ret.retn();
+      }
+      
+      MEDCouplingFieldDouble *computeVectorFieldCyl(PyObject *center, PyObject *vector) const
+      {
+        const char msg[]="Python wrap of MEDCouplingFieldDouble::computeVectorFieldCyl : ";
+        double val,val2;
+        DataArrayDouble *a,*a2;
+        DataArrayDoubleTuple *aa,*aa2;
+        std::vector<double> bb,bb2;
+        int sw;
+        const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,3,true);
+        const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,3,true);
+        return self->computeVectorFieldCyl(centerPtr,vectorPtr);
+      }
 
       DataArrayDouble *getArray() throw(INTERP_KERNEL::Exception)
       {
@@ -3929,7 +4175,7 @@ namespace MEDCoupling
         int sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> res=new double[sz];
         self->getValueOn(spaceLoc,res);
-        return convertDblArrToPyList(res,sz);
+        return convertDblArrToPyList<double>(res,sz);
       }
 
        PyObject *getValueOnPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception)
@@ -3937,7 +4183,7 @@ namespace MEDCoupling
          int sz=self->getNumberOfComponents();
          INTERP_KERNEL::AutoPtr<double> res=new double[sz];
          self->getValueOnPos(i,j,k,res);
-         return convertDblArrToPyList(res,sz);
+         return convertDblArrToPyList<double>(res,sz);
        }
 
       DataArrayDouble *getValueOnMulti(PyObject *locs) const throw(INTERP_KERNEL::Exception)
@@ -3971,7 +4217,7 @@ namespace MEDCoupling
         int sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> res=new double[sz];
         self->getValueOn(spaceLoc,time,res);
-        return convertDblArrToPyList(res,sz);
+        return convertDblArrToPyList<double>(res,sz);
       }
 
       void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
@@ -4023,35 +4269,35 @@ namespace MEDCoupling
         int sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->accumulate(tmp);
-        return convertDblArrToPyList(tmp,sz);
+        return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *integral(bool isWAbs) const throw(INTERP_KERNEL::Exception)
       {
         int sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->integral(isWAbs,tmp);
-        return convertDblArrToPyList(tmp,sz);
+        return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *getWeightedAverageValue(bool isWAbs=true) const throw(INTERP_KERNEL::Exception)
       {
         int sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->getWeightedAverageValue(tmp,isWAbs);
-        return convertDblArrToPyList(tmp,sz);
+        return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *normL1() const throw(INTERP_KERNEL::Exception)
       {
         int sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->normL1(tmp);
-        return convertDblArrToPyList(tmp,sz);
+        return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *normL2() const throw(INTERP_KERNEL::Exception)
       {
         int sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->normL2(tmp);
-        return convertDblArrToPyList(tmp,sz);
+        return convertDblArrToPyList<double>(tmp,sz);
       }
       void renumberCells(PyObject *li, bool check=true) throw(INTERP_KERNEL::Exception)
       {
@@ -4087,119 +4333,12 @@ namespace MEDCoupling
 
       MEDCouplingFieldDouble *buildSubPart(PyObject *li) const throw(INTERP_KERNEL::Exception)
       {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        const MEDCouplingMesh *mesh=self->getMesh();
-        if(!mesh)
-          throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::buildSubPart : field lies on a null mesh !");
-        int nbc=mesh->getNumberOfCells();
-        convertObjToPossibleCpp2(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            {
-              if(singleVal>=nbc)
-                {
-                  std::ostringstream oss;
-                  oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
-                  throw INTERP_KERNEL::Exception(oss.str().c_str());
-                }
-              if(singleVal>=0)
-                return self->buildSubPart(&singleVal,&singleVal+1);
-              else
-                {
-                  if(nbc+singleVal>0)
-                    {
-                      int tmp=nbc+singleVal;
-                      return self->buildSubPart(&tmp,&tmp+1);
-                    }
-                  else
-                    {
-                      std::ostringstream oss;
-                      oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
-                      throw INTERP_KERNEL::Exception(oss.str().c_str());
-                    }
-                }
-            }
-          case 2:
-            {
-              return self->buildSubPart(&multiVal[0],&multiVal[0]+multiVal.size());
-            }
-          case 3:
-            {
-              return self->buildSubPartRange(slic.first,slic.second.first,slic.second.second);
-            }
-          case 4:
-            {
-              if(!daIntTyypp)
-                throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::buildSubPart : null instance has been given in input !");
-              daIntTyypp->checkAllocated();
-              return self->buildSubPart(daIntTyypp->begin(),daIntTyypp->end());
-            }
-          default:
-            throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::buildSubPart : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
-          }
+        return fieldT_buildSubPart(self,li);
       }
 
       MEDCouplingFieldDouble *__getitem__(PyObject *li) const throw(INTERP_KERNEL::Exception)
       {
-        const char msg[]="MEDCouplingFieldDouble::__getitem__ : invalid call  Available API are : \n-myField[dataArrayInt]\n-myField[slice]\n-myField[pythonListOfCellIds]\n-myField[integer]\n-myField[dataArrayInt,1]\n-myField[slice,1]\n-myField[pythonListOfCellIds,1]\n-myField[integer,1]\n";
-        if(PyTuple_Check(li))
-          {
-            Py_ssize_t sz=PyTuple_Size(li);
-            if(sz!=2)
-              throw INTERP_KERNEL::Exception(msg);
-            PyObject *elt0=PyTuple_GetItem(li,0),*elt1=PyTuple_GetItem(li,1);
-            int sw;
-            int singleVal;
-            std::vector<int> multiVal;
-            std::pair<int, std::pair<int,int> > slic;
-            MEDCoupling::DataArrayInt *daIntTyypp=0;
-            if(!self->getArray())
-              throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::__getitem__ : no array set on field to deduce number of components !");
-            try
-              { convertObjToPossibleCpp2(elt1,self->getArray()->getNumberOfComponents(),sw,singleVal,multiVal,slic,daIntTyypp); }
-            catch(INTERP_KERNEL::Exception& e)
-              { std::ostringstream oss; oss << "MEDCouplingFieldDouble::__getitem__ : invalid type in 2nd parameter (compo) !" << e.what(); throw INTERP_KERNEL::Exception(oss.str().c_str()); }
-            MCAuto<MEDCouplingFieldDouble> ret0=MEDCoupling_MEDCouplingFieldDouble_buildSubPart(self,elt0);
-            DataArrayDouble *ret0Arr=ret0->getArray();
-            if(!ret0Arr)
-              throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::__getitem__ : no array exists to apply restriction on component on it !");
-            switch(sw)
-              {
-              case 1:
-                {
-                  std::vector<int> v2(1,singleVal);
-                  MCAuto<DataArrayDouble> aarr(ret0Arr->keepSelectedComponents(v2));
-                  ret0->setArray(aarr);
-                  return ret0.retn();
-                }
-              case 2:
-                {
-                  MCAuto<DataArrayDouble> aarr(ret0Arr->keepSelectedComponents(multiVal));
-                  ret0->setArray(aarr);
-                  return ret0.retn();
-                }
-              case 3:
-                {
-                  int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(slic.first,slic.second.first,slic.second.second,"MEDCouplingFieldDouble::__getitem__ : invalid range in 2nd parameter (components) !");
-                  std::vector<int> v2(nbOfComp);
-                  for(int i=0;i<nbOfComp;i++)
-                    v2[i]=slic.first+i*slic.second.second;
-                  MCAuto<DataArrayDouble> aarr(ret0Arr->keepSelectedComponents(v2));
-                  ret0->setArray(aarr);
-                  return ret0.retn();
-                }
-              default:
-                throw INTERP_KERNEL::Exception(msg);
-              }
-            
-          }
-        else
-          return MEDCoupling_MEDCouplingFieldDouble_buildSubPart(self,li);
+        return fieldT__getitem__(self,li);
       }
 
       PyObject *getMaxValue2() const throw(INTERP_KERNEL::Exception)
@@ -5148,6 +5287,74 @@ namespace MEDCoupling
          }
        }
   };
+
+  class MEDCouplingFieldInt : public MEDCouplingField
+  {
+  public:
+    static MEDCouplingFieldInt *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+    static MEDCouplingFieldInt *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+    void setTimeUnit(const std::string& unit) throw(INTERP_KERNEL::Exception);
+    std::string getTimeUnit() const throw(INTERP_KERNEL::Exception);
+    void setTime(double val, int iteration, int order) throw(INTERP_KERNEL::Exception);
+    void setArray(DataArrayInt *array) throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldInt *deepCopy() const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldInt *clone(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldInt *cloneWithMesh(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldDouble *convertToDblField() const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldInt *buildSubPartRange(int begin, int end, int step) const throw(INTERP_KERNEL::Exception);
+    %extend {
+      MEDCouplingFieldInt(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
+      {
+        return MEDCouplingFieldInt::New(type,td);
+      }
+
+      MEDCouplingFieldInt(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
+      {
+        return MEDCouplingFieldInt::New(ft,td);
+      }
+
+      std::string __str__() const throw(INTERP_KERNEL::Exception)
+      {
+        return self->simpleRepr();
+      }
+
+      std::string __repr__() const throw(INTERP_KERNEL::Exception)
+      {
+        std::ostringstream oss;
+        self->reprQuickOverview(oss);
+        return oss.str();
+      }
+
+      MEDCouplingFieldInt *buildSubPart(PyObject *li) const throw(INTERP_KERNEL::Exception)
+      {
+        return fieldT_buildSubPart(self,li);
+      }
+
+      MEDCouplingFieldInt *__getitem__(PyObject *li) const throw(INTERP_KERNEL::Exception)
+      {
+        return fieldT__getitem__(self,li);
+      }
+
+      DataArrayInt *getArray() throw(INTERP_KERNEL::Exception)
+      {
+        DataArrayInt *ret=self->getArray();
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+      
+      PyObject *getTime() throw(INTERP_KERNEL::Exception)
+        {
+        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;
+        }
+    }
+  };
   
   class MEDCouplingDefinitionTime
   {
@@ -5743,107 +5950,6 @@ namespace MEDCoupling
 #endif
     }
   };
-  
-  class PartDefinition : public RefCountObject, public TimeLabel
-  {
-  public:
-    static PartDefinition *New(int start, int stop, int step) throw(INTERP_KERNEL::Exception);
-    static PartDefinition *New(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception);
-    virtual DataArrayInt *toDAI() const throw(INTERP_KERNEL::Exception);
-    virtual int getNumberOfElems() const throw(INTERP_KERNEL::Exception);
-    virtual std::string getRepr() const throw(INTERP_KERNEL::Exception);
-    virtual PartDefinition *composeWith(const PartDefinition *other) const throw(INTERP_KERNEL::Exception);
-    virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
-    virtual PartDefinition *tryToSimplify() const throw(INTERP_KERNEL::Exception);
-    %extend
-    {
-      virtual PartDefinition *__add__(const PartDefinition& other) const throw(INTERP_KERNEL::Exception)
-      {
-        return (*self)+other;
-      }
-
-      virtual PyObject *isEqual(const PartDefinition *other) const throw(INTERP_KERNEL::Exception)
-      {
-        std::string ret1;
-        bool ret0(self->isEqual(other,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;
-      }
-
-      virtual PyObject *deepCopy() const throw(INTERP_KERNEL::Exception)
-      {
-        return convertPartDefinition(self->deepCopy(),SWIG_POINTER_OWN | 0);
-      }
-    }
-  protected:
-    virtual ~PartDefinition();
-  };
-
-  class DataArrayPartDefinition : public PartDefinition
-  {
-  public:
-    static DataArrayPartDefinition *New(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception);
-    %extend
-    {
-      DataArrayPartDefinition(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception)
-      {
-        return DataArrayPartDefinition::New(listOfIds);
-      }
-
-      std::string __str__() const throw(INTERP_KERNEL::Exception)
-      {
-        return self->getRepr();
-      }
-      
-      std::string __repr__() const throw(INTERP_KERNEL::Exception)
-      {
-        std::ostringstream oss; oss << "DataArrayPartDefinition C++ instance at " << self << "." << std::endl;
-        oss << self->getRepr();
-        return oss.str();
-      }
-    }
-  protected:
-    virtual ~DataArrayPartDefinition();
-  };
-
-  class SlicePartDefinition : public PartDefinition
-  {
-  public:
-    static SlicePartDefinition *New(int start, int stop, int step) throw(INTERP_KERNEL::Exception);
-    int getEffectiveStop() const throw(INTERP_KERNEL::Exception);
-    %extend
-    {
-      SlicePartDefinition(int start, int stop, int step) throw(INTERP_KERNEL::Exception)
-      {
-        return SlicePartDefinition::New(start,stop,step);
-      }
-
-      PyObject *getSlice() const throw(INTERP_KERNEL::Exception)
-      {
-        int a,b,c;
-        self->getSlice(a,b,c);
-        return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(c));
-      }
-      
-      std::string __str__() const throw(INTERP_KERNEL::Exception)
-      {
-        return self->getRepr();
-      }
-      
-      std::string __repr__() const throw(INTERP_KERNEL::Exception)
-      {
-        std::ostringstream oss; oss << "SlicePartDefinition C++ instance at " << self << "." << std::endl;
-        oss << self->getRepr();
-        return oss.str();
-      }
-    }
-  protected:
-    virtual ~SlicePartDefinition();
-  };
 }
 
 %pythoncode %{