]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Memory leak in python in MEDCouplingFieldDiscretization::New OK_270513
authorageay <ageay>
Mon, 27 May 2013 13:32:13 +0000 (13:32 +0000)
committerageay <ageay>
Mon, 27 May 2013 13:32:13 +0000 (13:32 +0000)
src/MEDCoupling_Swig/MEDCouplingBasicsTest.py
src/MEDCoupling_Swig/MEDCouplingCommon.i

index 533763ecfa48e0926abc6431acb075437290cea2..233f3e06ff1a7b0650e5a51cea6484a063408c6f 100644 (file)
@@ -12645,6 +12645,11 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         a,b=m.distanceToPoint(pt)
         self.assertAlmostEqual(expectedDist,a,14)
         self.assertEqual(3,b)
+        #
+        fd=MEDCouplingFieldDiscretization.New(ON_CELLS)
+        self.assertEqual(24,fd.getNumberOfTuples(m))
+        fd=MEDCouplingFieldDiscretization.New(ON_NODES)
+        self.assertEqual(26,fd.getNumberOfTuples(m))
         pass
 
     def setUp(self):
index 713971291180315181f4daf74ae45da50c9cc3a9..aac8f18eab9e89f3a3c8b92dad984a7bf8dddee2 100644 (file)
@@ -94,6 +94,7 @@ using namespace INTERP_KERNEL;
 %feature("autodoc", "1");
 %feature("docstring");
 
+%newobject ParaMEDMEM::MEDCouplingFieldDiscretization::New;
 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::getOffsetArr;
 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::deepCpy;
 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::clone;