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

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

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

revision 777 by gross, Wed Jul 12 08:54:45 2006 UTC revision 778 by gross, Thu Jul 13 02:27:45 2006 UTC
# Line 36  print "\nGenerate mesh: finley.Rectangle Line 36  print "\nGenerate mesh: finley.Rectangle
36  # mydomain=finley.Rectangle(151,151,1)  # mydomain=finley.Rectangle(151,151,1)
37  # mydomain=finley.Rectangle(128,128,1)  # mydomain=finley.Rectangle(128,128,1)
38    
39    # set the direct solver switch
40    DIRECT=LinearPDE.DIRECT
41    # DIRECT=LinearPDE.ITERATIVE # this will switch of the DIRECT solver call to avoid external library calls which may not be available everywhere
42    
43  print "\nSetup domain and functions"  print "\nSetup domain and functions"
44  print "--------------------------"  print "--------------------------"
45    
# Line 76  mypde.setSolverMethod(mypde.BICGSTAB,pre Line 80  mypde.setSolverMethod(mypde.BICGSTAB,pre
80  u_i=mypde.getSolution(verbose=True,iter_max=3000)  u_i=mypde.getSolution(verbose=True,iter_max=3000)
81    
82  print "\nDirect Solver (1)=>"  print "\nDirect Solver (1)=>"
83  mypde.setSolverMethod(mypde.DIRECT)  mypde.setSolverMethod(DIRECT)
84  u_d=mypde.getSolution(verbose=True)  u_d=mypde.getSolution(verbose=True)
85    
86  print "\n***************************************************************"  print "\n***************************************************************"
# Line 127  mypde.setSymmetryOn() Line 131  mypde.setSymmetryOn()
131  mypde.setTolerance(1.e-13)  mypde.setTolerance(1.e-13)
132    
133  # mypde.setSymmetryOn() : is not woking yet!  # mypde.setSymmetryOn() : is not woking yet!
134  mypde.setSolverMethod(mypde.DIRECT)  mypde.setSolverMethod(DIRECT)
135  u_d=mypde.getSolution(verbose=True)  u_d=mypde.getSolution(verbose=True)
136    
137  print "\nIterative Solver (2)=>"  print "\nIterative Solver (2)=>"
138    
139  mypde.setSolverMethod(mypde.ITERATIVE)  mypde.setSolverMethod(mypde.PCG)
140  u_i=mypde.getSolution(verbose=True,iter_max=3000)  u_i=mypde.getSolution(verbose=True,iter_max=3000)
141    
142  print "\n******************************************************************"  print "\n******************************************************************"

Legend:
Removed from v.777  
changed lines
  Added in v.778

  ViewVC Help
Powered by ViewVC 1.1.26