# Contents of /branches/doubleplusgood/doc/examples/usersguide/helmholtz.py

Revision 4345 - (show annotations)
Fri Mar 29 07:09:41 2013 UTC (5 years, 11 months ago) by jfenwick
File MIME type: text/x-python
File size: 1499 byte(s)
```Spelling fixes
```
 1 2 ############################################################################## 3 # 4 # Copyright (c) 2003-2013 by University of Queensland 5 6 # 7 # Primary Business: Queensland, Australia 8 # Licensed under the Open Software License version 3.0 9 10 # 11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC) 12 # Development since 2012 by School of Earth Sciences 13 # 14 ############################################################################## 15 16 __copyright__="""Copyright (c) 2003-2013 by University of Queensland 17 http://www.uq.edu.au 18 Primary Business: Queensland, Australia""" 19 __license__="""Licensed under the Open Software License version 3.0 20 21 __url__= 22 23 from esys.escript import * 24 from esys.escript.linearPDEs import LinearPDE 25 from esys.finley import Rectangle 26 from esys.weipa import saveVTK 27 #... set some parameters ... 28 kappa=1. 29 omega=0.1 30 eta=10. 31 #... generate domain ... 32 mydomain = Rectangle(l0=5.,l1=1.,n0=50, n1=10) 33 #... open PDE and set coefficients ... 34 mypde=LinearPDE(mydomain) 35 mypde.setSymmetryOn() 36 n=mydomain.getNormal() 37 x=mydomain.getX() 38 mypde.setValue(A=kappa*kronecker(mydomain),D=omega,Y=omega*x[0], \ 39 d=eta,y=kappa*n[0]+eta*x[0]) 40 #... calculate error of the PDE solution ... 41 u=mypde.getSolution() 42 print("error is ",Lsup(u-x[0])) 43 # output should be similar to "error is 1.e-7" 44 saveVTK("x0.vtu",sol=u) 45

## Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/lapack2681/doc/examples/usersguide/helmholtz.py:2682-2741 /branches/pasowrap/doc/examples/usersguide/helmholtz.py:3661-3674 /branches/py3_attempt2/doc/examples/usersguide/helmholtz.py:3871-3891 /branches/restext/doc/examples/usersguide/helmholtz.py:2610-2624 /branches/ripleygmg_from_3668/doc/examples/usersguide/helmholtz.py:3669-3791 /branches/symbolic_from_3470/doc/examples/usersguide/helmholtz.py:3471-3974 /branches/symbolic_from_3470/ripley/test/python/doc/examples/usersguide/helmholtz.py:3517-3974 /trunk/doc/examples/usersguide/helmholtz.py:1388-2483,4257-4344 /trunk/ripley/test/python/doc/examples/usersguide/helmholtz.py:3480-3515