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

revision 327 by gross, Wed Dec 7 04:32:28 2005 UTC revision 565 by gross, Mon Feb 27 00:04:17 2006 UTC
# Line 1  Line 1
1  # \$Id\$  # \$Id\$
2    from esys.escript import *
3    from linearPDEs import Poisson
4  from esys.finley import Rectangle  from esys.finley import Rectangle
from esys.escript.linearPDEs import Poisson
from esys.escript import whereZero,saveVTK
5  # generate domain:  # generate domain:
6  mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)  mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
7  # define characteristic function of Gamma^D  # define characteristic function of Gamma^D
# Line 12  mypde = Poisson(domain=mydomain) Line 12  mypde = Poisson(domain=mydomain)
12  mypde.setValue(f=1,q=gammaD)  mypde.setValue(f=1,q=gammaD)
13  u = mypde.getSolution()  u = mypde.getSolution()
14  # write u to an external file  # write u to an external file
15  saveVTK("u.xml",solution=u)  saveVTK("u.xml",sol=u)

Legend:
 Removed from v.327 changed lines Added in v.565

 ViewVC Help Powered by ViewVC 1.1.26