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

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

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

revision 149 by jgs, Thu Sep 1 03:31:39 2005 UTC revision 153 by jgs, Tue Oct 25 01:51:20 2005 UTC
# Line 9  import os Line 9  import os
9  import time  import time
10    
11  from esys.escript import *  from esys.escript import *
12  from esys import finley  from esys import bruce
13    
14  #  #
15  # ================== data values to test with =========================  # ================== data values to test with =========================
# Line 41  testlist = [ Line 41  testlist = [
41  "Lsup",  "Lsup",
42  "Linf",  "Linf",
43  "sup",  "sup",
44  "inf",  "inf"
 "wherePositive"  
45  ]  ]
46    
47  #  #
# Line 62  def getStartTime(): Line 61  def getStartTime():
61  def calcElapsedTime(starttime):  def calcElapsedTime(starttime):
62      stoptime = time.clock()      stoptime = time.clock()
63      elapsed = stoptime - starttime      elapsed = stoptime - starttime
64      print elapsed      print "\t\t", elapsed
65    
66  def runTest(arg,test):  def runTest(arg,test):
67      print "\n", test      print "\t\t", test,
68      result = arg.__getattribute__(test)()      result = arg.__getattribute__(test)()
69      del result      del result
70    
71  #  #
72  # ===================== main ==============================  # ===================== main ==============================
73    
74  msh=finley.Rectangle(1000,1000,1)  msh=bruce.Rectangle(1000,1000)
75    
76  for wh in [Function(msh)]:  for wh in [Function(msh),ContinuousFunction(msh)]:
77    
78    print wh    print "\n", wh, ":"
79    
80    for ex in ["Expanded"]:    for ex in ["Expanded"]:
81    
82      for a in arglist:      for a in arglist:
83    
84        print "\n", ex, a, "==>"        print "\n\t", ex, a, "==>"
85          print "\n\t\tFunction\tElapsed time"
86          print "\t\t--------\t------------"
87    
88        arg=prepareArg(a,ex,wh)        arg=prepareArg(a,ex,wh)
89    

Legend:
Removed from v.149  
changed lines
  Added in v.153

  ViewVC Help
Powered by ViewVC 1.1.26