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

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

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

revision 108 by jgs, Thu Jan 27 06:21:59 2005 UTC revision 147 by jgs, Fri Aug 12 01:45:47 2005 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3  from esys.escript import *  
4  from esys.linearPDEs import Poisson  # from esys.escript import *
5  import esys.finley as finley  # from esys.linearPDEs import Poisson
6    # import esys.finley as finley
7    from escript.escript import *
8    from escript.linearPDEs import Poisson
9    import finley.finley as finley
10    
11  ne_list=[10,15,22,33,50,75]  ne_list=[10,15,22,33,50,75]
12  height_list=[0.25,0.5,1.]  height_list=[0.25,0.5,1.]
# Line 50  def Solve1(mydomain,height): Line 54  def Solve1(mydomain,height):
54         f+=f_p         f+=f_p
55    
56      mypde=Poisson(mydomain)      mypde=Poisson(mydomain)
57        mypde.setTolerance(1.e-10)
58      mypde.setValue(f=f,q=msk)      mypde.setValue(f=f,q=msk)
59      u=mypde.getSolution()      u=mypde.getSolution()
60      error=Lsup(u-u_ex)/Lsup(u_ex)      error=Lsup(u-u_ex)/Lsup(u_ex)
# Line 82  def Solve2(mydomain,height): Line 87  def Solve2(mydomain,height):
87               f_p*=x[j]*(2*l[j]-x[j])               f_p*=x[j]*(2*l[j]-x[j])
88         f+=f_p         f+=f_p
89      mypde=Poisson(mydomain)      mypde=Poisson(mydomain)
90        mypde.setTolerance(1.e-10)
91      mypde.setValue(f=f,q=msk)      mypde.setValue(f=f,q=msk)
92      u=mypde.getSolution()      u=mypde.getSolution()
93      error=Lsup(u-u_ex)/Lsup(u_ex)      error=Lsup(u-u_ex)/Lsup(u_ex)
# Line 92  def Solve2(mydomain,height): Line 98  def Solve2(mydomain,height):
98  error=0  error=0
99  for ne in ne_list:  for ne in ne_list:
100     for dim in [2,3]:     for dim in [2,3]:
101       # for dim in [2]:
102        for height in height_list:        for height in height_list:
103           print "***************************************************************"           print "***************************************************************"
104           mydomain= getDomain(dim,ne,height)           mydomain= getDomain(dim,ne,height)

Legend:
Removed from v.108  
changed lines
  Added in v.147

  ViewVC Help
Powered by ViewVC 1.1.26