Salome HOME
Now deal with Cylindric, Spheric coordinates for UMesh, CLMesh, And only Cylindric...
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderTypemaps.i
index eaf4e491bd74e3cd89486bc049f587f50ed73e3b..5a415a6857b915e91902d17325a1df11cbc8548a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -102,8 +102,8 @@ static PyObject *convertMEDMeshMultiLev(ParaMEDMEM::MEDMeshMultiLev *p, int owne
     ret=SWIG_NewPointerObj((void*)p,SWIGTYPE_p_ParaMEDMEM__MEDUMeshMultiLev,owner);
   if(dynamic_cast<MEDCMeshMultiLev *>(p))
     ret=SWIG_NewPointerObj((void*)p,SWIGTYPE_p_ParaMEDMEM__MEDCMeshMultiLev,owner);
-  if(dynamic_cast<MEDStructuredMeshMultiLev *>(p))
-    ret=SWIG_NewPointerObj((void*)p,SWIGTYPE_p_ParaMEDMEM__MEDStructuredMeshMultiLev,owner);
+  if(dynamic_cast<MEDCurveLinearMeshMultiLev *>(p))
+    ret=SWIG_NewPointerObj((void*)p,SWIGTYPE_p_ParaMEDMEM__MEDCurveLinearMeshMultiLev,owner);
   if(!ret)
     throw INTERP_KERNEL::Exception("Not recognized type of MEDMeshMultiLev on downcast !");
   return ret;
@@ -310,7 +310,7 @@ int MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(const MEDFileAnyTypeFieldMultiTS
 {
   if(elt0 && PyInt_Check(elt0))
     {//fmts[3]
-      return PyInt_AS_LONG(elt0);
+      return InterpreteNegativeInt(PyInt_AS_LONG(elt0),self->getNumberOfTS());
     }
   else if(elt0 && PyTuple_Check(elt0))
     {
@@ -347,7 +347,7 @@ int MEDFileFieldsgetitemSingleTS__(const MEDFileFields *self, PyObject *obj) thr
 {
   if(PyInt_Check(obj))
     {
-      return (int)PyInt_AS_LONG(obj);
+      return InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfFields());
     }
   else if(PyString_Check(obj))
     {