# Diff of /trunk/doc/examples/usersguide/poisson.py

trunk/esys2/doc/user/examples/mypoisson.py revision 102 by jgs, Wed Dec 15 07:08:39 2004 UTC trunk/doc/examples/usersguide/poisson.py revision 3346 by caltinay, Fri Nov 12 01:19:02 2010 UTC
# Line 1  Line 1
1  # \$Id\$
2  import esys.finley  ########################################################
3  from esys.linearPDEs import Poisson  #
4    # Copyright (c) 2003-2010 by University of Queensland
5    # Earth Systems Science Computational Center (ESSCC)
6    # http://www.uq.edu.au/esscc
7    #
8    # Primary Business: Queensland, Australia
11    #
12    ########################################################
13
15    Earth Systems Science Computational Center (ESSCC)
16    http://www.uq.edu.au/esscc
21
22    from esys.escript import *
23    from esys.escript.linearPDEs import Poisson
24    from esys.finley import Rectangle
25    from esys.weipa import saveVTK
26  # generate domain:  # generate domain:
27  mydomain = esys.finley.Rectangle(l0=1.,l1=1.,n0=40, n1=20)  mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
28  # define characteristic function of Gamma^D  # define characteristic function of Gamma^D
29  x = mydomain.getX()  x = mydomain.getX()
31  # define PDE and get its solution u  # define PDE and get its solution u
32  mypde = Poisson(domain=mydomain,f=1,q=gammaD)  mypde = Poisson(domain=mydomain)
34  u = mypde.getSolution()  u = mypde.getSolution()
35  # write u to an external file  # write u to an external file
36  u.saveDX("u.dx")  saveVTK("u.vtu",sol=u)
37

Legend:
 Removed from v.102 changed lines Added in v.3346