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 |
|
|
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***************************************************************" |
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******************************************************************" |