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

Revision 2344 - (hide annotations)
Mon Mar 30 02:13:58 2009 UTC (9 years, 10 months ago) by jfenwick
File MIME type: text/x-python
File size: 1412 byte(s)
```Change __url__ to launchpad site

```
 1 ksteube 1811 2 ######################################################## 3 # 4 # Copyright (c) 2003-2008 by University of Queensland 5 # Earth Systems Science Computational Center (ESSCC) 6 7 # 8 # Primary Business: Queensland, Australia 9 # Licensed under the Open Software License version 3.0 10 11 # 12 ######################################################## 13 14 __copyright__="""Copyright (c) 2003-2008 by University of Queensland 15 Earth Systems Science Computational Center (ESSCC) 16 http://www.uq.edu.au/esscc 17 Primary Business: Queensland, Australia""" 18 __license__="""Licensed under the Open Software License version 3.0 19 20 jfenwick 2344 __url__= 21 ksteube 1811 22 jgs 102 # \$Id\$ 23 gross 567 from esys.escript import * 24 gross 569 from esys.escript.linearPDEs import LinearPDE 25 jgs 108 from esys.finley import Rectangle 26 jgs 102 #... set some parameters ... 27 jgs 108 kappa=1. 28 jgs 102 omega=0.1 29 eta=10. 30 #... generate domain ... 31 jgs 113 mydomain = Rectangle(l0=5.,l1=1.,n0=50, n1=10) 32 jgs 102 #... open PDE and set coefficients ... 33 gross 567 mypde=LinearPDE(mydomain) 34 mypde.setSymmetryOn() 35 jgs 102 n=mydomain.getNormal() 36 x=mydomain.getX() 37 gross 569 mypde.setValue(A=kappa*kronecker(mydomain),D=omega,Y=omega*x[0], \ 38 d=eta,y=kappa*n[0]+eta*x[0]) 39 jgs 102 #... calculate error of the PDE solution ... 40 u=mypde.getSolution() 41 gross 569 print "error is ",Lsup(u-x[0]) 42 lkettle 575 # output should be similar to "error is 1.e-7" 43 saveVTK("x0.xml",sol=u) 44

## Properties

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