Salome HOME
Merge remote-tracking branch 'origin/abn/bug_fixes' into V8_5_BR
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingCommon.i
index 6a76ed3607e0010b72ac7a3172389dbdd67ea13d..cb4b2205c4a36d843e63c2cb6bf7c8b6a4a6b675 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2017  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
@@ -16,9 +16,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// Author : Anthony Geay (CEA/DEN)
-
-%module MEDCoupling
+// Author : Anthony Geay (EDF R&D)
 
 #ifdef WITH_DOCSTRINGS
 %include MEDCoupling_doc.i
@@ -37,6 +35,8 @@
 #include "MEDCoupling1GTUMesh.hxx"
 #include "MEDCouplingField.hxx"
 #include "MEDCouplingFieldDouble.hxx"
+#include "MEDCouplingFieldInt.hxx"
+#include "MEDCouplingFieldFloat.hxx"
 #include "MEDCouplingFieldTemplate.hxx"
 #include "MEDCouplingGaussLocalization.hxx"
 #include "MCAuto.hxx"
@@ -144,6 +144,18 @@ using namespace INTERP_KERNEL;
 }
 //$$$$$$$$$$$$$$$$$$
 
+////////////////////
+%typemap(out) MEDCoupling::MEDCouplingField*
+{
+  $result=convertField($1,$owner);
+}
+
+%typemap(out) MEDCouplingField*
+{
+  $result=convertField($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
 ////////////////////
 %typemap(out) MEDCoupling::MEDCouplingMultiFields*
 {
@@ -172,6 +184,8 @@ using namespace INTERP_KERNEL;
 %init %{ import_array(); %}
 #endif
 
+%init %{ initializeMe(); %}
+
 %feature("autodoc", "1");
 %feature("docstring");
 
@@ -183,6 +197,8 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingFieldDouble::getEndArray;
 %newobject MEDCoupling::MEDCouplingFieldDouble::MergeFields;
 %newobject MEDCoupling::MEDCouplingFieldDouble::MeldFields;
+%newobject MEDCoupling::MEDCouplingFieldDouble::convertToIntField;
+%newobject MEDCoupling::MEDCouplingFieldDouble::convertToFloatField;
 %newobject MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct;
 %newobject MEDCoupling::MEDCouplingFieldDouble::determinant;
 %newobject MEDCoupling::MEDCouplingFieldDouble::eigenValues;
@@ -210,6 +226,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 +246,25 @@ 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::MEDCouplingFieldFloat::New;
+%newobject MEDCoupling::MEDCouplingFieldFloat::convertToDblField;
+%newobject MEDCoupling::MEDCouplingFieldFloat::getArray;
+%newobject MEDCoupling::MEDCouplingFieldFloat::deepCopy;
+%newobject MEDCoupling::MEDCouplingFieldFloat::clone;
+%newobject MEDCoupling::MEDCouplingFieldFloat::cloneWithMesh;
+%newobject MEDCoupling::MEDCouplingFieldFloat::buildSubPart;
+%newobject MEDCoupling::MEDCouplingFieldFloat::buildSubPartRange;
+%newobject MEDCoupling::MEDCouplingFieldFloat::__getitem__;
 %newobject MEDCoupling::MEDCouplingFieldTemplate::New;
 %newobject MEDCoupling::MEDCouplingMesh::deepCopy;
 %newobject MEDCoupling::MEDCouplingMesh::clone;
@@ -251,6 +288,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 +314,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 +323,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 +342,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 +357,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 +435,12 @@ 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;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::getSuperIndexArray;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::getIndexArray;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::getValuesArray;
 
 %feature("unref") MEDCouplingPointSet "$this->decrRef();"
 %feature("unref") MEDCouplingMesh "$this->decrRef();"
@@ -418,6 +459,8 @@ using namespace INTERP_KERNEL;
 %feature("unref") MEDCouplingFieldDiscretizationGaussNE "$this->decrRef();"
 %feature("unref") MEDCouplingFieldDiscretizationKriging "$this->decrRef();"
 %feature("unref") MEDCouplingFieldDouble "$this->decrRef();"
+%feature("unref") MEDCouplingFieldFloat "$this->decrRef();"
+%feature("unref") MEDCouplingFieldInt "$this->decrRef();"
 %feature("unref") MEDCouplingMultiFields "$this->decrRef();"
 %feature("unref") MEDCouplingFieldTemplate "$this->decrRef();"
 %feature("unref") MEDCouplingMultiFields "$this->decrRef();"
@@ -430,9 +473,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 +488,18 @@ 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;
+    SWIGTITraits<int>::TI=SWIGTYPE_p_MEDCoupling__DataArrayInt;
+    SWIGTITraits<double>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayDoubleTuple;
+    SWIGTITraits<float>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayFloatTuple;
+    SWIGTITraits<int>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayIntTuple;
+  }
+%}
+
 namespace INTERP_KERNEL
 { 
   /*!
@@ -513,6 +566,7 @@ namespace MEDCoupling
   class DataArrayInt;
   class DataArrayDouble;
   class MEDCouplingUMesh;
+  class MEDCouplingCMesh;
   class MEDCouplingFieldDouble;
 
   %extend RefCountObject
@@ -617,6 +671,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)
          {
@@ -719,7 +782,7 @@ namespace MEDCoupling
          {
            int sw,sz(-1);
            int v0; std::vector<int> v1;
-           const int *ids(convertObjToPossibleCpp1_Safe(li,sw,sz,v0,v1));
+           const int *ids(convertIntStarLikePyObjToCppIntStar(li,sw,sz,v0,v1));
            self->renumberCells(ids,check);
          }
 
@@ -801,7 +864,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;
          }
 
@@ -821,7 +884,7 @@ namespace MEDCoupling
          {
            int szArr,sw,iTypppArr;
            std::vector<int> stdvecTyyppArr;
-           const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+           const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
            MEDCouplingMesh *ret=self->buildPart(tmp,tmp+szArr);
            if(sw==3)//DataArrayInt
              { 
@@ -839,7 +902,7 @@ namespace MEDCoupling
            int szArr,sw,iTypppArr;
            std::vector<int> stdvecTyyppArr;
            DataArrayInt *arr=0;
-           const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+           const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
            MEDCouplingMesh *ret=self->buildPartAndReduceNodes(tmp,tmp+szArr,arr);
            if(sw==3)//DataArrayInt
              { 
@@ -901,12 +964,12 @@ namespace MEDCoupling
           return self->checkTypeConsistencyAndContig(code,idsPerType);
         }
 
-        PyObject *splitProfilePerType(const DataArrayInt *profile) const throw(INTERP_KERNEL::Exception)
+        PyObject *splitProfilePerType(const DataArrayInt *profile, bool smartPflKiller=true) const throw(INTERP_KERNEL::Exception)
         {
           std::vector<int> code;
           std::vector<DataArrayInt *> idsInPflPerType;
           std::vector<DataArrayInt *> idsPerType;
-          self->splitProfilePerType(profile,code,idsInPflPerType,idsPerType);
+          self->splitProfilePerType(profile,code,idsInPflPerType,idsPerType,smartPflKiller);
           PyObject *ret=PyTuple_New(3);
           //
           if(code.size()%3!=0)
@@ -1020,14 +1083,6 @@ namespace MEDCoupling
            self->resizeForUnserialization(tinyInfo,a1,a2,littleStrings);
          }
          
-         PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
-         {// put an empty dict in input to say to __new__ to call __init__...
-           PyObject *ret(PyTuple_New(1));
-           PyObject *ret0(PyDict_New());
-           PyTuple_SetItem(ret,0,ret0);
-           return ret;
-         }
-         
          PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
          {
            PyObject *ret0(MEDCoupling_MEDCouplingMesh_getTinySerializationInformation(self));
@@ -1140,28 +1195,148 @@ 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* getIndexArray() const;
-    DataArrayInt* getValueArray() const;
-      %extend 
+    
+    void deletePack(const int i, const int j) throw(INTERP_KERNEL::Exception);
+    
+    void deleteSimplePack(const int i) throw(INTERP_KERNEL::Exception);
+    void deleteSimplePacks(const DataArrayInt* idx) 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();
+      }
+      
+      DataArrayInt *getSuperIndexArray() const
+      {
+        DataArrayInt *ret(self->getSuperIndexArray());
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+      
+      DataArrayInt *getIndexArray() const
+      {
+        DataArrayInt *ret(self->getIndexArray());
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+      
+      DataArrayInt *getValuesArray() const
+      {
+        DataArrayInt *ret(self->getValuesArray());
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+     
+      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 replaceSimplePacks(const DataArrayInt* idx, PyObject *listePacks) throw(INTERP_KERNEL::Exception)
+        {
+          std::vector<const DataArrayInt*> packs;
+          convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt*>(listePacks,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",packs);
+          self->replaceSimplePacks(idx, packs);
+        }
+        
+      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;
+         } 
+    }
   };
 }
 
@@ -1203,6 +1378,7 @@ namespace MEDCoupling
       virtual void renumberNodesWithOffsetInConn(int offset) throw(INTERP_KERNEL::Exception);
       virtual bool areAllNodesFetched() const throw(INTERP_KERNEL::Exception);
       virtual MEDCouplingFieldDouble *computeDiameterField() const throw(INTERP_KERNEL::Exception);
+      virtual void invertOrientationOfAllCells() throw(INTERP_KERNEL::Exception);
       %extend 
          {
            std::string __str__() const throw(INTERP_KERNEL::Exception)
@@ -1242,7 +1418,7 @@ namespace MEDCoupling
            {
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildPartOfMySelf(tmp,tmp+szArr,keepCoords);
              if(sw==3)//DataArrayInt
                { 
@@ -1259,7 +1435,7 @@ namespace MEDCoupling
            {
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildPartOfMySelfNode(tmp,tmp+szArr,fullyIn);
              if(sw==3)//DataArrayInt
                { 
@@ -1276,7 +1452,7 @@ namespace MEDCoupling
            {
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoords(tmp,tmp+szArr);
              if(sw==3)//DataArrayInt
                { 
@@ -1299,7 +1475,7 @@ namespace MEDCoupling
            {
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildFacePartOfMySelfNode(tmp,tmp+szArr,fullyIn);
              if(sw==3)//DataArrayInt
                { 
@@ -1316,7 +1492,7 @@ namespace MEDCoupling
            {
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              self->renumberNodes(tmp,newNbOfNodes);
            }
 
@@ -1324,7 +1500,7 @@ namespace MEDCoupling
            {
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              self->renumberNodesCenter(tmp,newNbOfNodes);
            }
 
@@ -1336,8 +1512,8 @@ namespace MEDCoupling
                DataArrayDoubleTuple *aa,*aa2;
                std::vector<double> bb,bb2;
                int sw;
-               const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st paramater for point.";
-               const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd paramater for vector.";
+               const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st parameter for point.";
+               const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd parameter for vector.";
                const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
                const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
                std::vector<int> nodes;
@@ -1355,8 +1531,8 @@ namespace MEDCoupling
                DataArrayDoubleTuple *aa,*aa2;
                std::vector<double> bb,bb2;
                int sw;
-               const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st paramater for point.";
-               const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd paramater for vector.";
+               const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st parameter for point.";
+               const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd parameter for vector.";
                const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
                const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
                std::vector<int> nodes;
@@ -1441,7 +1617,7 @@ namespace MEDCoupling
              std::vector<int> multiVal;
              std::pair<int, std::pair<int,int> > slic;
              MEDCoupling::DataArrayInt *daIntTyypp=0;
-             convertObjToPossibleCpp2(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
+             convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
              switch(sw)
                {
                case 1:
@@ -1502,7 +1678,7 @@ namespace MEDCoupling
              //
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              self->fillCellIdsToKeepFromNodeIds(tmp,tmp+szArr,fullyIn,ret);
              return ret;
            }
@@ -1559,7 +1735,7 @@ namespace MEDCoupling
              std::pair<int, std::pair<int,int> > slic;
              MEDCoupling::DataArrayInt *daIntTyypp=0;
              int nbc=self->getNumberOfCells();
-             convertObjToPossibleCpp2(listOrDataArrI,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
+             convertIntStarOrSliceLikePyObjToCpp(listOrDataArrI,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
              switch(sw)
                {
                case 1:
@@ -1612,7 +1788,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 +1804,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 +1813,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 +1830,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 +1947,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 +1962,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 +1983,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);
@@ -1831,12 +2009,6 @@ namespace MEDCoupling
         return MEDCouplingUMesh::New(meshName,meshDim);
       }
 
-      // serialization
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCouplingUMesh");
-      }
-
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
         return self->simpleRepr();
@@ -1854,6 +2026,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();
@@ -1872,7 +2050,7 @@ namespace MEDCoupling
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         int nbc=self->getNumberOfCells();
-        convertObjToPossibleCpp2(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -1930,7 +2108,7 @@ namespace MEDCoupling
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         int nbc=self->getNumberOfCells();
-        convertObjToPossibleCpp2(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -1989,7 +2167,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         if(size>szArr)
           {
             std::ostringstream oss; oss << "Wrap of MEDCouplingUMesh::insertNextCell : request of connectivity with length " << size << " whereas the length of input is " << szArr << " !";
@@ -2002,7 +2180,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->insertNextCell(type,szArr,tmp);
       }
       
@@ -2025,7 +2203,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *seedPtr=convertObjToPossibleCpp1_Safe(seed,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *seedPtr=convertIntStarLikePyObjToCppIntStar(seed,sw,szArr,iTypppArr,stdvecTyyppArr);
         int nbOfDepthPeelingPerformed=0;
         DataArrayInt *ret0=MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(seedPtr,seedPtr+szArr,arrIn,arrIndxIn,nbOfDepthPeeling,nbOfDepthPeelingPerformed);
         PyObject *res=PyTuple_New(2);
@@ -2114,6 +2292,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;
@@ -2166,7 +2354,7 @@ namespace MEDCoupling
         std::vector<int> multiVal;
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
-        convertObjToPossibleCpp2(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2187,7 +2375,7 @@ namespace MEDCoupling
         std::vector<int> multiVal;
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
-        convertObjToPossibleCpp2(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2201,6 +2389,14 @@ namespace MEDCoupling
           }
       }
 
+      void attractSeg3MidPtsAroundNodes(double ratio, PyObject *nodeIds) throw(INTERP_KERNEL::Exception)
+      {
+        int szArr,sw,iTypppArr;
+        std::vector<int> stdvecTyyppArr;
+        const int *nodeIdsPtr(convertIntStarLikePyObjToCppIntStar(nodeIds,sw,szArr,iTypppArr,stdvecTyyppArr));
+        self->attractSeg3MidPtsAroundNodes(ratio,nodeIdsPtr,nodeIdsPtr+szArr);
+      }
+
       PyObject *getLevArrPerCellTypes(PyObject *li) const throw(INTERP_KERNEL::Exception)
       {
         int sz;
@@ -2284,7 +2480,7 @@ namespace MEDCoupling
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         if(!arrIndx)
           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::RemoveIdsFromIndexedArrays : null pointer as arrIndex !");
-        convertObjToPossibleCpp2(li,arrIndx->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndx->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2308,7 +2504,7 @@ namespace MEDCoupling
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         if(!arrIndxIn)
           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ExtractFromIndexedArrays : null pointer as arrIndxIn !");
-        convertObjToPossibleCpp2(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2350,13 +2546,12 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : the first param is not a pyslice !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sliC=reinterpret_cast<PySliceObject *>(slic);
         if(!arrIndxIn)
           throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : last array is null !");
         arrIndxIn->checkAllocated();
         if(arrIndxIn->getNumberOfComponents()!=1)
           throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : number of components of last argument must be equal to one !");
-        GetIndicesOfSlice(sliC,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step,"ExtractFromIndexedArraysSlice (wrap) : Invalid slice regarding nb of elements !");
+        GetIndicesOfSlice(slic,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step,"ExtractFromIndexedArraysSlice (wrap) : Invalid slice regarding nb of elements !");
         DataArrayInt *arrOut=0,*arrIndexOut=0;
         MEDCouplingUMesh::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
         PyObject *ret=PyTuple_New(2);
@@ -2377,7 +2572,7 @@ namespace MEDCoupling
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         if(!arrIndxIn)
           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::SetPartOfIndexedArrays : null pointer as arrIndex !");
-        convertObjToPossibleCpp2(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2414,7 +2609,7 @@ namespace MEDCoupling
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         if(!arrIndxIn)
           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx : null pointer as arrIndex !");
-        convertObjToPossibleCpp2(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2487,7 +2682,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 +2732,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 +2813,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;
@@ -2697,8 +2941,8 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
         int sw;
-        const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st paramater for origin.";
-        const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd paramater for vector.";
+        const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st parameter for origin.";
+        const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
         //
@@ -2720,8 +2964,8 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
         int sw;
-        const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st paramater for origin.";
-        const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd paramater for vector.";
+        const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st parameter for origin.";
+        const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
         //
@@ -2733,6 +2977,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 parameter for origin.";
+        const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd parameter 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();
@@ -2743,8 +3002,8 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
         int sw;
-        const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st paramater for origin.";
-        const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd paramater for vector.";
+        const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st parameter for origin.";
+        const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
         return self->getCellIdsCrossingPlane(orig,vect,eps);
@@ -2757,7 +3016,7 @@ namespace MEDCoupling
         std::vector<int> pos2;
         DataArrayInt *pos3=0;
         DataArrayIntTuple *pos4=0;
-        convertObjToPossibleCpp1(li,sw,pos1,pos2,pos3,pos4);
+        convertIntStarLikePyObjToCpp(li,sw,pos1,pos2,pos3,pos4);
         switch(sw)
           {
           case 1:
@@ -2780,7 +3039,7 @@ namespace MEDCoupling
           default:
             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertToPolyTypes : unexpected input array type recognized !");
           }
-      }
+      }      
     }
     void convertAllToPoly();
     void convertExtrudedPolyhedra() throw(INTERP_KERNEL::Exception);
@@ -2798,21 +3057,23 @@ 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()
+      MEDCouplingMappedExtrudedMesh(const MEDCouplingCMesh *mesh3D) throw(INTERP_KERNEL::Exception)
       {
-        return MEDCouplingMappedExtrudedMesh::New();
+        return MEDCouplingMappedExtrudedMesh::New(mesh3D);
       }
 
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
+      MEDCouplingMappedExtrudedMesh()
       {
-        return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCouplingMappedExtrudedMesh");
+        return MEDCouplingMappedExtrudedMesh::New();
       }
       
       std::string __str__() const throw(INTERP_KERNEL::Exception)
@@ -2868,7 +3129,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->insertNextCell(tmp,tmp+szArr);
       }
 
@@ -2919,11 +3180,6 @@ namespace MEDCoupling
         return MEDCoupling1SGTUMesh::New(m);
       }
 
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCoupling1SGTUMesh");
-      }
-
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
         return self->simpleRepr();
@@ -2991,11 +3247,6 @@ namespace MEDCoupling
         return MEDCoupling1DGTUMesh::New(m);
       }
 
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCoupling1DGTUMesh");
-      }
-
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
         return self->simpleRepr();
@@ -3115,7 +3366,7 @@ namespace MEDCoupling
         //
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp4=convertObjToPossibleCpp1_Safe(st,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp4=convertIntStarLikePyObjToCppIntStar(st,sw,szArr,iTypppArr,stdvecTyyppArr);
         std::vector<int> tmp5(tmp4,tmp4+szArr);
         //
         return MEDCouplingStructuredMesh::BuildExplicitIdsFrom(tmp5,inp);
@@ -3173,7 +3424,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         return MEDCouplingStructuredMesh::Build1GTNodalConnectivity(tmp,tmp+szArr);
       }
 
@@ -3181,7 +3432,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp(convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr));
+        const int *tmp(convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr));
         return MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh(tmp,tmp+szArr);
       }
 
@@ -3235,10 +3486,10 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         int szArr2,sw2,iTypppArr2;
         std::vector<int> stdvecTyyppArr2;
-        const int *tmp2=convertObjToPossibleCpp1_Safe(st,sw2,szArr2,iTypppArr2,stdvecTyyppArr2);
+        const int *tmp2=convertIntStarLikePyObjToCppIntStar(st,sw2,szArr2,iTypppArr2,stdvecTyyppArr2);
         std::vector<int> tmp3(tmp2,tmp2+szArr2);
         std::vector< std::pair<int,int> > partCompactFormat;
         bool ret0=MEDCouplingStructuredMesh::IsPartStructured(tmp,tmp+szArr,tmp3,partCompactFormat);
@@ -3340,11 +3591,6 @@ namespace MEDCoupling
       {
         return MEDCouplingCMesh::New(meshName);
       }
-      // serialization
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCouplingCMesh");
-      }
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
         return self->simpleRepr();
@@ -3384,10 +3630,6 @@ namespace MEDCoupling
       {
         return MEDCouplingCurveLinearMesh::New(meshName);
       }
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCouplingCurveLinearMesh");
-      }
       std::string __str__() const throw(INTERP_KERNEL::Exception) 
       {
         return self->simpleRepr();
@@ -3409,7 +3651,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(gridStruct,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(gridStruct,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->setNodeGridStructure(tmp,tmp+szArr);
       }
     }
@@ -3449,7 +3691,7 @@ namespace MEDCoupling
         const double *originPtr(0),*dxyzPtr(0);
         int sw,sz,val0;
         std::vector<int> bb0;
-        nodeStrctPtr=convertObjToPossibleCpp1_Safe(nodeStrct,sw,sz,val0,bb0);
+        nodeStrctPtr=convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0);
         //
         double val,val2;
         std::vector<double> bb,bb2;
@@ -3465,16 +3707,11 @@ namespace MEDCoupling
         return MEDCoupling_MEDCouplingIMesh_New__SWIG_1(meshName,spaceDim,nodeStrct,origin,dxyz);
       }
 
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCouplingIMesh");
-      }
-
       void setNodeStruct(PyObject *nodeStrct) throw(INTERP_KERNEL::Exception)
       {
         int sw,sz,val0;
         std::vector<int> bb0;
-        const int *nodeStrctPtr(convertObjToPossibleCpp1_Safe(nodeStrct,sw,sz,val0,bb0));
+        const int *nodeStrctPtr(convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0));
         self->setNodeStruct(nodeStrctPtr,nodeStrctPtr+sz);
       }
 
@@ -3561,8 +3798,6 @@ namespace MEDCoupling
   public:
     virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
     virtual bool areCompatibleForMerge(const MEDCouplingField *other) const throw(INTERP_KERNEL::Exception);
-    virtual bool isEqual(const MEDCouplingField *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
-    virtual bool isEqualWithoutConsideringStr(const MEDCouplingField *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
     virtual void copyTinyStringsFrom(const MEDCouplingField *other) throw(INTERP_KERNEL::Exception);
     void setMesh(const MEDCoupling::MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
     void setName(const char *name) throw(INTERP_KERNEL::Exception);
@@ -3608,18 +3843,6 @@ namespace MEDCoupling
         return convertIntArrToPyList3(ret);
       }
 
-      PyObject *isEqualIfNotWhy(const MEDCouplingField *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception)
-      {
-        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;
-      }
-
       PyObject *buildSubMeshData(PyObject *li) const throw(INTERP_KERNEL::Exception)
       {
         DataArrayInt *ret1=0;
@@ -3667,7 +3890,7 @@ namespace MEDCoupling
       {
         int sw,sz(-1);
         int v0; std::vector<int> v1;
-        const int *cellIdsBg(convertObjToPossibleCpp1_Safe(cellIds,sw,sz,v0,v1));
+        const int *cellIdsBg(convertIntStarLikePyObjToCppIntStar(cellIds,sw,sz,v0,v1));
         return self->computeTupleIdsToSelectFromCellIds(cellIdsBg,cellIdsBg+sz);
       }
 
@@ -3717,15 +3940,29 @@ namespace MEDCoupling
   {
   public:
     static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception);
+    static MEDCouplingFieldTemplate *New(const MEDCouplingFieldFloat& 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);
+    bool isEqual(const MEDCouplingFieldTemplate *other, double meshPrec) const throw(INTERP_KERNEL::Exception);
+    bool isEqualWithoutConsideringStr(const MEDCouplingFieldTemplate *other, double meshPrec) const throw(INTERP_KERNEL::Exception);
     %extend
        {
          MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception)
          {
            return MEDCouplingFieldTemplate::New(f);
          }
+
+         MEDCouplingFieldTemplate(const MEDCouplingFieldFloat& f) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDCouplingFieldTemplate::New(f);
+         }
+         
+         MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDCouplingFieldTemplate::New(f);
+         }
          
          MEDCouplingFieldTemplate(TypeOfField type) throw(INTERP_KERNEL::Exception)
          {
@@ -3743,14 +3980,45 @@ namespace MEDCoupling
            self->reprQuickOverview(oss);
            return oss.str();
          }
+
+         PyObject *isEqualIfNotWhy(const MEDCouplingFieldTemplate *other, double meshPrec) const throw(INTERP_KERNEL::Exception)
+         {
+           std::string ret1;
+           bool ret0=self->isEqualIfNotWhy(other,meshPrec,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;
+         }
        }
   };
+
+  template<class T>
+ class MEDCouplingFieldT : public MEDCoupling::MEDCouplingField
+  {
+  public:
+    TypeOfTimeDiscretization getTimeDiscretization() const throw(INTERP_KERNEL::Exception);
+  protected:
+    MEDCouplingFieldT();
+    ~MEDCouplingFieldT();
+  };
+
+  %template(MEDCouplingFieldTdouble) MEDCoupling::MEDCouplingFieldT<double>;
+  %template(MEDCouplingFieldTfloat) MEDCoupling::MEDCouplingFieldT<float>;
+  %template(MEDCouplingFieldTint) MEDCoupling::MEDCouplingFieldT<int>;
   
-  class MEDCouplingFieldDouble : public MEDCoupling::MEDCouplingField
+  class MEDCouplingFieldInt;
+  class MEDCouplingFieldFloat;
+  
+  class MEDCouplingFieldDouble : public MEDCouplingFieldT<double>
   {
   public:
     static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
     static MEDCouplingFieldDouble *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+    bool isEqual(const MEDCouplingFieldDouble *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
+    bool isEqualWithoutConsideringStr(const MEDCouplingFieldDouble *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
     void setTimeUnit(const std::string& unit);
     std::string getTimeUnit() const;
     void synchronizeTimeWithSupport() throw(INTERP_KERNEL::Exception);
@@ -3759,13 +4027,14 @@ 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);
+    MEDCouplingFieldFloat *convertToFloatField() const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
     MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const;
     MEDCouplingFieldDouble *deepCopy() const;
     MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCopy) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *nodeToCellDiscretization() const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *cellToNodeDiscretization() const throw(INTERP_KERNEL::Exception);
-    TypeOfTimeDiscretization getTimeDiscretization() const throw(INTERP_KERNEL::Exception);
     double getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
     double getIJK(int cellId, int nodeIdInCell, int compoId) const throw(INTERP_KERNEL::Exception);
     void synchronizeTimeWithMesh() throw(INTERP_KERNEL::Exception);
@@ -3867,6 +4136,43 @@ namespace MEDCoupling
         return oss.str();
       }
 
+      PyObject *isEqualIfNotWhy(const MEDCouplingFieldDouble *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception)
+      {
+        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;
+      }
+      
+      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)
       {
         DataArrayDouble *ret=self->getArray();
@@ -3929,7 +4235,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 +4243,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 +4277,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,41 +4329,41 @@ 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)
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberCells(tmp,check);
       }
       
@@ -4065,7 +4371,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberCellsWithoutMesh(tmp,check);
       }
       
@@ -4073,7 +4379,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberNodes(tmp,eps);
       }
 
@@ -4081,125 +4387,18 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberNodesWithoutMesh(tmp,newNbOfNodes,eps);
       }
 
       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)
@@ -4244,8 +4443,8 @@ namespace MEDCoupling
         std::vector<double> bb,bb2;
         int sw;
         int spaceDim=3;
-        const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st paramater for origin.";
-        const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd paramater for vector.";
+        const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st parameter for origin.";
+        const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
         //
@@ -4282,7 +4481,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4364,7 +4563,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4438,7 +4637,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4514,7 +4713,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4580,7 +4779,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4646,7 +4845,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4712,7 +4911,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4780,7 +4979,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -4838,156 +5037,22 @@ namespace MEDCoupling
 
       PyObject *getTinySerializationInformation() const throw(INTERP_KERNEL::Exception)
       {
-        std::vector<double> a0;
-        std::vector<int> a1;
-        std::vector<std::string> a2;
-        self->getTinySerializationDbleInformation(a0);
-        self->getTinySerializationIntInformation(a1);
-        self->getTinySerializationStrInformation(a2);
-        //
-        PyObject *ret(PyTuple_New(3));
-        PyTuple_SetItem(ret,0,convertDblArrToPyList2(a0));
-        PyTuple_SetItem(ret,1,convertIntArrToPyList2(a1));
-        int sz(a2.size());
-        PyObject *ret2(PyList_New(sz));
-        {
-          for(int i=0;i<sz;i++)
-            PyList_SetItem(ret2,i,PyString_FromString(a2[i].c_str()));
-        }
-        PyTuple_SetItem(ret,2,ret2);
-        return ret;
+        return field_getTinySerializationInformation<MEDCouplingFieldDouble>(self);
       }
       
       PyObject *serialize() const throw(INTERP_KERNEL::Exception)
       {
-        DataArrayInt *ret0(0);
-        std::vector<DataArrayDouble *> ret1;
-        self->serialize(ret0,ret1);
-        if(ret0)
-          ret0->incrRef();
-        std::size_t sz(ret1.size());
-        PyObject *ret(PyTuple_New(2));
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyObject *ret1Py(PyList_New(sz));
-        for(std::size_t i=0;i<sz;i++)
-          {
-            if(ret1[i])
-              ret1[i]->incrRef();
-            PyList_SetItem(ret1Py,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret1[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
-          }
-        PyTuple_SetItem(ret,1,ret1Py);
-        return ret;
-      }
-
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        static const char MSG[]="MEDCouplingFieldDouble.__new__ : the args in input is expected to be a tuple !";
-        if(!PyTuple_Check(args))
-          throw INTERP_KERNEL::Exception(MSG);
-        PyObject *builtinsd(PyEval_GetBuiltins());//borrowed
-        PyObject *obj(PyDict_GetItemString(builtinsd,"object"));//borrowed
-        PyObject *selfMeth(PyObject_GetAttrString(obj,"__new__"));
-        //
-        PyObject *tmp0(PyTuple_New(1));
-        PyTuple_SetItem(tmp0,0,cls); Py_XINCREF(cls);
-        PyObject *instance(PyObject_CallObject(selfMeth,tmp0));
-        Py_DECREF(tmp0);
-        Py_DECREF(selfMeth);
-        if(PyTuple_Size(args)==2 && PyDict_Check(PyTuple_GetItem(args,1)) && PyDict_Size(PyTuple_GetItem(args,1))==1 )
-          {// NOT general case. only true if in unpickeling context ! call __init__. Because for all other cases, __init__ is called right after __new__ !
-            PyObject *initMeth(PyObject_GetAttrString(instance,"__init__"));
-            ////
-            PyObject *a(PyInt_FromLong(0));
-            PyObject *uniqueElt(PyDict_GetItem(PyTuple_GetItem(args,1),a));
-            Py_DECREF(a);
-            if(!uniqueElt)
-              throw INTERP_KERNEL::Exception(MSG);
-            if(!PyTuple_Check(uniqueElt) || PyTuple_Size(uniqueElt)!=2)
-              throw INTERP_KERNEL::Exception(MSG);
-            PyObject *tmp2(PyObject_CallObject(initMeth,uniqueElt));
-            Py_XDECREF(tmp2);
-            ////
-            Py_DECREF(initMeth);
-          }
-        return instance;
-      }
-
-      PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
-      {// put an empty dict in input to say to __new__ to call __init__...
-        self->checkConsistencyLight();
-        PyObject *ret(PyTuple_New(1));
-        PyObject *ret0(PyDict_New());
-        {
-          PyObject *a(PyInt_FromLong(0)),*b(PyInt_FromLong(self->getTypeOfField())),*c(PyInt_FromLong(self->getTimeDiscretization()));
-          PyObject *d(PyTuple_New(2)); PyTuple_SetItem(d,0,b); PyTuple_SetItem(d,1,c);
-          PyDict_SetItem(ret0,a,d);
-          Py_DECREF(a); Py_DECREF(d);
-        }
-        PyTuple_SetItem(ret,0,ret0);
-        return ret;
+        return field_serialize<double>(self);
       }
 
       PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
       {
-        self->checkConsistencyLight();
-        PyObject *ret0(MEDCoupling_MEDCouplingFieldDouble_getTinySerializationInformation(self));
-        PyObject *ret1(MEDCoupling_MEDCouplingFieldDouble_serialize(self));
-        const MEDCouplingMesh *mesh(self->getMesh());
-        if(mesh)
-          mesh->incrRef();
-        PyObject *ret(PyTuple_New(3));
-        PyTuple_SetItem(ret,0,ret0);
-        PyTuple_SetItem(ret,1,ret1);
-        PyTuple_SetItem(ret,2,convertMesh(const_cast<MEDCouplingMesh *>(mesh),SWIG_POINTER_OWN | 0 ));
-        return ret;
+        return field__getstate__<MEDCouplingFieldDouble>(self,MEDCoupling_MEDCouplingFieldDouble_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldDouble_serialize);
       }
       
       void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
       {
-        static const char MSG[]="MEDCouplingFieldDouble.__setstate__ : expected input is a tuple of size 3 !";
-        if(!PyTuple_Check(inp))
-          throw INTERP_KERNEL::Exception(MSG);
-        int sz(PyTuple_Size(inp));
-        if(sz!=3)
-          throw INTERP_KERNEL::Exception(MSG);
-        // mesh
-        PyObject *elt2(PyTuple_GetItem(inp,2));
-        void *argp=0;
-        int status(SWIG_ConvertPtr(elt2,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingMesh,0|0));
-        if(!SWIG_IsOK(status))
-          throw INTERP_KERNEL::Exception(MSG);
-        self->setMesh(reinterpret_cast< const MEDCouplingUMesh * >(argp));
-        //
-        PyObject *elt0(PyTuple_GetItem(inp,0));
-        PyObject *elt1(PyTuple_GetItem(inp,1));
-        std::vector<double> a0;
-        std::vector<int> a1;
-        std::vector<std::string> a2;
-        DataArrayInt *b0(0);
-        std::vector<DataArrayDouble *>b1;
-        {
-          if(!PyTuple_Check(elt0) && PyTuple_Size(elt0)!=3)
-            throw INTERP_KERNEL::Exception(MSG);
-          PyObject *a0py(PyTuple_GetItem(elt0,0)),*a1py(PyTuple_GetItem(elt0,1)),*a2py(PyTuple_GetItem(elt0,2));
-          int tmp(-1);
-          fillArrayWithPyListDbl3(a0py,tmp,a0);
-          convertPyToNewIntArr3(a1py,a1);
-          fillStringVector(a2py,a2);
-        }
-        {
-          if(!PyTuple_Check(elt1) && PyTuple_Size(elt1)!=2)
-            throw INTERP_KERNEL::Exception(MSG);
-          PyObject *b0py(PyTuple_GetItem(elt1,0)),*b1py(PyTuple_GetItem(elt1,1));
-          void *argp(0);
-          int status(SWIG_ConvertPtr(b0py,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0));
-          if(!SWIG_IsOK(status))
-            throw INTERP_KERNEL::Exception(MSG);
-          b0=reinterpret_cast<DataArrayInt *>(argp);
-          convertFromPyObjVectorOfObj<MEDCoupling::DataArrayDouble *>(b1py,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",b1);
-        }
-        self->checkForUnserialization(a1,b0,b1);
-        // useless here to call resizeForUnserialization because arrays are well resized.
-        self->finishUnserialization(a1,a0,a2);
+        field__setstate__<double>(self,inp);
       }
     }
   };
@@ -5148,6 +5213,210 @@ namespace MEDCoupling
          }
        }
   };
+
+  class MEDCouplingFieldInt : 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 throw(INTERP_KERNEL::Exception);
+    bool isEqualWithoutConsideringStr(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const throw(INTERP_KERNEL::Exception);
+    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);
+      }
+
+      PyObject *isEqualIfNotWhy(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const throw(INTERP_KERNEL::Exception)
+      {
+        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 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;
+        }
+
+      PyObject *getTinySerializationInformation() const throw(INTERP_KERNEL::Exception)
+      {
+        return field_getTinySerializationInformation<MEDCouplingFieldInt>(self);
+      }
+      
+      PyObject *serialize() const throw(INTERP_KERNEL::Exception)
+      {
+        return field_serialize<int>(self);
+      }
+
+      PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
+      {
+        return field__getstate__<MEDCouplingFieldInt>(self,MEDCoupling_MEDCouplingFieldInt_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldInt_serialize);
+      }
+      
+      void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
+      {
+        field__setstate__<int>(self,inp);
+      }
+    }
+  };
+
+  class MEDCouplingFieldFloat : public MEDCouplingFieldT<float>
+  {
+  public:
+    static MEDCouplingFieldFloat *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+    static MEDCouplingFieldFloat *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+    bool isEqual(const MEDCouplingFieldFloat *other, double meshPrec, float valsPrec) const throw(INTERP_KERNEL::Exception);
+    bool isEqualWithoutConsideringStr(const MEDCouplingFieldFloat *other, double meshPrec, float valsPrec) const throw(INTERP_KERNEL::Exception);
+    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(DataArrayFloat *array) throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldFloat *deepCopy() const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldFloat *clone(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldFloat *cloneWithMesh(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldDouble *convertToDblField() const throw(INTERP_KERNEL::Exception);
+    MEDCouplingFieldFloat *buildSubPartRange(int begin, int end, int step) const throw(INTERP_KERNEL::Exception);
+    %extend {
+      MEDCouplingFieldFloat(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
+      {
+        return MEDCouplingFieldFloat::New(type,td);
+      }
+
+      MEDCouplingFieldFloat(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
+      {
+        return MEDCouplingFieldFloat::New(ft,td);
+      }
+
+      PyObject *isEqualIfNotWhy(const MEDCouplingFieldFloat *other, double meshPrec, float valsPrec) const throw(INTERP_KERNEL::Exception)
+      {
+        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 throw(INTERP_KERNEL::Exception)
+      {
+        return self->simpleRepr();
+      }
+
+      std::string __repr__() const throw(INTERP_KERNEL::Exception)
+      {
+        std::ostringstream oss;
+        self->reprQuickOverview(oss);
+        return oss.str();
+      }
+
+      MEDCouplingFieldFloat *buildSubPart(PyObject *li) const throw(INTERP_KERNEL::Exception)
+      {
+        return fieldT_buildSubPart(self,li);
+      }
+
+      MEDCouplingFieldFloat *__getitem__(PyObject *li) const throw(INTERP_KERNEL::Exception)
+      {
+        return fieldT__getitem__(self,li);
+      }
+
+      DataArrayFloat *getArray() throw(INTERP_KERNEL::Exception)
+      {
+        DataArrayFloat *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;
+      }
+
+      PyObject *getTinySerializationInformation() const throw(INTERP_KERNEL::Exception)
+      {
+        return field_getTinySerializationInformation<MEDCouplingFieldFloat>(self);
+      }
+      
+      PyObject *serialize() const throw(INTERP_KERNEL::Exception)
+      {
+        return field_serialize<float>(self);
+      }
+      
+      PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
+      {
+        return field__getstate__<MEDCouplingFieldFloat>(self,MEDCoupling_MEDCouplingFieldFloat_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldFloat_serialize);
+      }
+        
+      void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
+      {
+        field__setstate__<float>(self,inp);
+      }
+    }
+  };
   
   class MEDCouplingDefinitionTime
   {
@@ -5517,7 +5786,7 @@ namespace MEDCoupling
         const double *originPtr(0),*dxyzPtr(0);
         int sw,sz,val0;
         std::vector<int> bb0;
-        nodeStrctPtr=convertObjToPossibleCpp1_Safe(nodeStrct,sw,sz,val0,bb0);
+        nodeStrctPtr=convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0);
         //
         double val,val2;
         std::vector<double> bb,bb2;
@@ -5743,113 +6012,41 @@ 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 %{
+def MEDCouplingUMeshReduce(self):
+    return MEDCouplingStdReduceFunct,(MEDCouplingUMesh,((),(self.__getstate__()),))
+def MEDCouplingCMeshReduce(self):
+    return MEDCouplingStdReduceFunct,(MEDCouplingCMesh,((),(self.__getstate__()),))
+def MEDCouplingIMeshReduce(self):
+    return MEDCouplingStdReduceFunct,(MEDCouplingIMesh,((),(self.__getstate__()),))
+def MEDCouplingMappedExtrudedMeshReduce(self):
+    return MEDCouplingStdReduceFunct,(MEDCouplingMappedExtrudedMesh,((),(self.__getstate__()),))
+def MEDCouplingCurveLinearMeshReduce(self):
+    return MEDCouplingStdReduceFunct,(MEDCouplingCurveLinearMesh,((),(self.__getstate__()),))
+def MEDCoupling1SGTUMeshReduce(self):
+    return MEDCouplingStdReduceFunct,(MEDCoupling1SGTUMesh,((),(self.__getstate__()),))
+def MEDCoupling1DGTUMeshReduce(self):
+    return MEDCouplingStdReduceFunct,(MEDCoupling1DGTUMesh,((),(self.__getstate__()),))
+def MEDCouplingFieldDoubleReduce(self):
+    self.checkConsistencyLight()
+    d=(self.getTypeOfField(),self.getTimeDiscretization())
+    return MEDCouplingStdReduceFunct,(MEDCouplingFieldDouble,(d,(self.__getstate__()),))
+def MEDCouplingFieldIntReduce(self):
+    self.checkConsistencyLight()
+    d=(self.getTypeOfField(),self.getTimeDiscretization())
+    return MEDCouplingStdReduceFunct,(MEDCouplingFieldInt,(d,(self.__getstate__()),))
+def MEDCouplingFieldFloatReduce(self):
+    self.checkConsistencyLight()
+    d=(self.getTypeOfField(),self.getTimeDiscretization())
+    return MEDCouplingStdReduceFunct,(MEDCouplingFieldFloat,(d,(self.__getstate__()),))
+%}
+
 %pythoncode %{
 import os
 __filename=os.environ.get('PYTHONSTARTUP')
 if __filename and os.path.isfile(__filename):
-  execfile(__filename)
+  exec(open(__filename).read())
   pass
 %}