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

Revision 3868 - (show annotations)
Thu Mar 15 06:07:08 2012 UTC (7 years, 1 month ago) by caltinay
File MIME type: text/x-python
File size: 1436 byte(s)
```Update to latest trunk

```
 1 2 ######################################################## 3 # 4 # Copyright (c) 2003-2010 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-2010 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 from esys.escript import * 23 from esys.escript.linearPDEs import LinearPDE 24 from esys.finley import Rectangle 25 from esys.weipa import saveVTK 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.vtu",sol=u) 44

## 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/restext/doc/examples/usersguide/helmholtz.py:2610-2624 /branches/ripleygmg_from_3668/doc/examples/usersguide/helmholtz.py:3669-3791 /trunk/doc/examples/usersguide/helmholtz.py:1388-2483,3471-3867