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

trunk/doc/examples/heatedblock.py revision 1892 by artak, Fri Oct 17 00:55:59 2008 UTC trunk/doc/examples/usersguide/heatedblock.py revision 2534 by caltinay, Thu Jul 16 06:49:19 2009 UTC
# Line 17  http://www.uq.edu.au/esscc Line 17  http://www.uq.edu.au/esscc
21
22  from esys.escript import *  from esys.escript import *
23  from esys.escript.linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
# Line 50  msk=whereZero(x[0])*[1.,0.,0.] \ Line 50  msk=whereZero(x[0])*[1.,0.,0.] \
50     +whereZero(x[2])*[0.,0.,1.]     +whereZero(x[2])*[0.,0.,1.]
51  sigma0=(lam+2./3.*mu)*alpha*(T-T_ref)*kronecker(mydomain)  sigma0=(lam+2./3.*mu)*alpha*(T-T_ref)*kronecker(mydomain)
52  mypde.setValue(A=C,X=sigma0,q=msk)  mypde.setValue(A=C,X=sigma0,q=msk)
53  mypde.setSolverMethod(mypde.PCG,mypde.AMG)  mypde.getSolverOptions().setVerbosityOn()
54  #... solve pde ...  #... solve pde ...
55  u=mypde.getSolution(verbose=True)  u=mypde.getSolution()
56  #... calculate von-Misses  #... calculate von-Misses