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

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

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

revision 891 by gross, Tue Nov 7 08:31:26 2006 UTC revision 892 by gross, Wed Nov 8 06:14:29 2006 UTC
# Line 73  class SlippingFault(SaddlePointProblem): Line 73  class SlippingFault(SaddlePointProblem):
73           return  self.__pde_u.getSolution()           return  self.__pde_u.getSolution()
74    
75        def solve_g(self,u,tol=1.e-8):        def solve_g(self,u,tol=1.e-8):
76           dp= (self.slip-jump(u))*lam_lmbd/FunctionOnContactZero(self.domain).getSize()**2           dp=-(self.slip-jump(u))*lam_lmbd/FunctionOnContactZero(self.domain).getSize()
77             print dp
78           return  dp           return  dp
79    
80    
# Line 97  for i in range(3): Line 98  for i in range(3):
98  u0=Vector(0.,Solution(dom))  u0=Vector(0.,Solution(dom))
99  p0=Vector(1.,FunctionOnContactZero(dom))  p0=Vector(1.,FunctionOnContactZero(dom))
100  prop.initialize(fixed_u_mask=mask,slip=Data(s,FunctionOnContactZero(dom)), density=rho,lmbd=lam_lmbd, mu=lam_mu)  prop.initialize(fixed_u_mask=mask,slip=Data(s,FunctionOnContactZero(dom)), density=rho,lmbd=lam_lmbd, mu=lam_mu)
101  u,p=prop.solve(u0,p0,iter_max=50,tolerance=0.1,accepted_reduction=10.)  u,p=prop.solve(u0,p0,iter_max=50,tolerance=0.1,accepted_reduction=0.99)
102  saveVTK("dis.xml",u=u)  saveVTK("dis.xml",u=u)
103  saveVTK("fault.xml",sigma=p,s=jump(u))  saveVTK("fault.xml",sigma=p,s=jump(u))

Legend:
Removed from v.891  
changed lines
  Added in v.892

  ViewVC Help
Powered by ViewVC 1.1.26