--- trunk/doc/user/examples/diffusion.py 2006/02/28 03:59:06 568 +++ trunk/doc/user/examples/diffusion.py 2006/02/28 05:34:37 569 @@ -1,6 +1,6 @@ # $Id$ -from mytools import Helmholtz -from esys.escript import Lsup,length,whereNegative,saveVTK +from esys.escript import * +from esys.escript.linearPDEs import LinearPDE from esys.finley import Rectangle #... set some parameters ... xc=[0.02,0.002] @@ -18,7 +18,9 @@ #... generate domain ... mydomain = Rectangle(l0=0.05,l1=0.01,n0=250, n1=50) #... open PDE ... -mypde=Helmholtz(mydomain) +mypde=LinearPDE(mydomain) +mypde.setSymmetryOn() +mypde.setValue(A=kappa*kronecker(mydomain),D=rhocp/h,d=eta,y=eta*Tref) # ... set heat source: .... x=mydomain.getX() q=qc*whereNegative(length(x-xc)-r) @@ -29,6 +31,6 @@ i+=1 t+=h print "time step :",t - mypde.setValue(kappa=kappa,omega=rhocp/h,f=q+rhocp/h*T,eta=eta,g=eta*Tref) + mypde.setValue(Y=q+rhocp/h*T) T=mypde.getSolution() - saveVTK("T%d.xml"%i,temp=T) + saveVTK("T.%d.xml"%i,temp=T)