# Diff of /trunk/finley/test/python/GradTest.py

revision 427 by jgs, Wed Nov 9 02:02:19 2005 UTC revision 428 by gross, Wed Jan 11 01:38:16 2006 UTC
# Line 85  for dim in [2,3]: Line 85  for dim in [2,3]:
85
86         test="error gradient in interior (degrees of freedom)"         test="error gradient in interior (degrees of freedom)"
87
88         x=n.getX()[0:2].interpolate(d)         x=interpolate(n.getX()[0:2],d)
90         ref=order*x[0]**(order-1)*m00+m01+order*x[1]**(order-1)*m11         ref=order*x[0]**(order-1)*m00+m01+order*x[1]**(order-1)*m11
91         error_norm=Lsup(ref-g)/Lsup(ref)         error_norm=Lsup(ref-g)/Lsup(ref)
# Line 103  for dim in [2,3]: Line 103  for dim in [2,3]:
103
104         test="error gradient in interior (reduced degrees of freedom)"         test="error gradient in interior (reduced degrees of freedom)"
105
106         x=n.getX()[0:2].interpolate(r)         x=interpolate(n.getX()[0:2],r)
108         ref=Scalar(1,what=r)*m00+m01+Scalar(1,what=r)*m11         ref=Scalar(1,what=r)*m00+m01+Scalar(1,what=r)*m11
109         error_norm=Lsup(ref-g)/Lsup(ref)         error_norm=Lsup(ref-g)/Lsup(ref)
# Line 159  for dim in [2,3]: Line 159  for dim in [2,3]:
159
160            test="error gradient on boundary (degrees of freedom)"            test="error gradient on boundary (degrees of freedom)"
161
162            x=n.getX()[0:2].interpolate(d)            x=interpolate(n.getX()[0:2],d)
164            x=f.getX()[0:2]            x=f.getX()[0:2]
165            ref=order*x[0]**(order-1)*m00+m01+order*x[1]**(order-1)*m11            ref=order*x[0]**(order-1)*m00+m01+order*x[1]**(order-1)*m11
# Line 178  for dim in [2,3]: Line 178  for dim in [2,3]:
178
179            test="error gradient on boundary (reduced degrees of freedom)"            test="error gradient on boundary (reduced degrees of freedom)"
180
181            x=n.getX()[0:2].interpolate(r)            x=interpolate(n.getX()[0:2],r)