--- trunk/doc/user/examples/mypoisson.py 2005/11/09 02:02:19 155 +++ trunk/doc/user/examples/mypoisson.py 2005/12/07 04:32:28 327 @@ -1,13 +1,15 @@ # $Id$ from esys.finley import Rectangle -from esys.linearPDEs import Poisson +from esys.escript.linearPDEs import Poisson +from esys.escript import whereZero,saveVTK # generate domain: mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20) # define characteristic function of Gamma^D x = mydomain.getX() -gammaD = x[0].whereZero()+x[1].whereZero() +gammaD = whereZero(x[0])+whereZero(x[1]) # define PDE and get its solution u -mypde = Poisson(domain=mydomain,f=1,q=gammaD) +mypde = Poisson(domain=mydomain) +mypde.setValue(f=1,q=gammaD) u = mypde.getSolution() # write u to an external file -u.saveDX("u.dx") +saveVTK("u.xml",solution=u)