/[escript]/trunk/finley/test/python/GradTest.py
ViewVC logotype

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

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

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)
89         g=grad(x**order+x[1]*[1,0])         g=grad(x**order+x[1]*[1,0])
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)
107         g=grad(x+x[1]*[1,0])         g=grad(x+x[1]*[1,0])
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)
163            g=grad(x**order+x[1]*[1,0],where=f)            g=grad(x**order+x[1]*[1,0],where=f)
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)
182            g=grad(x+x[1]*[1,0],where=f)            g=grad(x+x[1]*[1,0],where=f)
183            ref=Scalar(1,what=r)*m00+m01+Scalar(1,what=r)*m11            ref=Scalar(1,what=r)*m00+m01+Scalar(1,what=r)*m11
184            error_norm=Lsup(ref-g)/Lsup(ref)            error_norm=Lsup(ref-g)/Lsup(ref)

Legend:
Removed from v.427  
changed lines
  Added in v.428

  ViewVC Help
Powered by ViewVC 1.1.26