/[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 431 by gross, Fri Jan 13 05:07:10 2006 UTC revision 432 by gross, Fri Jan 13 07:38:54 2006 UTC
# Line 23  error_tol=1.e-5 Line 23  error_tol=1.e-5
23  # mydomain=finley.Rectangle(140,140)  # mydomain=finley.Rectangle(140,140)
24    
25  # print "\nGenerate mesh: finley.Rectangle(4,4,1)=>"  # print "\nGenerate mesh: finley.Rectangle(4,4,1)=>"
26  mydomain=finley.Rectangle(150,10,1)  mydomain=finley.Rectangle(60,40,1)
27  mydomain=finley.Rectangle(250,250,1)  # mydomain=finley.Rectangle(250,250,1)
28  # mydomain=finley.Rectangle(190,190,1)  mydomain=finley.Rectangle(100,100,1)
29    
30  print "\nGenerate mesh: finley.Rectangle(151,151,1)=>"  print "\nGenerate mesh: finley.Rectangle(151,151,1)=>"
31  # mydomain=finley.Rectangle(151,151,1)  # mydomain=finley.Rectangle(151,151,1)
# Line 60  print "----------------------------" Line 60  print "----------------------------"
60  print "mypde=LinearPDE( A=[[1.,0.8],[0.4,1.]], D=alpha, Y=alpha, domain=mydomain)"  print "mypde=LinearPDE( A=[[1.,0.8],[0.4,1.]], D=alpha, Y=alpha, domain=mydomain)"
61  mypde=LinearPDE(mydomain)  mypde=LinearPDE(mydomain)
62  mypde.setDebugOn()  mypde.setDebugOn()
63  mypde.setValue(A=[[1.,0.1],[0.04,1.]],D=alpha,Y=alpha)  mypde.setValue(A=[[1.,-0.001],[-0.001,1.]],D=alpha,Y=alpha)
64    
65  print "mypde.checkSymmetry()"  print "mypde.checkSymmetry()"
66  print mypde.checkSymmetry()  print mypde.checkSymmetry()
67    
68  print "\nIterative Solver (1)=>"  print "\nIterative Solver (1)=>"
69  mypde.setSolverMethod(mypde.BICGSTAB,preconditioner=mypde.ILU0)  mypde.setSolverMethod(mypde.PRES20,preconditioner=mypde.ILU0)
70  u_i=mypde.getSolution(verbose=True,iter_max=3000)  u_i=mypde.getSolution(verbose=True,iter_max=3000)
71    
72  print "\nDirect Solver (1)=>"  print "\nDirect Solver (1)=>"
# Line 105  msk=whereZero(x[0])+whereZero(x[0]-1.) Line 105  msk=whereZero(x[0])+whereZero(x[0]-1.)
105  print "mypde=LinearPDE(A=[[1.,0.],[0.,1.]],q=msk,r=u_ex)"  print "mypde=LinearPDE(A=[[1.,0.],[0.,1.]],q=msk,r=u_ex)"
106  mypde=LinearPDE(mydomain)  mypde=LinearPDE(mydomain)
107  mypde.setDebugOn()  mypde.setDebugOn()
108  mypde.setValue(A=[[1.,0.],[0.,1.]],q=msk,r=u_ex)  mypde.setValue(A=[[1.,0.0],[0.0,1.]],q=msk,r=u_ex)
109    
110  print "mypde.checkSymmetry()"  print "mypde.checkSymmetry()"
111  print mypde.checkSymmetry()  print mypde.checkSymmetry()

Legend:
Removed from v.431  
changed lines
  Added in v.432

  ViewVC Help
Powered by ViewVC 1.1.26