# Contents of /trunk/doc/examples/usersguide/helmholtz.py

Revision 2484 - (show annotations)
Mon Jun 22 04:22:19 2009 UTC (9 years, 6 months ago) by gross
File MIME type: text/x-python
File size: 1412 byte(s)
```numarray removed from docu; Locator revised.
```
 1 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 __url__= 21 22 # \$Id\$ 23 from esys.escript import * 24 from esys.escript.linearPDEs import LinearPDE 25 from esys.finley import Rectangle 26 #... set some parameters ... 27 kappa=1. 28 omega=0.1 29 eta=10. 30 #... generate domain ... 31 mydomain = Rectangle(l0=5.,l1=1.,n0=50, n1=10) 32 #... open PDE and set coefficients ... 33 mypde=LinearPDE(mydomain) 34 mypde.setSymmetryOn() 35 n=mydomain.getNormal() 36 x=mydomain.getX() 37 mypde.setValue(A=kappa*kronecker(mydomain),D=omega,Y=omega*x[0], \ 38 d=eta,y=kappa*n[0]+eta*x[0]) 39 #... calculate error of the PDE solution ... 40 u=mypde.getSolution() 41 print "error is ",Lsup(u-x[0]) 42 # 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
svn:mergeinfo