From: ageay Date: Fri, 12 Apr 2013 08:14:45 +0000 (+0000) Subject: bug MEDCouplingFieldDouble::applyFunc(nbOfComp,value) X-Git-Tag: V6_main_FINAL~154 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d17ba8e196de78c3fdc5b01dd73c0f65990169a0;p=tools%2Fmedcoupling.git bug MEDCouplingFieldDouble::applyFunc(nbOfComp,value) --- diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index c758d43ba..bc1b857ad 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -12516,6 +12516,25 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertTrue(f[-2:0:-1,0].getArray().isEqual(arr[[11,12,13,6,7,8,9,10,2,3,4,5],0],1e-12)) pass + def testSwig2FieldDoubleApplyFuncBug1(self): + f=MEDCouplingFieldDouble(ON_CELLS) + f.setMesh(MEDCouplingDataForTest.build2DTargetMesh_1()) + f.applyFunc(3,700.) + f.checkCoherency() + self.assertEqual(3,f.getArray().getNumberOfComponents()) + f.getArray().rearrange(1) + self.assertTrue(f.getArray().isUniform(700.,1e-10)) + f.getArray().rearrange(3) + f.checkCoherency() + f.applyFunc(4,800.) + f.checkCoherency() + self.assertEqual(4,f.getArray().getNumberOfComponents()) + f.getArray().rearrange(1) + self.assertTrue(f.getArray().isUniform(800.,1e-10)) + f.getArray().rearrange(4) + f.checkCoherency() + pass + def setUp(self): pass pass