/[escript]/trunk/finley/py_src/finleybench.py
ViewVC logotype

Diff of /trunk/finley/py_src/finleybench.py

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

revision 388 by gross, Mon Dec 19 06:10:45 2005 UTC revision 389 by gross, Tue Dec 20 03:17:28 2005 UTC
# Line 14  Line 14 
14  some benchmarks for tetsing the finley solver. The idea is to develop a set of standart benchmarks  some benchmarks for tetsing the finley solver. The idea is to develop a set of standart benchmarks
15    
16    * Laplace2Dorder1_?k    * Laplace2Dorder1_?k
17      * Laplace2Dorder2_?k
18      * Laplace3Dorder1_?k
19    * Laplace3Dorder2_?k    * Laplace3Dorder2_?k
20    
21  where ? is approximatively the number of unknowns in 1000.  where ? is approximatively the number of unknowns in 1000.
# Line 246  class LaplaceProblem(RegularFinleyProble Line 248  class LaplaceProblem(RegularFinleyProble
248           pde.setValue(A=kronecker(domain),q=msk,r=u)           pde.setValue(A=kronecker(domain),q=msk,r=u)
249           return pde,u           return pde,u
250    
251  class Laplace2DOrder1_30k(LaplaceProblem):  class Laplace2DOrder1_30k(LaplaceProblem):
252      def __init__(self):     def __init__(self):
253           super(Laplace2DOrder1_30k,self).__init__(n=176,order=1,dim=2)        super(Laplace2DOrder1_30k,self).__init__(n=172,order=1,dim=2)
 class Laplace2DOrder2_30k(LaplaceProblem):  
     def __init__(self):  
          super(Laplace2DOrder2_30k,self).__init__(n=88,order=2,dim=2)  
254  class Laplace2DOrder1_60k(LaplaceProblem):  class Laplace2DOrder1_60k(LaplaceProblem):
255      def __init__(self):     def __init__(self):
256           super(Laplace2DOrder1_60k,self).__init__(n=248,order=1,dim=2)        super(Laplace2DOrder1_60k,self).__init__(n=244,order=1,dim=2)
 class Laplace2DOrder2_60k(LaplaceProblem):  
     def __init__(self):  
          super(Laplace2DOrder2_60k,self).__init__(n=124,order=2,dim=2)  
257  class Laplace2DOrder1_120k(LaplaceProblem):  class Laplace2DOrder1_120k(LaplaceProblem):
258      def __init__(self):     def __init__(self):
259           super(Laplace2DOrder1_120k,self).__init__(n=349,order=1,dim=2)        super(Laplace2DOrder1_120k,self).__init__(n=345,order=1,dim=2)
 class Laplace2DOrder2_120k(LaplaceProblem):  
     def __init__(self):  
          super(Laplace2DOrder2_120k,self).__init__(n=175,order=2,dim=2)  
260  class Laplace2DOrder1_240k(LaplaceProblem):  class Laplace2DOrder1_240k(LaplaceProblem):
261      def __init__(self):     def __init__(self):
262           super(Laplace2DOrder1_240k,self).__init__(n=492,order=1,dim=2)        super(Laplace2DOrder1_240k,self).__init__(n=489,order=1,dim=2)
 class Laplace2DOrder2_240k(LaplaceProblem):  
     def __init__(self):  
          super(Laplace2DOrder2_240k,self).__init__(n=246,order=2,dim=2)  
263  class Laplace2DOrder1_480k(LaplaceProblem):  class Laplace2DOrder1_480k(LaplaceProblem):
264      def __init__(self):     def __init__(self):
265           super(Laplace2DOrder1_480k,self).__init__(n=694,order=1,dim=2)        super(Laplace2DOrder1_480k,self).__init__(n=692,order=1,dim=2)
 class Laplace2DOrder2_480k(LaplaceProblem):  
     def __init__(self):  
          super(Laplace2DOrder2_480k,self).__init__(n=347,order=2,dim=2)  
266  class Laplace2DOrder1_960k(LaplaceProblem):  class Laplace2DOrder1_960k(LaplaceProblem):
267      def __init__(self):     def __init__(self):
268           super(Laplace2DOrder1_960k,self).__init__(n=978,order=1,dim=2)        super(Laplace2DOrder1_960k,self).__init__(n=979,order=1,dim=2)
269    class Laplace2DOrder1_1920k(LaplaceProblem):
270       def __init__(self):
271          super(Laplace2DOrder1_1920k,self).__init__(n=1385,order=1,dim=2)
272    class Laplace2DOrder1_3840k(LaplaceProblem):
273       def __init__(self):
274          super(Laplace2DOrder1_3840k,self).__init__(n=1959,order=1,dim=2)
275    class Laplace2DOrder1_7680k(LaplaceProblem):
276       def __init__(self):
277          super(Laplace2DOrder1_7680k,self).__init__(n=2770,order=1,dim=2)
278    class Laplace2DOrder1_15360k(LaplaceProblem):
279       def __init__(self):
280          super(Laplace2DOrder1_15360k,self).__init__(n=3918,order=1,dim=2)
281    class Laplace2DOrder2_30k(LaplaceProblem):
282       def __init__(self):
283          super(Laplace2DOrder2_30k,self).__init__(n=86,order=2,dim=2)
284    class Laplace2DOrder2_60k(LaplaceProblem):
285       def __init__(self):
286          super(Laplace2DOrder2_60k,self).__init__(n=122,order=2,dim=2)
287    class Laplace2DOrder2_120k(LaplaceProblem):
288       def __init__(self):
289          super(Laplace2DOrder2_120k,self).__init__(n=173,order=2,dim=2)
290    class Laplace2DOrder2_240k(LaplaceProblem):
291       def __init__(self):
292          super(Laplace2DOrder2_240k,self).__init__(n=244,order=2,dim=2)
293    class Laplace2DOrder2_480k(LaplaceProblem):
294       def __init__(self):
295          super(Laplace2DOrder2_480k,self).__init__(n=346,order=2,dim=2)
296  class Laplace2DOrder2_960k(LaplaceProblem):  class Laplace2DOrder2_960k(LaplaceProblem):
297      def __init__(self):     def __init__(self):
298           super(Laplace2DOrder2_960k,self).__init__(n=489,order=2,dim=2)        super(Laplace2DOrder2_960k,self).__init__(n=489,order=2,dim=2)
299    class Laplace2DOrder2_1920k(LaplaceProblem):
300       def __init__(self):
301          super(Laplace2DOrder2_1920k,self).__init__(n=692,order=2,dim=2)
302    class Laplace2DOrder2_3840k(LaplaceProblem):
303       def __init__(self):
304          super(Laplace2DOrder2_3840k,self).__init__(n=979,order=2,dim=2)
305    class Laplace2DOrder2_7680k(LaplaceProblem):
306       def __init__(self):
307          super(Laplace2DOrder2_7680k,self).__init__(n=1385,order=2,dim=2)
308    class Laplace2DOrder2_15360k(LaplaceProblem):
309       def __init__(self):
310          super(Laplace2DOrder2_15360k,self).__init__(n=1959,order=2,dim=2)
311    class Laplace3DOrder1_30k(LaplaceProblem):
312       def __init__(self):
313          super(Laplace3DOrder1_30k,self).__init__(n=30,order=1,dim=3)
314    class Laplace3DOrder1_60k(LaplaceProblem):
315       def __init__(self):
316          super(Laplace3DOrder1_60k,self).__init__(n=38,order=1,dim=3)
317    class Laplace3DOrder1_120k(LaplaceProblem):
318       def __init__(self):
319          super(Laplace3DOrder1_120k,self).__init__(n=48,order=1,dim=3)
320    class Laplace3DOrder1_240k(LaplaceProblem):
321       def __init__(self):
322          super(Laplace3DOrder1_240k,self).__init__(n=61,order=1,dim=3)
323    class Laplace3DOrder1_480k(LaplaceProblem):
324       def __init__(self):
325          super(Laplace3DOrder1_480k,self).__init__(n=77,order=1,dim=3)
326    class Laplace3DOrder1_960k(LaplaceProblem):
327       def __init__(self):
328          super(Laplace3DOrder1_960k,self).__init__(n=98,order=1,dim=3)
329    class Laplace3DOrder1_1920k(LaplaceProblem):
330       def __init__(self):
331          super(Laplace3DOrder1_1920k,self).__init__(n=123,order=1,dim=3)
332    class Laplace3DOrder1_3840k(LaplaceProblem):
333       def __init__(self):
334          super(Laplace3DOrder1_3840k,self).__init__(n=156,order=1,dim=3)
335    class Laplace3DOrder1_7680k(LaplaceProblem):
336       def __init__(self):
337          super(Laplace3DOrder1_7680k,self).__init__(n=196,order=1,dim=3)
338    class Laplace3DOrder1_15360k(LaplaceProblem):
339       def __init__(self):
340          super(Laplace3DOrder1_15360k,self).__init__(n=248,order=1,dim=3)
341    class Laplace3DOrder2_30k(LaplaceProblem):
342       def __init__(self):
343          super(Laplace3DOrder2_30k,self).__init__(n=15,order=2,dim=3)
344    class Laplace3DOrder2_60k(LaplaceProblem):
345       def __init__(self):
346          super(Laplace3DOrder2_60k,self).__init__(n=19,order=2,dim=3)
347    class Laplace3DOrder2_120k(LaplaceProblem):
348       def __init__(self):
349          super(Laplace3DOrder2_120k,self).__init__(n=24,order=2,dim=3)
350    class Laplace3DOrder2_240k(LaplaceProblem):
351       def __init__(self):
352          super(Laplace3DOrder2_240k,self).__init__(n=31,order=2,dim=3)
353    class Laplace3DOrder2_480k(LaplaceProblem):
354       def __init__(self):
355          super(Laplace3DOrder2_480k,self).__init__(n=39,order=2,dim=3)
356    class Laplace3DOrder2_960k(LaplaceProblem):
357       def __init__(self):
358          super(Laplace3DOrder2_960k,self).__init__(n=49,order=2,dim=3)
359    class Laplace3DOrder2_1920k(LaplaceProblem):
360       def __init__(self):
361          super(Laplace3DOrder2_1920k,self).__init__(n=62,order=2,dim=3)
362    class Laplace3DOrder2_3840k(LaplaceProblem):
363       def __init__(self):
364          super(Laplace3DOrder2_3840k,self).__init__(n=78,order=2,dim=3)
365    class Laplace3DOrder2_7680k(LaplaceProblem):
366       def __init__(self):
367          super(Laplace3DOrder2_7680k,self).__init__(n=98,order=2,dim=3)
368    class Laplace3DOrder2_15360k(LaplaceProblem):
369       def __init__(self):
370          super(Laplace3DOrder2_15360k,self).__init__(n=124,order=2,dim=3)
371    
372    if __name__=="__main__":
373       test=""
374       n0=30000
375       for d in [2,3]:
376         for o in [1,2]:
377            for i in range(10):
378                 dofs=n0*2**i
379                 n=int((float(dofs)**(1./float(d))-1)/o+0.5)
380                 name="Laplace%sDOrder%s_%sk"%(d,o,dofs/1000)
381                 print "class %s(LaplaceProblem):"%name
382                 print "   def __init__(self):"
383                 print "      super(%s,self).__init__(n=%s,order=%s,dim=%s)"%(name,n,o,d)
384                 test+="addProblem(%s())\n"%name
385       print test
386    

Legend:
Removed from v.388  
changed lines
  Added in v.389

  ViewVC Help
Powered by ViewVC 1.1.26