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

trunk/doc/user/examples/wave.py revision 582 by lkettle, Wed Mar 8 05:54:06 2006 UTC trunk/doc/examples/wave.py revision 1161 by jongui, Wed May 23 04:17:52 2007 UTC
# Line 42  def wavePropagation(domain,h,tend,lam,mu Line 42  def wavePropagation(domain,h,tend,lam,mu
42     t=0     t=0
43
44     # define the location of the point source     # define the location of the point source
45     L=Locator(domain,xc)     L=Locator(domain,numarray.array(xc))
46     # find potential at point source     # find potential at point source
47     u_pc=L.getValue(u)     u_pc=L.getValue(u)
48     print "u at point charge=",u_pc     print "u at point charge=",u_pc
# Line 70  def wavePropagation(domain,h,tend,lam,mu Line 70  def wavePropagation(domain,h,tend,lam,mu
70       t+=h       t+=h
71       n+=1       n+=1
72       print n,"-th time step t ",t       print n,"-th time step t ",t
L=Locator(domain,xc)
73       u_pc=L.getValue(u)       u_pc=L.getValue(u)
74       print "u at point charge=",u_pc       print "u at point charge=",u_pc
75
# Line 83  def wavePropagation(domain,h,tend,lam,mu Line 82  def wavePropagation(domain,h,tend,lam,mu
82
83       # ... save current acceleration in units of gravity and displacements       # ... save current acceleration in units of gravity and displacements
84       if n==1 or n%10==0: saveVTK("./data/usoln.%i.vtu"%(n/10),acceleration=length(a)/9.81,       if n==1 or n%10==0: saveVTK("./data/usoln.%i.vtu"%(n/10),acceleration=length(a)/9.81,
85       displacement = length(u), Ux = u[0] )       displacement = length(u), tensor = stress, Ux = u[0] )
86
87     u_pc_data.close()     u_pc_data.close()
88

Legend:
 Removed from v.582 changed lines Added in v.1161