%include std_vector.i
%include std_string.i
+#ifdef USE_PYTHON3
+#define PyInt_AS_LONG PyLong_AS_LONG
+#endif
+
%{
#include "MEDCouplingMemArray.hxx"
#include "MEDCouplingUMesh.hxx"
%newobject MEDCoupling::MEDCouplingFieldDouble::__add__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__sub__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__mul__;
+#ifdef USE_PYTHON3
+%newobject MEDCoupling::MEDCouplingFieldDouble::__truediv__;
+#else
%newobject MEDCoupling::MEDCouplingFieldDouble::__div__;
+#endif
%newobject MEDCoupling::MEDCouplingFieldDouble::__pow__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__radd__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__rsub__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__rmul__;
+#ifdef USE_PYTHON3
+%newobject MEDCoupling::MEDCouplingFieldDouble::__rtruediv__;
+#else
%newobject MEDCoupling::MEDCouplingFieldDouble::__rdiv__;
+#endif
%newobject MEDCoupling::MEDCouplingFieldDouble::clone;
%newobject MEDCoupling::MEDCouplingFieldDouble::cloneWithMesh;
%newobject MEDCoupling::MEDCouplingFieldDouble::deepCopy;
return MEDCoupling_MEDCouplingFieldDouble___rmul__Impl(self,obj);
}
+#ifdef USE_PYTHON3
+ MEDCouplingFieldDouble *__truediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
MEDCouplingFieldDouble *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__div__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
const char msg2[]="in MEDCouplingFieldDouble.__div__ : self field has no Array of values set !";
}
}
+#ifdef USE_PYTHON3
+ MEDCouplingFieldDouble *__rtruediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
MEDCouplingFieldDouble *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
return MEDCoupling_MEDCouplingFieldDouble___rdiv__Impl(self,obj);
}
}
}
+#ifdef USE_PYTHON3
+ PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__idiv__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
const char msg2[]="in MEDCouplingFieldDouble.__idiv__ : self field has no Array of values set !";
%newobject MEDCoupling::DataArrayInt::__rsub__;
%newobject MEDCoupling::DataArrayInt::__mul__;
%newobject MEDCoupling::DataArrayInt::__rmul__;
+#ifdef USE_PYTHON3
+%newobject MEDCoupling::DataArrayInt::__truediv__;
+%newobject MEDCoupling::DataArrayInt::__rtruediv__;
+#else
%newobject MEDCoupling::DataArrayInt::__div__;
%newobject MEDCoupling::DataArrayInt::__rdiv__;
+#endif
%newobject MEDCoupling::DataArrayInt::__mod__;
%newobject MEDCoupling::DataArrayInt::__rmod__;
%newobject MEDCoupling::DataArrayInt::__pow__;
%newobject MEDCoupling::DataArrayDouble::__radd__;
%newobject MEDCoupling::DataArrayDouble::__rsub__;
%newobject MEDCoupling::DataArrayDouble::__rmul__;
+#ifdef USE_PYTHON3
+%newobject MEDCoupling::DataArrayDouble::__rtruediv__;
+#else
%newobject MEDCoupling::DataArrayDouble::__rdiv__;
+#endif
%newobject MEDCoupling::DataArrayDouble::__pow__;
%newobject MEDCoupling::DataArrayDouble::__rpow__;
%newobject MEDCoupling::DataArrayDoubleTuple::buildDADouble;
}
}
+#ifdef USE_PYTHON3
+ PyObject *__truediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
PyObject *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+ #endif
{
const char msg[]="Unexpected situation in __div__ !";
double val;
}
}
+#ifdef USE_PYTHON3
+ DataArrayDouble *__rtruediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
DataArrayDouble *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
const char msg[]="Unexpected situation in __rdiv__ !";
double val;
}
}
+#ifdef USE_PYTHON3
+ PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
const char msg[]="Unexpected situation in __idiv__ !";
double val;
return trueSelf;
}
+#ifdef USE_PYTHON3
+ PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
MCAuto<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
MEDCoupling_DataArrayDouble____idiv___(ret,0,obj);
}
}
+#ifdef USE_PYTHON3
+ DataArrayInt *__truediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
DataArrayInt *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
const char msg[]="Unexpected situation in __div__ !";
int val;
}
}
+#ifdef USE_PYTHON3
+ DataArrayInt *__rtruediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
DataArrayInt *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
const char msg[]="Unexpected situation in __rdiv__ !";
int val;
}
}
+#ifdef USE_PYTHON3
+ PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
const char msg[]="Unexpected situation in __idiv__ !";
int val;
return trueSelf;
}
+#ifdef USE_PYTHON3
+ PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+#endif
{
MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
MEDCoupling_DataArrayInt____idiv___(ret,0,obj);