/[escript]/branches/symbolic_from_3470/dudley/test/python/run_escriptOnDudley.py
ViewVC logotype

Diff of /branches/symbolic_from_3470/dudley/test/python/run_escriptOnDudley.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3517 by caltinay, Fri May 20 01:16:41 2011 UTC revision 3609 by caltinay, Wed Sep 21 04:48:06 2011 UTC
# Line 57  class Test_DomainOnDudley(Test_Domain): Line 57  class Test_DomainOnDudley(Test_Domain):
57     def test_tagsContinuousFunction(self):     def test_tagsContinuousFunction(self):
58         ref_tags=[0]         ref_tags=[0]
59         tags=ContinuousFunction(self.domain).getListOfTags()         tags=ContinuousFunction(self.domain).getListOfTags()
60         self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")         self.assertTrue(len(tags)==len(ref_tags), "tags list has wrong length.")
61         for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)         for i in ref_tags: self.assertTrue(i in tags,"tag %s is missing."%i)
62    
63     def test_tagsFunction(self):     def test_tagsFunction(self):
64         ref_tags=[0]         ref_tags=[0]
65         tags=Function(self.domain).getListOfTags()         tags=Function(self.domain).getListOfTags()
66         self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")         self.assertTrue(len(tags)==len(ref_tags), "tags list has wrong length.")
67         for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)         for i in ref_tags: self.assertTrue(i in tags,"tag %s is missing."%i)
68     def test_tagsReducedFunction(self):     def test_tagsReducedFunction(self):
69         ref_tags=[0]         ref_tags=[0]
70         tags=ReducedFunction(self.domain).getListOfTags()         tags=ReducedFunction(self.domain).getListOfTags()
71         self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")         self.assertTrue(len(tags)==len(ref_tags), "tags list has wrong length.")
72         for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)         for i in ref_tags: self.assertTrue(i in tags,"tag %s is missing."%i)
73     def test_tagsFunctionOnBoundary(self):     def test_tagsFunctionOnBoundary(self):
74         ref_tags=[1, 2, 10, 20]         ref_tags=[1, 2, 10, 20]
75         tags=FunctionOnBoundary(self.domain).getListOfTags()         tags=FunctionOnBoundary(self.domain).getListOfTags()
76         # For an MPI-distributed domain some tags may be missing         # For an MPI-distributed domain some tags may be missing
77         if getMPISizeWorld() == 1: self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")         if getMPISizeWorld() == 1: self.assertTrue(len(tags)==len(ref_tags), "tags list has wrong length.")
78         for i in tags: self.failUnless(i in ref_tags,"tag %s is missing."%i)         for i in tags: self.assertTrue(i in ref_tags,"tag %s is missing."%i)
79     def test_tagsReducedFunctionOnBoundary(self):     def test_tagsReducedFunctionOnBoundary(self):
80         ref_tags=[1, 2, 10, 20]         ref_tags=[1, 2, 10, 20]
81         tags=ReducedFunctionOnBoundary(self.domain).getListOfTags()         tags=ReducedFunctionOnBoundary(self.domain).getListOfTags()
82         # For an MPI-distributed domain some tags may be missing         # For an MPI-distributed domain some tags may be missing
83         if getMPISizeWorld() == 1: self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")         if getMPISizeWorld() == 1: self.assertTrue(len(tags)==len(ref_tags), "tags list has wrong length.")
84         for i in tags: self.failUnless(i in ref_tags,"tag %s is missing."%i)         for i in tags: self.assertTrue(i in ref_tags,"tag %s is missing."%i)
85    
86  class Test_DataOpsOnDudley(Test_Dump, Test_SetDataPointValue, Test_GlobalMinMax, Test_Lazy):  class Test_DataOpsOnDudley(Test_Dump, Test_SetDataPointValue, Test_GlobalMinMax, Test_Lazy):
87     def setUp(self):     def setUp(self):
# Line 108  class Test_TableInterpolationOnDudley(Te Line 108  class Test_TableInterpolationOnDudley(Te
108      self.domain=Brick(4,4,4)      self.domain=Brick(4,4,4)
109      self.functionspaces=[ContinuousFunction(self.domain), Function(self.domain), ReducedFunction(self.domain),      self.functionspaces=[ContinuousFunction(self.domain), Function(self.domain), ReducedFunction(self.domain),
110          FunctionOnBoundary(self.domain), ReducedFunctionOnBoundary(self.domain)]          FunctionOnBoundary(self.domain), ReducedFunctionOnBoundary(self.domain)]
111          #We aren't testing DiracDeltaFunction          #We aren't testing DiracDeltaFunctions
112      self.xn=5   # number of grids on x axis      self.xn=5   # number of grids on x axis
113      self.yn=5   # number of grids on y axis      self.yn=5   # number of grids on y axis
114      self.zn=5      self.zn=5
# Line 135  class Test_CSVOnDudley(Test_saveCSV): Line 135  class Test_CSVOnDudley(Test_saveCSV):
135      fname=os.path.join(DUDLEY_WORKDIR, "test_singlefs.csv")      fname=os.path.join(DUDLEY_WORKDIR, "test_singlefs.csv")
136      fss=[ContinuousFunction(self.domain), Function(self.domain), ReducedFunction(self.domain),      fss=[ContinuousFunction(self.domain), Function(self.domain), ReducedFunction(self.domain),
137      FunctionOnBoundary(self.domain), ReducedFunctionOnBoundary(self.domain),      FunctionOnBoundary(self.domain), ReducedFunctionOnBoundary(self.domain),
138      DiracDeltaFunction(self.domain)]      DiracDeltaFunctions(self.domain)]
139      for f in fss:      for f in fss:
140          d=Data(7,f)          d=Data(7,f)
141          print "Testing "+str(f)+"\n"          print "Testing "+str(f)+"\n"
# Line 146  class Test_CSVOnDudley(Test_saveCSV): Line 146  class Test_CSVOnDudley(Test_saveCSV):
146      sol=Data(8,Solution(self.domain))      sol=Data(8,Solution(self.domain))
147      ctsfn=Data(9,ContinuousFunction(self.domain))      ctsfn=Data(9,ContinuousFunction(self.domain))
148      #test line 0      #test line 0
149      dirac=Data(-1,DiracDeltaFunction(self.domain))      dirac=Data(-1,DiracDeltaFunctions(self.domain))
150      saveDataCSV(fname, A=sol, B=ctsfn, C=dirac)      saveDataCSV(fname, A=sol, B=ctsfn, C=dirac)
151      #test line 1      #test line 1
152      fun=Data(5,Function(self.domain))      fun=Data(5,Function(self.domain))

Legend:
Removed from v.3517  
changed lines
  Added in v.3609

  ViewVC Help
Powered by ViewVC 1.1.26