From d17ba8e196de78c3fdc5b01dd73c0f65990169a0 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 12 Apr 2013 08:14:45 +0000 Subject: [PATCH] bug MEDCouplingFieldDouble::applyFunc(nbOfComp,value) --- src/MEDCoupling_Swig/MEDCouplingBasicsTest.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 -- 2.39.2