Salome HOME
Correction of bug on Cartesian and CurveLinear mesh when a profile on that mesh leads...
[modules/med.git] / src / MEDLoader / Swig / MEDLoaderCommon.i
index bdec8bc8982fd6fb71c18f0b7da739a571e4651c..e3812d0719669e04a541af30add87ef958b4cee9 100644 (file)
@@ -72,6 +72,7 @@ using namespace ParaMEDMEM;
 %newobject MEDLoader::ReadUMeshFromFamilies;
 %newobject MEDLoader::ReadUMeshFromGroups;
 %newobject MEDLoader::ReadUMeshFromFile;
+%newobject MEDLoader::ReadMeshFromFile;
 %newobject MEDLoader::ReadField;
 %newobject MEDLoader::ReadFieldCell;
 %newobject MEDLoader::ReadFieldNode;
@@ -104,6 +105,8 @@ using namespace ParaMEDMEM;
 %newobject ParaMEDMEM::MEDFileUMesh::getLevelM2Mesh;
 %newobject ParaMEDMEM::MEDFileUMesh::getLevelM3Mesh;
 %newobject ParaMEDMEM::MEDFileUMesh::getDirectUndergroundSingleGeoTypeMesh;
+%newobject ParaMEDMEM::MEDFileUMesh::extractFamilyFieldOnGeoType;
+%newobject ParaMEDMEM::MEDFileUMesh::extractNumberFieldOnGeoType;
 %newobject ParaMEDMEM::MEDFileUMesh::zipCoords;
 %newobject ParaMEDMEM::MEDFileCMesh::New;
 %newobject ParaMEDMEM::MEDFileCurveLinearMesh::New;
@@ -182,6 +185,7 @@ using namespace ParaMEDMEM;
 %newobject ParaMEDMEM::SauvReader::loadInMEDFileDS;
 
 %newobject ParaMEDMEM::MEDFileMeshStruct::New;
+%newobject ParaMEDMEM::MEDMeshMultiLev::prepare;
 %newobject ParaMEDMEM::MEDMeshMultiLev::buildDataArray;
 %newobject ParaMEDMEM::MEDFileFastCellSupportComparator::New;
 %newobject ParaMEDMEM::MEDFileFastCellSupportComparator::buildFromScratchDataSetSupport;
@@ -217,6 +221,8 @@ using namespace ParaMEDMEM;
 class MEDLoader
 {
 public:
+  static bool HasXDR();
+  static std::string MEDFileVersionStr();
   static void SetEpsilonForNodeComp(double val) throw(INTERP_KERNEL::Exception);
   static void SetCompPolicyForCell(int val) throw(INTERP_KERNEL::Exception);
   static void SetTooLongStrPolicy(int val) throw(INTERP_KERNEL::Exception);
@@ -233,8 +239,20 @@ public:
   static std::vector<std::string> GetCellFieldNamesOnMesh(const char *fileName, const char *meshName) throw(INTERP_KERNEL::Exception);
   static std::vector<std::string> GetNodeFieldNamesOnMesh(const char *fileName, const char *meshName) throw(INTERP_KERNEL::Exception);
   static double GetTimeAttachedOnFieldIteration(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static void AssignStaticWritePropertiesTo(ParaMEDMEM::MEDFileWritable& obj) throw(INTERP_KERNEL::Exception);
   %extend
      {
+       static PyObject *MEDFileVersion()
+       {
+         int major,minor,release;
+         MEDLoader::MEDFileVersion(major,minor,release);
+         PyObject *ret(PyTuple_New(3));
+         PyTuple_SetItem(ret,0,SWIG_From_int(major));
+         PyTuple_SetItem(ret,1,SWIG_From_int(minor));
+         PyTuple_SetItem(ret,2,SWIG_From_int(release));
+         return ret;
+       }
+
        static PyObject *GetFieldIterations(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, const char *fieldName) throw(INTERP_KERNEL::Exception)
        {
          std::vector< std::pair<int,int> > res=MEDLoader::GetFieldIterations(type,fileName,meshName,fieldName);
@@ -382,6 +400,8 @@ public:
          return MEDLoader::ReadUMeshFromFamilies(fileName,meshName,meshDimRelToMax,fams);
        }
      }
+  static ParaMEDMEM::MEDCouplingMesh *ReadMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingMesh *ReadMeshFromFile(const char *fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
   static int ReadUMeshDimFromFile(const char *fileName, const char *meshName) throw(INTERP_KERNEL::Exception);
@@ -390,6 +410,7 @@ public:
   static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
   static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
   static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static void WriteMesh(const char *fileName, const ParaMEDMEM::MEDCouplingMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
   static void WriteUMesh(const char *fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
   static void WriteUMeshDep(const char *fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
   static void WriteField(const char *fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
@@ -490,6 +511,9 @@ namespace ParaMEDMEM
     virtual void createGroupOnAll(int meshDimRelToMaxExt, const char *groupName) throw(INTERP_KERNEL::Exception);
     virtual bool keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
     void copyFamGrpMapsFrom(const MEDFileMesh& other) throw(INTERP_KERNEL::Exception);
+    void clearGrpMap() throw(INTERP_KERNEL::Exception);
+    void clearFamMap() throw(INTERP_KERNEL::Exception);
+    void clearFamGrpMaps() throw(INTERP_KERNEL::Exception);
     const std::map<std::string,int>& getFamilyInfo() const throw(INTERP_KERNEL::Exception);
     const std::map<std::string, std::vector<std::string> >& getGroupInfo() const throw(INTERP_KERNEL::Exception);
     std::vector<std::string> getFamiliesOnGroup(const char *name) const throw(INTERP_KERNEL::Exception);
@@ -705,6 +729,7 @@ namespace ParaMEDMEM
     MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
     MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
     MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
+    void forceComputationOfParts() const throw(INTERP_KERNEL::Exception);
     //
     void setFamilyNameAttachedOnId(int id, const std::string& newFamName) throw(INTERP_KERNEL::Exception);
     void setCoords(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
@@ -712,9 +737,12 @@ namespace ParaMEDMEM
     void addNodeGroup(const DataArrayInt *ids) throw(INTERP_KERNEL::Exception);
     void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids) throw(INTERP_KERNEL::Exception);
     void removeMeshAtLevel(int meshDimRelToMax) throw(INTERP_KERNEL::Exception);
+    void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m) throw(INTERP_KERNEL::Exception);
     void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false) throw(INTERP_KERNEL::Exception);
     void optimizeFamilies() throw(INTERP_KERNEL::Exception);
     DataArrayInt *zipCoords() throw(INTERP_KERNEL::Exception);
+    DataArrayInt *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
+    DataArrayInt *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
     %extend
        { 
          MEDFileUMesh(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
@@ -731,6 +759,16 @@ namespace ParaMEDMEM
          {
            return MEDFileUMesh::New();
          }
+
+         PyObject *getGeoTypesAtLevel(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception)
+         {
+           std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getGeoTypesAtLevel(meshDimRelToMax));
+           std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
+           PyObject *res=PyList_New(result.size());
+           for(int i=0;iL!=result.end(); i++, iL++)
+             PyList_SetItem(res,i,PyInt_FromLong(*iL));
+           return res;
+         }
          
          PyObject *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
          {
@@ -822,6 +860,7 @@ namespace ParaMEDMEM
     static MEDFileCMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileCMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     void setMesh(MEDCouplingCMesh *m) throw(INTERP_KERNEL::Exception);
+    int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
     %extend
        {
          MEDFileCMesh()
@@ -1316,7 +1355,7 @@ namespace ParaMEDMEM
     static MEDFileField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileField1TS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileField1TS *New();
-    ParaMEDMEM::MEDFileIntField1TS *convertToInt(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
+    ParaMEDMEM::MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
@@ -1450,7 +1489,7 @@ namespace ParaMEDMEM
     static MEDFileIntField1TS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
-    ParaMEDMEM::MEDFileField1TS *convertToDouble(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
+    ParaMEDMEM::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
     //
     void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception);
     void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
@@ -1898,12 +1937,19 @@ namespace ParaMEDMEM
       {
         std::vector<MEDFileAnyTypeFieldMultiTS *> vectFMTS;
         convertFromPyObjVectorOfObj<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS *>(li,SWIGTYPE_p_ParaMEDMEM__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",vectFMTS);
-        std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > ret=MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(vectFMTS,mesh);
+        std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> > ret2;
+        std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > ret=MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(vectFMTS,mesh,ret2);
+        if(ret2.size()!=ret.size())
+          {
+            std::ostringstream oss; oss << "MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport (PyWrap) : internal error ! Size of 2 vectors must match ! (" << ret.size() << "!=" << ret2.size() << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
         std::size_t sz=ret.size();
         PyObject *retPy=PyList_New(sz);
         for(std::size_t i=0;i<sz;i++)
           {
             std::size_t sz2=ret[i].size();
+            PyObject *ret0Py=PyTuple_New(2);
             PyObject *ret1Py=PyList_New(sz2);
             for(std::size_t j=0;j<sz2;j++)
               {
@@ -1912,7 +1958,9 @@ namespace ParaMEDMEM
                   elt->incrRef();
                 PyList_SetItem(ret1Py,j,convertMEDFileFieldMultiTS(elt,SWIG_POINTER_OWN | 0 ));
               }
-            PyList_SetItem(retPy,i,ret1Py);
+            PyTuple_SetItem(ret0Py,0,ret1Py);
+            PyTuple_SetItem(ret0Py,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret2[i].retn()),SWIGTYPE_p_ParaMEDMEM__MEDFileFastCellSupportComparator, SWIG_POINTER_OWN | 0 ));
+            PyList_SetItem(retPy,i,ret0Py);
           }
         return retPy;
       }
@@ -1934,7 +1982,7 @@ namespace ParaMEDMEM
     //
     void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
     void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
-    ParaMEDMEM::MEDFileIntFieldMultiTS *convertToInt(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
+    ParaMEDMEM::MEDFileIntFieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
     %extend
        {
          MEDFileFieldMultiTS()
@@ -2065,7 +2113,7 @@ namespace ParaMEDMEM
     //
     void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception);
     void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
-    ParaMEDMEM::MEDFileFieldMultiTS *convertToDouble(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
+    ParaMEDMEM::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
     %extend
     {
       MEDFileIntFieldMultiTS()
@@ -2772,6 +2820,13 @@ namespace ParaMEDMEM
   public:
     static SauvReader* New(const char *fileName) throw(INTERP_KERNEL::Exception);
     MEDFileData * loadInMEDFileDS() throw(INTERP_KERNEL::Exception);
+    %extend
+    {
+      SauvReader(const char *fileName) throw(INTERP_KERNEL::Exception)
+      {
+        return SauvReader::New(fileName);
+      }
+    }
   };
 
   class SauvWriter : public RefCountObject
@@ -2780,6 +2835,15 @@ namespace ParaMEDMEM
     static SauvWriter * New();
     void setMEDFileDS(const MEDFileData* medData, unsigned meshIndex = 0) throw(INTERP_KERNEL::Exception);
     void write(const char* fileName) throw(INTERP_KERNEL::Exception);
+    void setCpyGrpIfOnASingleFamilyStatus(bool status) throw(INTERP_KERNEL::Exception);
+    bool getCpyGrpIfOnASingleFamilyStatus() const throw(INTERP_KERNEL::Exception);
+    %extend
+    {
+      SauvWriter() throw(INTERP_KERNEL::Exception)
+      {
+        return SauvWriter::New();
+      }
+    }
   };
   
   ///////////////
@@ -2789,28 +2853,84 @@ namespace ParaMEDMEM
   class MEDFileField1TSStructItem
   {
   public:
-    static MEDFileField1TSStructItem BuildItemFrom(const MEDFileAnyTypeField1TS *ref, const MEDFileMeshStruct *meshSt);
+    static MEDFileField1TSStructItem BuildItemFrom(const MEDFileAnyTypeField1TS *ref, const MEDFileMeshStruct *meshSt) throw(INTERP_KERNEL::Exception);
   };
 
   class MEDFileMeshStruct : public RefCountObject
   {
   public:
-    static MEDFileMeshStruct *New(const MEDFileMesh *mesh);
-  private:
+    static MEDFileMeshStruct *New(const MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception);
+  protected:
     ~MEDFileMeshStruct();
   };
   
   class MEDMeshMultiLev : public RefCountObject
   {
   public:
+    virtual MEDMeshMultiLev *prepare() const throw(INTERP_KERNEL::Exception);
     DataArray *buildDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const throw(INTERP_KERNEL::Exception);
-  private:
+  protected:
     ~MEDMeshMultiLev();
+  public:
+    %extend
+    {
+      PyObject *retrieveFamilyIdsOnCells() const throw(INTERP_KERNEL::Exception)
+      {
+        DataArrayInt *famIds(0);
+        bool isWithoutCopy(false);
+        self->retrieveFamilyIdsOnCells(famIds,isWithoutCopy);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
+        Py_XINCREF(ret1Py);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,ret1Py);
+        return ret;
+      }
+
+      PyObject *retrieveNumberIdsOnCells() const throw(INTERP_KERNEL::Exception)
+      {
+        DataArrayInt *numIds(0);
+        bool isWithoutCopy(false);
+        self->retrieveNumberIdsOnCells(numIds,isWithoutCopy);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
+        Py_XINCREF(ret1Py);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,ret1Py);
+        return ret;
+      }
+      
+      PyObject *retrieveFamilyIdsOnNodes() const throw(INTERP_KERNEL::Exception)
+      {
+        DataArrayInt *famIds(0);
+        bool isWithoutCopy(false);
+        self->retrieveFamilyIdsOnNodes(famIds,isWithoutCopy);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
+        Py_XINCREF(ret1Py);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,ret1Py);
+        return ret;
+      }
+
+      PyObject *retrieveNumberIdsOnNodes() const throw(INTERP_KERNEL::Exception)
+      {
+        DataArrayInt *numIds(0);
+        bool isWithoutCopy(false);
+        self->retrieveNumberIdsOnNodes(numIds,isWithoutCopy);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
+        Py_XINCREF(ret1Py);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,ret1Py);
+        return ret;
+      }
+    }
   };
 
   class MEDUMeshMultiLev : public MEDMeshMultiLev
   {
-  private:
+  protected:
     ~MEDUMeshMultiLev();
   public:
     %extend
@@ -2818,14 +2938,17 @@ namespace ParaMEDMEM
        PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
        {
          DataArrayDouble *coords(0); DataArrayByte *types(0); DataArrayInt *cellLocations(0),*cells(0),*faceLocations(0),*faces(0);
-         self->buildVTUArrays(coords,types,cellLocations,cells,faceLocations,faces);
-         PyObject *ret=PyTuple_New(6);
-         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(coords),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(types),SWIGTYPE_p_ParaMEDMEM__DataArrayByte, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(cellLocations),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cells),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(faceLocations),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(faces),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+         bool ncc(self->buildVTUArrays(coords,types,cellLocations,cells,faceLocations,faces));
+         PyObject *ret0Py=ncc?Py_True:Py_False;
+         Py_XINCREF(ret0Py);
+         PyObject *ret=PyTuple_New(7);
+         PyTuple_SetItem(ret,0,ret0Py);
+         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(coords),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(types),SWIGTYPE_p_ParaMEDMEM__DataArrayByte, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellLocations),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(cells),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(faceLocations),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(faces),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
          return ret;
        }
      }
@@ -2833,24 +2956,30 @@ namespace ParaMEDMEM
 
   class MEDStructuredMeshMultiLev : public MEDMeshMultiLev
   {
-  private:
+  protected:
     ~MEDStructuredMeshMultiLev();
   };
 
   class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
   {
-  private:
+  protected:
     ~MEDCMeshMultiLev();
   public:
     %extend
     {
       PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
       {
-        std::vector< DataArrayDouble * > objs(self->buildVTUArrays());
+       bool isInternal;
+        std::vector< DataArrayDouble * > objs(self->buildVTUArrays(isInternal));
         std::size_t sz(objs.size());
-        PyObject *ret=PyList_New(sz);
+       PyObject *ret(PyTuple_New(2));
+        PyObject *ret0=PyList_New(sz);
         for(std::size_t i=0;i<sz;i++)
-          PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(objs[i]),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
+          PyList_SetItem(ret0,i,SWIG_NewPointerObj(SWIG_as_voidptr(objs[i]),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
+       PyTuple_SetItem(ret,0,ret0);
+       PyObject *ret1Py(isInternal?Py_True:Py_False);
+       Py_XINCREF(ret1Py);
+       PyTuple_SetItem(ret,1,ret1Py);
         return ret;
       }
     }
@@ -2858,23 +2987,27 @@ namespace ParaMEDMEM
 
   class MEDCurveLinearMeshMultiLev : public MEDStructuredMeshMultiLev
   {
-  private:
+  protected:
     ~MEDCurveLinearMeshMultiLev();
   public:
     %extend
     {
-      PyObject *buildVTUArrays(DataArrayDouble *&coords, std::vector<int>& nodeStrct) const throw(INTERP_KERNEL::Exception)
+      PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
       {
         DataArrayDouble *ret0(0);
         std::vector<int> ret1;
-        self->buildVTUArrays(ret0,ret1);
+       bool ret2;
+        self->buildVTUArrays(ret0,ret1,ret2);
         std::size_t sz(ret1.size());
-        PyObject *ret=PyTuple_New(2);
+        PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
         PyObject *ret1Py=PyList_New(sz);
         for(std::size_t i=0;i<sz;i++)
           PyList_SetItem(ret1Py,i,SWIG_From_int(ret1[i]));
         PyTuple_SetItem(ret,1,ret1Py);
+       PyObject *ret2Py(ret2?Py_True:Py_False);
+       Py_XINCREF(ret2Py);
+       PyTuple_SetItem(ret,2,ret2Py);
         return ret;
       }
     }
@@ -2886,7 +3019,7 @@ namespace ParaMEDMEM
     static MEDFileFastCellSupportComparator *New(const MEDFileMeshStruct *m, const MEDFileAnyTypeFieldMultiTS *ref) throw(INTERP_KERNEL::Exception);
     MEDMeshMultiLev *buildFromScratchDataSetSupport(int timeStepId, const MEDFileFieldGlobsReal *globs) const throw(INTERP_KERNEL::Exception);
     bool isDataSetSupportEqualToThePreviousOne(int timeStepId, const MEDFileFieldGlobsReal *globs) const throw(INTERP_KERNEL::Exception);
-  private:
+  protected:
     ~MEDFileFastCellSupportComparator();
   };
 }