/[escript]/trunk/doc/examples/usersguide/heatedblock.py
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2484 by gross, Mon Jun 22 04:22:19 2009 UTC revision 2502 by gross, Tue Jun 30 05:49:22 2009 UTC
# 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
57  g=grad(u)  g=grad(u)
58  sigma=mu*(g+transpose(g))+lam*trace(g)*kronecker(mydomain)-sigma0  sigma=mu*(g+transpose(g))+lam*trace(g)*kronecker(mydomain)-sigma0

Legend:
Removed from v.2484  
changed lines
  Added in v.2502

  ViewVC Help
Powered by ViewVC 1.1.26