]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Update py wrapping consecutively to new pickle implementation
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 17 Oct 2017 06:03:15 +0000 (08:03 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 17 Oct 2017 06:24:39 +0000 (08:24 +0200)
Conflicts:
src/MEDCalculator/Swig/MEDCalculator.i

src/MEDCalculator/Swig/MEDCalculator.i
src/MEDCouplingCorba_Swig/Client/MEDCouplingClient.i
src/MEDCouplingCorba_Swig/MEDCouplingCorba.i
src/MEDCouplingCorba_Swig/TestMEDCouplingCorbaClt.py

index c0aa77c0c5ff417560bcdcdafd54fff26643ab9a..adaebc43a90efbdcbd5d8927b5bc65ea86905baa 100644 (file)
@@ -314,9 +314,6 @@ namespace MEDCoupling
 }
 
 %pythoncode %{
-def MEDCouplingDataArrayDoublenew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.DataArrayDouble____new___(cls,args)
 def MEDCouplingDataArrayDoubleIadd(self,*args):
     import _MEDCalculator
     return _MEDCalculator.DataArrayDouble____iadd___(self, self, *args)
@@ -344,9 +341,6 @@ def MEDCouplingDataArrayDoubleTupleImul(self,*args):
 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
     import _MEDCalculator
     return _MEDCalculator.DataArrayDoubleTuple____idiv___(self, self, *args)
-def MEDCouplingFieldDoublenew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCouplingFieldDouble____new___(cls,args)
 def MEDCouplingFieldDoubleIadd(self,*args):
     import _MEDCalculator
     return _MEDCalculator.MEDCouplingFieldDouble____iadd___(self, self, *args)
@@ -362,12 +356,6 @@ def MEDCouplingFieldDoubleIdiv(self,*args):
 def MEDCouplingFieldDoubleIpow(self,*args):
     import _MEDCalculator
     return _MEDCalculator.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def MEDCouplingDataArrayBytenew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.DataArrayByte____new___(cls,args)
-def MEDCouplingDataArrayIntnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.DataArrayInt____new___(cls,args)
 def MEDCouplingDataArrayIntIadd(self,*args):
     import _MEDCalculator
     return _MEDCalculator.DataArrayInt____iadd___(self, self, *args)
@@ -407,39 +395,14 @@ def ParaMEDMEMDenseMatrixIadd(self,*args):
 def ParaMEDMEMDenseMatrixIsub(self,*args):
     import _MEDCalculator
     return _MEDCalculator.DenseMatrix____isub___(self, self, *args)
-def MEDCouplingUMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCouplingUMesh____new___(cls,args)
-def MEDCoupling1DGTUMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCoupling1DGTUMesh____new___(cls,args)
-def MEDCoupling1SGTUMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCoupling1SGTUMesh____new___(cls,args)
-def MEDCouplingCurveLinearMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCouplingCurveLinearMesh____new___(cls,args)
-def MEDCouplingCMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCouplingCMesh____new___(cls,args)
-def MEDCouplingIMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCouplingIMesh____new___(cls,args)
-def MEDCouplingExtrudedMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDCouplingMappedExtrudedMesh____new___(cls,args)
-%}
-
-%pythoncode %{
-def ParaMEDMEMMEDFileUMeshnew(cls,*args):
-    import _MEDCalculator
-    return _MEDCalculator.MEDFileUMesh____new___(cls,args)
 %}
 
 %include "MEDCouplingFinalize.i"
 
 %pythoncode %{
 MEDCalculatorDBFieldReal.__rtruediv__ = MEDCalculatorDBFieldReal.__rdiv__
-MEDFileUMesh.__new__=classmethod(ParaMEDMEMMEDFileUMeshnew)
-del ParaMEDMEMMEDFileUMeshnew
+def MEDCouplingMEDFileUMeshReduce(self):
+  return MEDCouplingStdReduceFunct,(MEDFileUMesh,((),(self.__getstate__()),))
+MEDFileUMesh.__reduce__=MEDCouplingMEDFileUMeshReduce
+del MEDCouplingMEDFileUMeshReduce
 %}
index 10fa8e5ab9a1aa72322bbc5139fd946d644d9397..33e2263674e658677e92a748cbc908fa15ce50e4 100644 (file)
@@ -565,9 +565,6 @@ namespace MEDCoupling
 }
 
 %pythoncode %{
-def MEDCouplingDataArrayDoublenew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.DataArrayDouble____new___(cls,args)
 def MEDCouplingDataArrayDoubleIadd(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.DataArrayDouble____iadd___(self, self, *args)
@@ -583,15 +580,6 @@ def MEDCouplingDataArrayDoubleIdiv(self,*args):
 def MEDCouplingDataArrayDoubleIpow(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.DataArrayDouble____ipow___(self, self, *args)
-def MEDCouplingFieldIntnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingFieldInt____new___(cls,args)
-def MEDCouplingFieldFloatnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingFieldFloat____new___(cls,args)
-def MEDCouplingFieldDoublenew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingFieldDouble____new___(cls,args)
 def MEDCouplingFieldDoubleIadd(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.MEDCouplingFieldDouble____iadd___(self, self, *args)
@@ -607,9 +595,6 @@ def MEDCouplingFieldDoubleIdiv(self,*args):
 def MEDCouplingFieldDoubleIpow(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def MEDCouplingDataArrayIntnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.DataArrayInt____new___(cls,args)
 def MEDCouplingDataArrayIntIadd(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.DataArrayInt____iadd___(self, self, *args)
@@ -628,12 +613,6 @@ def MEDCouplingDataArrayIntImod(self,*args):
 def MEDCouplingDataArrayIntIpow(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.DataArrayInt____ipow___(self, self, *args)
-def MEDCouplingDataArrayBytenew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.DataArrayByte____new___(cls,args)
-def MEDCouplingDataArrayFloatnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.DataArrayFloat____new___(cls,args)
 def MEDCouplingDataArrayFloatIadd(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.DataArrayFloat____iadd___(self, self, *args)
@@ -679,27 +658,6 @@ def ParaMEDMEMDenseMatrixIadd(self,*args):
 def ParaMEDMEMDenseMatrixIsub(self,*args):
     import _MEDCouplingClient
     return _MEDCouplingClient.DenseMatrix____isub___(self, self, *args)
-def MEDCouplingUMeshnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingUMesh____new___(cls,args)
-def MEDCoupling1DGTUMeshnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCoupling1DGTUMesh____new___(cls,args)
-def MEDCoupling1SGTUMeshnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCoupling1SGTUMesh____new___(cls,args)
-def MEDCouplingCurveLinearMeshnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingCurveLinearMesh____new___(cls,args)
-def MEDCouplingCMeshnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingCMesh____new___(cls,args)
-def MEDCouplingIMeshnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingIMesh____new___(cls,args)
-def MEDCouplingExtrudedMeshnew(cls,*args):
-    import _MEDCouplingClient
-    return _MEDCouplingClient.MEDCouplingMappedExtrudedMesh____new___(cls,args)
 %}
 
 %include "MEDCouplingFinalize.i"
index a5e7aa5efb04318bac0dbfd815c576b093d75b55..848bdefb39d301315568b74dfb622d3c0ef2f21e 100644 (file)
@@ -315,9 +315,6 @@ namespace MEDCoupling
 }
 
 %pythoncode %{
-def MEDCouplingDataArrayDoublenew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.DataArrayDouble____new___(cls,args)
 def MEDCouplingDataArrayDoubleIadd(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayDouble____iadd___(self, self, *args)
@@ -333,15 +330,6 @@ def MEDCouplingDataArrayDoubleIdiv(self,*args):
 def MEDCouplingDataArrayDoubleIpow(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayDouble____ipow___(self, self, *args)
-def MEDCouplingFieldIntnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingFieldInt____new___(cls,args)
-def MEDCouplingFieldFloatnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingFieldFloat____new___(cls,args)
-def MEDCouplingFieldDoublenew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingFieldDouble____new___(cls,args)
 def MEDCouplingFieldDoubleIadd(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.MEDCouplingFieldDouble____iadd___(self, self, *args)
@@ -357,9 +345,6 @@ def MEDCouplingFieldDoubleIdiv(self,*args):
 def MEDCouplingFieldDoubleIpow(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def MEDCouplingDataArrayIntnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.DataArrayInt____new___(cls,args)
 def MEDCouplingDataArrayIntIadd(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayInt____iadd___(self, self, *args)
@@ -378,12 +363,6 @@ def MEDCouplingDataArrayIntImod(self,*args):
 def MEDCouplingDataArrayIntIpow(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayInt____ipow___(self, self, *args)
-def MEDCouplingDataArrayBytenew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.DataArrayByte____new___(cls,args)
-def MEDCouplingDataArrayFloatnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.DataArrayFloat____new___(cls,args)
 def MEDCouplingDataArrayFloatIadd(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayFloat____iadd___(self, self, *args)
@@ -429,27 +408,6 @@ def ParaMEDMEMDenseMatrixIadd(self,*args):
 def ParaMEDMEMDenseMatrixIsub(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DenseMatrix____isub___(self, self, *args)
-def MEDCouplingUMeshnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingUMesh____new___(cls,args)
-def MEDCoupling1DGTUMeshnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCoupling1DGTUMesh____new___(cls,args)
-def MEDCoupling1SGTUMeshnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCoupling1SGTUMesh____new___(cls,args)
-def MEDCouplingCurveLinearMeshnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingCurveLinearMesh____new___(cls,args)
-def MEDCouplingCMeshnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingCMesh____new___(cls,args)
-def MEDCouplingIMeshnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingIMesh____new___(cls,args)
-def MEDCouplingExtrudedMeshnew(cls,*args):
-    import _MEDCouplingCorba
-    return _MEDCouplingCorba.MEDCouplingMappedExtrudedMesh____new___(cls,args)
 %}
 
 %include "MEDCouplingFinalize.i"
index 861f231057f32e2dd0818b985f44e00de232428c..0efa840214c19bd4286ad4bac75638aad6a91e35 100644 (file)
@@ -300,7 +300,7 @@ class MEDCouplingCorbaServBasicsTestClt(unittest.TestCase):
         fieldPtr.UnRegister();
         test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
         refField=test.buildFieldTemplateCellOn2D();
-        self.assertTrue(fieldCpp.isEqual(refField,1.e-12,1.e-15));
+        self.assertTrue(fieldCpp.isEqual(refField,1.e-12));
         pass
     
     def testCorbaFieldTemplateNodeOn2D(self):
@@ -309,7 +309,7 @@ class MEDCouplingCorbaServBasicsTestClt(unittest.TestCase):
         fieldPtr.UnRegister();
         test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
         refField=test.buildFieldTemplateNodeOn2D();
-        self.assertTrue(fieldCpp.isEqual(refField,1.e-12,1.e-15));
+        self.assertTrue(fieldCpp.isEqual(refField,1.e-12));
         pass
     
     def testCorbaFieldTemplateGaussPtOn2D(self):
@@ -318,7 +318,7 @@ class MEDCouplingCorbaServBasicsTestClt(unittest.TestCase):
         fieldPtr.UnRegister();
         test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
         refField=test.buildFieldTemplateGaussPtOn2D();
-        self.assertTrue(fieldCpp.isEqual(refField,1.e-12,1.e-15));
+        self.assertTrue(fieldCpp.isEqual(refField,1.e-12));
         pass
     
     def testCorbaFieldTemplateGaussNEOn2D(self):
@@ -327,7 +327,7 @@ class MEDCouplingCorbaServBasicsTestClt(unittest.TestCase):
         fieldPtr.UnRegister();
         test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
         refField=test.buildFieldTemplateGaussNEOn2D();
-        self.assertTrue(fieldCpp.isEqual(refField,1.e-12,1.e-15));
+        self.assertTrue(fieldCpp.isEqual(refField,1.e-12));
         pass
 
     def testCorbaMultiFields1(self):