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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/doc/user/examples/helmholtz.py revision 567 by gross, Tue Feb 28 03:58:05 2006 UTC trunk/doc/examples/helmholtz.py revision 2344 by jfenwick, Mon Mar 30 02:13:58 2009 UTC
# Line 1  Line 1 
1    
2    ########################################################
3    #
4    # Copyright (c) 2003-2008 by University of Queensland
5    # Earth Systems Science Computational Center (ESSCC)
6    # http://www.uq.edu.au/esscc
7    #
8    # Primary Business: Queensland, Australia
9    # Licensed under the Open Software License version 3.0
10    # http://www.opensource.org/licenses/osl-3.0.php
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    http://www.opensource.org/licenses/osl-3.0.php"""
20    __url__="https://launchpad.net/escript-finley"
21    
22  # $Id$  # $Id$
23  from esys.escript import *  from esys.escript import *
24  from linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
25  from esys.finley import Rectangle  from esys.finley import Rectangle
26  #... set some parameters ...  #... set some parameters ...
27  kappa=1.  kappa=1.
# Line 13  mypde=LinearPDE(mydomain) Line 34  mypde=LinearPDE(mydomain)
34  mypde.setSymmetryOn()  mypde.setSymmetryOn()
35  n=mydomain.getNormal()  n=mydomain.getNormal()
36  x=mydomain.getX()  x=mydomain.getX()
37  mypde.setValue(A=kappa*kronecker(mydomain),D=omega,Y=omega*x[0],d=eta,y=kappa*n[0]+eta*x[0])  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 ...  #... calculate error of the PDE solution ...
40  u=mypde.getSolution()  u=mypde.getSolution()
 # output should be similar to "error is 1.e-7"  
41  print "error is ",Lsup(u-x[0])  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    

Legend:
Removed from v.567  
changed lines
  Added in v.2344

  ViewVC Help
Powered by ViewVC 1.1.26