/[escript]/trunk/doc/examples/helmholtz.py
ViewVC logotype

Diff of /trunk/doc/examples/helmholtz.py

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

revision 567 by gross, Tue Feb 28 03:58:05 2006 UTC revision 569 by gross, Tue Feb 28 05:34:37 2006 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2  from esys.escript import *  from esys.escript import *
3  from linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
4  from esys.finley import Rectangle  from esys.finley import Rectangle
5  #... set some parameters ...  #... set some parameters ...
6  kappa=1.  kappa=1.
# Line 13  mypde=LinearPDE(mydomain) Line 13  mypde=LinearPDE(mydomain)
13  mypde.setSymmetryOn()  mypde.setSymmetryOn()
14  n=mydomain.getNormal()  n=mydomain.getNormal()
15  x=mydomain.getX()  x=mydomain.getX()
16  mypde.setValue(A=kappa*kronecker(mydomain),D=omega,Y=omega*x[0],d=eta,y=kappa*n[0]+eta*x[0])  mypde.setValue(A=kappa*kronecker(mydomain),D=omega,Y=omega*x[0], \
17                   d=eta,y=kappa*n[0]+eta*x[0])
18  #... calculate error of the PDE solution ...  #... calculate error of the PDE solution ...
19  u=mypde.getSolution()  u=mypde.getSolution()
 # output should be similar to "error is 1.e-7"  
20  print "error is ",Lsup(u-x[0])  print "error is ",Lsup(u-x[0])
21    # output should be similar to "error is 1.e-7"

Legend:
Removed from v.567  
changed lines
  Added in v.569

  ViewVC Help
Powered by ViewVC 1.1.26