From: ageay Date: Thu, 12 Apr 2012 09:01:11 +0000 (+0000) Subject: Python examples X-Git-Tag: V6_5_0a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a761c5462923fc49b667806be966e69789b86f8d;p=tools%2Fmedcoupling.git Python examples --- diff --git a/src/MEDCoupling_Swig/MEDCouplingExamplesTest.py b/src/MEDCoupling_Swig/MEDCouplingExamplesTest.py index 2164c4fcb..ad328820c 100644 --- a/src/MEDCoupling_Swig/MEDCouplingExamplesTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingExamplesTest.py @@ -33,11 +33,11 @@ class MEDCouplingBasicsTest(unittest.TestCase): arr1=[3.,103.,4.,104.,5.,105.,6.,106.,7.,107.] array.setValues(arr1,mesh1.getNumberOfCells(),2) f1.setArray(array) -## ! [PySnippetFieldDoubleBuildSubPart1_1] -## ! [PySnippetFieldDoubleBuildSubPart1_2] +# ! [PySnippetFieldDoubleBuildSubPart1_1] +# ! [PySnippetFieldDoubleBuildSubPart1_2] part1=[2,1,4] f2=f1.buildSubPart(part1) -## ! [PySnippetFieldDoubleBuildSubPart1_2] +# ! [PySnippetFieldDoubleBuildSubPart1_2] f2.zipCoords() self.failUnlessEqual(3,f2.getNumberOfTuples()) self.failUnlessEqual(2,f2.getNumberOfComponents()) @@ -60,7 +60,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): expected4=[0,4,8,13] self.failUnlessEqual(expected4,list(m2C.getNodalConnectivityIndex().getValues())) # Test with field on nodes. -## ! [PySnippetFieldDoubleBuildSubPart1_3] +# ! [PySnippetFieldDoubleBuildSubPart1_3] f1=MEDCouplingFieldDouble.New(ON_NODES,ONE_TIME) f1.setTime(2.3,5,6) f1.setMesh(mesh1) @@ -68,11 +68,11 @@ class MEDCouplingBasicsTest(unittest.TestCase): arr2=[3.,103.,4.,104.,5.,105.,6.,106.,7.,107.,8.,108.,9.,109.,10.,110.,11.,111.] array.setValues(arr2,mesh1.getNumberOfNodes(),2) f1.setArray(array) -## ! [PySnippetFieldDoubleBuildSubPart1_3] -## ! [PySnippetFieldDoubleBuildSubPart1_4] +# ! [PySnippetFieldDoubleBuildSubPart1_3] +# ! [PySnippetFieldDoubleBuildSubPart1_4] part2=[1,2] f2=f1.buildSubPart(part2) -## ! [PySnippetFieldDoubleBuildSubPart1_4] +# ! [PySnippetFieldDoubleBuildSubPart1_4] self.failUnlessEqual(4,f2.getNumberOfTuples()) self.failUnlessEqual(2,f2.getNumberOfComponents()) expected5=[4.,104.,5.,105.,7.,107.,8.,108.]