/[escript]/trunk/esys2/escript/test/python/UnaryOps.py
ViewVC logotype

Diff of /trunk/esys2/escript/test/python/UnaryOps.py

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

revision 141 by jgs, Mon Jul 25 05:15:41 2005 UTC revision 147 by jgs, Fri Aug 12 01:45:47 2005 UTC
# Line 81  def checkResult(text,res,val0,val1,val2, Line 81  def checkResult(text,res,val0,val1,val2,
81       error=Lsup(ref-res)/norm       error=Lsup(ref-res)/norm
82       print "@@ %s, shape %s: error = %e"%(text,ref.getShape(),error)       print "@@ %s, shape %s: error = %e"%(text,ref.getShape(),error)
83       if error>tol:       if error>tol:
        #raise SystemError,"@@ %s at %s: error is too large"%(text,wh)  
84         print "**** %s: error is too large"%(text)         print "**** %s: error is too large"%(text)
85           raise SystemError,"@@ %s at %s: error is too large"%(text,wh)
86           sys.exit(1)
87    
88  def getRank(arg):  def getRank(arg):
89      if isinstance(arg,Data):      if isinstance(arg,Data):
# Line 208  for wh in [ContinuousFunction(msh),Funct Line 209  for wh in [ContinuousFunction(msh),Funct
209                        wh)                        wh)
210    
211        # sqrt        # sqrt
212        #ref=checkResult("sqrt("+ex1+")", \        ref=checkResult("sqrt("+ex1+")", \
213        #                arg1.abs().sqrt(), \                        arg1.abs().sqrt(), \
214        #                numarray.sqrt(numarray.abs(arrays1[0])), \                        numarray.sqrt(numarray.abs(arrays1[0])), \
215        #                numarray.sqrt(numarray.abs(arrays1[1])), \                        numarray.sqrt(numarray.abs(arrays1[1])), \
216        #                numarray.sqrt(numarray.abs(arrays1[2])), \                        numarray.sqrt(numarray.abs(arrays1[2])), \
217        #                wh)                        wh)
218    
219        # sin:        # sin:
220        ref=checkResult("sin("+ex1+")", \        ref=checkResult("sin("+ex1+")", \
# Line 283  for wh in [ContinuousFunction(msh),Funct Line 284  for wh in [ContinuousFunction(msh),Funct
284                          -numarray.less(arrays1[2],numarray.zeros(arrays1[2].shape)),\                          -numarray.less(arrays1[2],numarray.zeros(arrays1[2].shape)),\
285                        wh)                        wh)
286    
287    sys.exit(0)
288  # end  # end

Legend:
Removed from v.141  
changed lines
  Added in v.147

  ViewVC Help
Powered by ViewVC 1.1.26