/[escript]/trunk/escript/test/python/test_util_spatial_functions.py
ViewVC logotype

Diff of /trunk/escript/test/python/test_util_spatial_functions.py

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

revision 1170 by gross, Tue Mar 27 06:21:02 2007 UTC revision 1171 by gross, Fri May 25 06:55:05 2007 UTC
# Line 56  class Test_Util_SpatialFunctions_noGradO Line 56  class Test_Util_SpatialFunctions_noGradO
56       x=f.getX()       x=f.getX()
57       ref=Vector(0.,what=f)       ref=Vector(0.,what=f)
58       if dim==3:       if dim==3:
59           ref+=whereZero(x[0]-1.,tol=self.RES_TOL)*[1,0,0]           ref.setTaggedValue(200,[1,0,0])
60           ref+=whereZero(x[0],tol=self.RES_TOL)*[-1,0,0]           ref.setTaggedValue(100,[-1,0,0])
61           ref+=whereZero(x[1]-1.,tol=self.RES_TOL)*[0,1,0]           ref.setTaggedValue(20,[0,1,0])
62           ref+=whereZero(x[1],tol=self.RES_TOL)*[0,-1,0]           ref.setTaggedValue(10,[0,-1,0])
63           ref+=whereZero(x[2]-1.,tol=self.RES_TOL)*[0,0,1]           ref.setTaggedValue(2,[0,0,1])
64           ref+=whereZero(x[2],tol=self.RES_TOL)*[0,0,-1]           ref.setTaggedValue(1,[0,0,-1])
65       else:       else:
66           ref+=whereZero(x[0]-1.,tol=self.RES_TOL)*[1,0]           ref.setTaggedValue(2,[1,0])
67           ref+=whereZero(x[0],tol=self.RES_TOL)*[-1,0]           ref.setTaggedValue(1,[-1,0])
68           ref+=whereZero(x[1]-1.,tol=self.RES_TOL)*[0,1]           ref.setTaggedValue(20, [0,1])
69           ref+=whereZero(x[1],tol=self.RES_TOL)*[0,-1]           ref.setTaggedValue(10, [0,-1])
70    
71       res=f.getNormal()       res=f.getNormal()
72       self.failUnlessEqual(res.getShape(),(dim,),"wrong shape of result.")       self.failUnlessEqual(res.getShape(),(dim,),"wrong shape of result.")
# Line 84  class Test_Util_SpatialFunctions_noGradO Line 84  class Test_Util_SpatialFunctions_noGradO
84       x=f.getX()       x=f.getX()
85       ref=Vector(0.,what=f)       ref=Vector(0.,what=f)
86       if dim==3:       if dim==3:
87           ref+=whereZero(x[0]-1.,tol=self.RES_TOL)*[1,0,0]           ref.setTaggedValue(200,[1,0,0])
88           ref+=whereZero(x[0],tol=self.RES_TOL)*[-1,0,0]           ref.setTaggedValue(100,[-1,0,0])
89           ref+=whereZero(x[1]-1.,tol=self.RES_TOL)*[0,1,0]           ref.setTaggedValue(20,[0,1,0])
90           ref+=whereZero(x[1],tol=self.RES_TOL)*[0,-1,0]           ref.setTaggedValue(10,[0,-1,0])
91           ref+=whereZero(x[2]-1.,tol=self.RES_TOL)*[0,0,1]           ref.setTaggedValue(2,[0,0,1])
92           ref+=whereZero(x[2],tol=self.RES_TOL)*[0,0,-1]           ref.setTaggedValue(1,[0,0,-1])
93       else:       else:
94           ref+=whereZero(x[0]-1.,tol=self.RES_TOL)*[1,0]           ref.setTaggedValue(2,[1,0])
95           ref+=whereZero(x[0],tol=self.RES_TOL)*[-1,0]           ref.setTaggedValue(1,[-1,0])
96           ref+=whereZero(x[1]-1.,tol=self.RES_TOL)*[0,1]           ref.setTaggedValue(20, [0,1])
97           ref+=whereZero(x[1],tol=self.RES_TOL)*[0,-1]           ref.setTaggedValue(10, [0,-1])
98    
99       res=f.getNormal()       res=f.getNormal()
100       self.failUnlessEqual(res.getShape(),(dim,),"wrong shape of result.")       self.failUnlessEqual(res.getShape(),(dim,),"wrong shape of result.")

Legend:
Removed from v.1170  
changed lines
  Added in v.1171

  ViewVC Help
Powered by ViewVC 1.1.26