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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (hide annotations)
Wed Nov 9 02:02:19 2005 UTC (13 years, 5 months ago) by jgs
Original Path: trunk/doc/user/examples/helmholtztest.py
File MIME type: text/x-python
File size: 544 byte(s)
move all directories from trunk/esys2 into trunk and remove esys2

1 jgs 102 # $Id$
2 jgs 108 from mytools import Helmholtz
3     from esys.escript import Lsup
4     from esys.finley import Rectangle
5 jgs 102 #... set some parameters ...
6 jgs 108 kappa=1.
7 jgs 102 omega=0.1
8     eta=10.
9     #... generate domain ...
10 jgs 113 mydomain = Rectangle(l0=5.,l1=1.,n0=50, n1=10)
11 jgs 102 #... open PDE and set coefficients ...
12     mypde=Helmholtz(mydomain)
13     n=mydomain.getNormal()
14     x=mydomain.getX()
15 jgs 108 mypde.setValue(kappa,omega,omega*x[0],eta,kappa*n[0]+eta*x[0])
16 jgs 102 #... calculate error of the PDE solution ...
17     u=mypde.getSolution()
18     print "error is ",Lsup(u-x[0])
19 jgs 113 # output should be similar to "error is 1.e-7"

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26