/[escript]/trunk/finley/test/python/linearElastic.py
ViewVC logotype

Diff of /trunk/finley/test/python/linearElastic.py

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

revision 3026 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3027 by gross, Wed May 12 05:26:09 2010 UTC
# Line 58  press=whereNegative(fe.getX()[0]-0.1)*20 Line 58  press=whereNegative(fe.getX()[0]-0.1)*20
58  mypde=LinearPDE(domain)  mypde=LinearPDE(domain)
59  mypde.setValue(A=setHookTensor(e,lamb,nu),y=press,q=msk,r=[0,0])  mypde.setValue(A=setHookTensor(e,lamb,nu),y=press,q=msk,r=[0,0])
60  mypde.setSymmetryOn()  mypde.setSymmetryOn()
61  mypde.setSolverMethod(preconditioner=mypde.AMG)  mypde.getSolverOptions().setVerbosityOn()
62    mypde.getSolverOptions().setPreconditioner(mypde.getSolverOptions().AMG)
63  # solve for the displacements:  # solve for the displacements:
64  u_d=mypde.getSolution(verbose=True)  u_d=mypde.getSolution()
65  # get the gradient and calculate the stress:  # get the gradient and calculate the stress:
66  g=grad(u_d)  g=grad(u_d)
67  stress=lamb*trace(g)*kronecker(domain)+nu*(g+transpose(g))  stress=lamb*trace(g)*kronecker(domain)+nu*(g+transpose(g))

Legend:
Removed from v.3026  
changed lines
  Added in v.3027

  ViewVC Help
Powered by ViewVC 1.1.26