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

revision 2420 by gross, Thu May 14 02:28:58 2009 UTC revision 2455 by jfenwick, Wed Jun 3 03:29:07 2009 UTC
# Line 25  from esys.escript import * Line 25  from esys.escript import *
25  from esys.escript.pdetools import Locator  from esys.escript.pdetools import Locator
26  from esys.escript.linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
27  from esys.finley import Brick  from esys.finley import Brick
28  from numarray import identity,zeros,ones  from numpy import identity,zeros,ones
29
30  if not os.path.isdir("data"):  if not os.path.isdir("data"):
31     print "\nCreating subdirectory 'data'\n"     print "\nCreating subdirectory 'data'\n"
# Line 57  def wavePropagation(domain,h,tend,lam,mu Line 57  def wavePropagation(domain,h,tend,lam,mu
59
60     dunit=numarray.array([1.,0.,0.]) # defines direction of point source     dunit=numpy.array([1.,0.,0.]) # defines direction of point source
61
62     mypde.setValue(D=kronecker*rho)     mypde.setValue(D=kronecker*rho)
63     # ... set initial values ....     # ... set initial values ....
# Line 69  def wavePropagation(domain,h,tend,lam,mu Line 69  def wavePropagation(domain,h,tend,lam,mu
69     t=0     t=0
70
71     # define the location of the point source     # define the location of the point source
72     L=Locator(domain,numarray.array(xc))     L=Locator(domain,numpy.array(xc))
73     # find potential at point source     # find potential at point source
74     u_pc=L.getValue(u)     u_pc=L.getValue(u)
75     print "u at point charge=",u_pc     print "u at point charge=",u_pc

Legend:
 Removed from v.2420 changed lines Added in v.2455