From: ageay Date: Tue, 9 Apr 2013 14:47:57 +0000 (+0000) Subject: Extend operator __pow__ of MEDCouplingFieldDouble X-Git-Tag: V6_main_FINAL~174 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d80bf2625d4b6522af411eee29c4715e842822c;p=tools%2Fmedcoupling.git Extend operator __pow__ of MEDCouplingFieldDouble --- diff --git a/src/MEDCoupling_Swig/MEDCoupling.i b/src/MEDCoupling_Swig/MEDCoupling.i index 3c7aa96c5..9443f9b79 100644 --- a/src/MEDCoupling_Swig/MEDCoupling.i +++ b/src/MEDCoupling_Swig/MEDCoupling.i @@ -47,6 +47,9 @@ def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args): def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args): import _MEDCoupling return _MEDCoupling.MEDCouplingFieldDouble____idiv___(self, self, *args) +def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args): + import _MEDCoupling + return _MEDCoupling.MEDCouplingFieldDouble____ipow___(self, self, *args) def ParaMEDMEMDataArrayIntIadd(self,*args): import _MEDCoupling return _MEDCoupling.DataArrayInt____iadd___(self, self, *args) diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index f4e7f69b8..1c7efd9d4 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -3701,6 +3701,13 @@ namespace ParaMEDMEM return trueSelf; } + PyObject *___ipow___(PyObject *trueSelf, const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception) + { + *self^=other; + Py_XINCREF(trueSelf); + return trueSelf; + } + static MEDCouplingFieldDouble *MergeFields(PyObject *li) throw(INTERP_KERNEL::Exception) { std::vector tmp; diff --git a/src/MEDCoupling_Swig/MEDCouplingFinalize.i b/src/MEDCoupling_Swig/MEDCouplingFinalize.i index 4c2c9df4f..9a755af66 100644 --- a/src/MEDCoupling_Swig/MEDCouplingFinalize.i +++ b/src/MEDCoupling_Swig/MEDCouplingFinalize.i @@ -35,6 +35,7 @@ MEDCouplingFieldDouble.__iadd__=ParaMEDMEMMEDCouplingFieldDoubleIadd MEDCouplingFieldDouble.__isub__=ParaMEDMEMMEDCouplingFieldDoubleIsub MEDCouplingFieldDouble.__imul__=ParaMEDMEMMEDCouplingFieldDoubleImul MEDCouplingFieldDouble.__idiv__=ParaMEDMEMMEDCouplingFieldDoubleIdiv +MEDCouplingFieldDouble.__ipow__=ParaMEDMEMMEDCouplingFieldDoubleIpow DataArrayDoubleTuple.__iadd__=ParaMEDMEMDataArrayDoubleTupleIadd DataArrayDoubleTuple.__isub__=ParaMEDMEMDataArrayDoubleTupleIsub @@ -55,6 +56,7 @@ del ParaMEDMEMMEDCouplingFieldDoubleIadd del ParaMEDMEMMEDCouplingFieldDoubleIsub del ParaMEDMEMMEDCouplingFieldDoubleImul del ParaMEDMEMMEDCouplingFieldDoubleIdiv +del ParaMEDMEMMEDCouplingFieldDoubleIpow del ParaMEDMEMDataArrayIntIadd del ParaMEDMEMDataArrayIntIsub del ParaMEDMEMDataArrayIntImul diff --git a/src/MEDCoupling_Swig/MEDCouplingRemapper.i b/src/MEDCoupling_Swig/MEDCouplingRemapper.i index 77c762e85..cfb1129e1 100644 --- a/src/MEDCoupling_Swig/MEDCouplingRemapper.i +++ b/src/MEDCoupling_Swig/MEDCouplingRemapper.i @@ -122,6 +122,9 @@ def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args): def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args): import _MEDCouplingRemapper return _MEDCouplingRemapper.MEDCouplingFieldDouble____idiv___(self, self, *args) +def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args): + import _MEDCouplingRemapper + return _MEDCouplingRemapper.MEDCouplingFieldDouble____ipow___(self, self, *args) def ParaMEDMEMDataArrayIntIadd(self,*args): import _MEDCouplingRemapper return _MEDCouplingRemapper.DataArrayInt____iadd___(self, self, *args) diff --git a/src/MEDLoader/Swig/MEDLoader.i b/src/MEDLoader/Swig/MEDLoader.i index 47ebf737b..96e20f5aa 100644 --- a/src/MEDLoader/Swig/MEDLoader.i +++ b/src/MEDLoader/Swig/MEDLoader.i @@ -48,6 +48,9 @@ def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args): def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args): import _MEDLoader return _MEDLoader.MEDCouplingFieldDouble____idiv___(self, self, *args) +def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args): + import _MEDLoader + return _MEDLoader.MEDCouplingFieldDouble____ipow___(self, self, *args) def ParaMEDMEMDataArrayIntIadd(self,*args): import _MEDLoader return _MEDLoader.DataArrayInt____iadd___(self, self, *args) diff --git a/src/ParaMEDMEM_Swig/ParaMEDMEM.i b/src/ParaMEDMEM_Swig/ParaMEDMEM.i index 9eadcf2cf..7eebdf86d 100644 --- a/src/ParaMEDMEM_Swig/ParaMEDMEM.i +++ b/src/ParaMEDMEM_Swig/ParaMEDMEM.i @@ -298,6 +298,9 @@ def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args): def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args): import _ParaMEDMEM return _ParaMEDMEM.MEDCouplingFieldDouble____idiv___(self, self, *args) +def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args): + import _ParaMEDMEM + return _ParaMEDMEM.MEDCouplingFieldDouble____ipow___(self, self, *args) def ParaMEDMEMDataArrayIntIadd(self,*args): import _ParaMEDMEM return _ParaMEDMEM.DataArrayInt____iadd___(self, self, *args)