/[escript]/trunk/doc/examples/pyvisi/wave_with_pyvisi.py
ViewVC logotype

Diff of /trunk/doc/examples/pyvisi/wave_with_pyvisi.py

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

revision 1100 by jongui, Tue Apr 17 05:36:24 2007 UTC revision 1101 by jongui, Tue Apr 17 07:11:02 2007 UTC
# Line 67  def wavePropagation(domain,h,tend,lam,mu Line 67  def wavePropagation(domain,h,tend,lam,mu
67     # Create a DataCollector reading directly from escript objects.     # Create a DataCollector reading directly from escript objects.
68     dc = DataCollector(source = Source.ESCRIPT)     dc = DataCollector(source = Source.ESCRIPT)
69    
70     while t<tend:     while t<0.4:
71       # ... get current stress ....       # ... get current stress ....
72       g=grad(u)       g=grad(u)
73       stress=lam*trace(g)*kronecker+mu*(g+transpose(g))       stress=lam*trace(g)*kronecker+mu*(g+transpose(g))
# Line 115  def wavePropagation(domain,h,tend,lam,mu Line 115  def wavePropagation(domain,h,tend,lam,mu
115           s.render(image_name = PYVISI_EXAMPLE_IMAGES_PATH + "wave_%02d.jpg" % \           s.render(image_name = PYVISI_EXAMPLE_IMAGES_PATH + "wave_%02d.jpg" % \
116                   (n/10))                   (n/10))
117    
118     u_pc_data.close()     #u_pc_data.close()
119        
120  mydomain=Brick(ne,ne,10,l0=width,l1=width,l2=10.*width/32.)  mydomain=Brick(ne,ne,10,l0=width,l1=width,l2=10.*width/32.)
121  wavePropagation(mydomain,h,tend,lam,mu,rho,U0)  wavePropagation(mydomain,h,tend,lam,mu,rho,U0)

Legend:
Removed from v.1100  
changed lines
  Added in v.1101

  ViewVC Help
Powered by ViewVC 1.1.26