Salome HOME
Full synchronisation of patches across levels.
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingTypemaps.i
index f0382c2cda99b332ce87ee14b0a34554a92da26d..edae657420af39cda5f371fb23b187166d6d4cb6 100644 (file)
@@ -85,6 +85,56 @@ static PyObject* convertMultiFields(ParaMEDMEM::MEDCouplingMultiFields *mfs, int
   return ret;
 }
 
+static PyObject *convertCartesianAMRMesh(ParaMEDMEM::MEDCouplingCartesianAMRMeshGen *mesh, int owner) throw(INTERP_KERNEL::Exception)
+{
+  if(!mesh)
+    {
+      Py_XINCREF(Py_None);
+      return Py_None;
+    }
+  if(dynamic_cast<ParaMEDMEM::MEDCouplingCartesianAMRMeshSub *>(mesh))
+    {
+      return SWIG_NewPointerObj(reinterpret_cast<void*>(mesh),SWIGTYPE_p_ParaMEDMEM__MEDCouplingCartesianAMRMeshSub,owner);
+    }
+  if(dynamic_cast<ParaMEDMEM::MEDCouplingCartesianAMRMesh *>(mesh))
+    {
+      return SWIG_NewPointerObj(reinterpret_cast<void*>(mesh),SWIGTYPE_p_ParaMEDMEM__MEDCouplingCartesianAMRMesh,owner);
+    }
+  throw INTERP_KERNEL::Exception("convertCartesianAMRMesh wrap : unrecognized type of cartesian AMR mesh !");
+}
+
+static PyObject *convertDataForGodFather(ParaMEDMEM::MEDCouplingDataForGodFather *data, int owner) throw(INTERP_KERNEL::Exception)
+{
+  if(!data)
+    {
+      Py_XINCREF(Py_None);
+      return Py_None;
+    }
+  if(dynamic_cast<ParaMEDMEM::MEDCouplingAMRAttribute *>(data))
+    {
+      return SWIG_NewPointerObj(reinterpret_cast<void*>(data),SWIGTYPE_p_ParaMEDMEM__MEDCouplingAMRAttribute,owner);
+    }
+  throw INTERP_KERNEL::Exception("convertDataForGodFather wrap : unrecognized data type for AMR !");
+}
+
+static PyObject *convertCartesianAMRPatch(ParaMEDMEM::MEDCouplingCartesianAMRPatchGen *patch, int owner) throw(INTERP_KERNEL::Exception)
+{
+  if(!patch)
+    {
+      Py_XINCREF(Py_None);
+      return Py_None;
+    }
+  if(dynamic_cast<ParaMEDMEM::MEDCouplingCartesianAMRPatchGF *>(patch))
+    {
+      return SWIG_NewPointerObj(reinterpret_cast<void*>(patch),SWIGTYPE_p_ParaMEDMEM__MEDCouplingCartesianAMRPatchGF,owner);
+    }
+  if(dynamic_cast<ParaMEDMEM::MEDCouplingCartesianAMRPatch *>(patch))
+    {
+      return SWIG_NewPointerObj(reinterpret_cast<void*>(patch),SWIGTYPE_p_ParaMEDMEM__MEDCouplingCartesianAMRPatch,owner);
+    }
+  throw INTERP_KERNEL::Exception("convertCartesianAMRPatch wrap : unrecognized type of cartesian AMR patch !");
+}
+
 static ParaMEDMEM::MEDCouplingFieldDouble *ParaMEDMEM_MEDCouplingFieldDouble___add__Impl(ParaMEDMEM::MEDCouplingFieldDouble *self, PyObject *obj) throw(INTERP_KERNEL::Exception)
 {
   const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__add__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";