Salome HOME
22612: [CEA 1189] sauv2med should not change faces orientation
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderCommon.i
index c88e65e157052c3d6df7f8b2c9a1b4b8731d2fed..5c3c7c81150c9ed0e928a1dadbad6074b10befb3 100644 (file)
@@ -93,6 +93,7 @@ using namespace ParaMEDMEM;
 %newobject ParaMEDMEM::MEDFileMesh::getNodeFamiliesArr;
 %newobject ParaMEDMEM::MEDFileMesh::getAllFamiliesIdsReferenced;
 %newobject ParaMEDMEM::MEDFileMesh::computeAllFamilyIdsInUse;
+%newobject ParaMEDMEM::MEDFileStructuredMesh::getImplicitFaceMesh;
 %newobject ParaMEDMEM::MEDFileUMesh::New;
 %newobject ParaMEDMEM::MEDFileUMesh::getCoords;
 %newobject ParaMEDMEM::MEDFileUMesh::getGroup;
@@ -492,6 +493,9 @@ namespace ParaMEDMEM
     void setTimeUnit(const std::string& unit);
     std::string getTimeUnit() const;
     virtual int getNumberOfNodes() const throw(INTERP_KERNEL::Exception);
+    virtual bool hasImplicitPart() const throw(INTERP_KERNEL::Exception);
+    virtual int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
+    virtual void releaseImplicitPartIfAny() const throw(INTERP_KERNEL::Exception);
     virtual std::vector<int> getFamArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
     virtual std::vector<int> getNumArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
     virtual std::vector<int> getNameArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
@@ -861,6 +865,17 @@ namespace ParaMEDMEM
 
   class MEDFileStructuredMesh : public MEDFileMesh
   {
+  public:
+    %extend
+    {
+      MEDCoupling1SGTUMesh *getImplicitFaceMesh() const throw(INTERP_KERNEL::Exception)
+      {
+        MEDCoupling1SGTUMesh *ret(self->getImplicitFaceMesh());
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+    }
   };
 
   class MEDFileCMesh : public MEDFileStructuredMesh
@@ -2236,6 +2251,7 @@ namespace ParaMEDMEM
     MEDFileAnyTypeFieldMultiTS *getFieldWithName(const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
     MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const std::string& meshName) const throw(INTERP_KERNEL::Exception);
     void destroyFieldAtPos(int i) throw(INTERP_KERNEL::Exception);
+    bool removeFieldsWithoutAnyTimeStep() throw(INTERP_KERNEL::Exception);
     %extend
        {
          MEDFileFields()
@@ -2825,7 +2841,7 @@ namespace ParaMEDMEM
   {
   public:
     static SauvReader* New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
-    MEDFileData * loadInMEDFileDS() throw(INTERP_KERNEL::Exception);
+    MEDFileData * loadInMEDFileDS(bool fix2DOri=false) throw(INTERP_KERNEL::Exception);
     %extend
     {
       SauvReader(const std::string& fileName) throw(INTERP_KERNEL::Exception)
@@ -2985,17 +3001,17 @@ namespace ParaMEDMEM
     {
       PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
       {
-       bool isInternal;
+        bool isInternal;
         std::vector< DataArrayDouble * > objs(self->buildVTUArrays(isInternal));
         std::size_t sz(objs.size());
-       PyObject *ret(PyTuple_New(2));
+        PyObject *ret(PyTuple_New(2));
         PyObject *ret0=PyList_New(sz);
         for(std::size_t i=0;i<sz;i++)
           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);
+        PyTuple_SetItem(ret,0,ret0);
+        PyObject *ret1Py(isInternal?Py_True:Py_False);
+        Py_XINCREF(ret1Py);
+        PyTuple_SetItem(ret,1,ret1Py);
         return ret;
       }
     }
@@ -3012,7 +3028,7 @@ namespace ParaMEDMEM
       {
         DataArrayDouble *ret0(0);
         std::vector<int> ret1;
-       bool ret2;
+        bool ret2;
         self->buildVTUArrays(ret0,ret1,ret2);
         std::size_t sz(ret1.size());
         PyObject *ret=PyTuple_New(3);
@@ -3021,9 +3037,9 @@ namespace ParaMEDMEM
         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);
+        PyObject *ret2Py(ret2?Py_True:Py_False);
+        Py_XINCREF(ret2Py);
+        PyTuple_SetItem(ret,2,ret2Py);
         return ret;
       }
     }