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

Diff of /branches/numpy/doc/examples/pyvisi/wave_with_pyvisi.py

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

revision 2406 by jfenwick, Thu Apr 23 23:58:29 2009 UTC revision 2407 by jfenwick, Fri May 1 01:28:06 2009 UTC
# Line 29  from esys.escript import * Line 29  from esys.escript import *
29  from esys.escript.pdetools import Locator  from esys.escript.pdetools import Locator
30  from esys.escript.linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
31  from esys.finley import Brick  from esys.finley import Brick
32  from numarray import identity,zeros,ones  from numpy import identity,zeros,ones
33  from esys.pyvisi import Scene, DataCollector, Ellipsoid, Camera  from esys.pyvisi import Scene, DataCollector, Ellipsoid, Camera
34  from esys.pyvisi.constant import *  from esys.pyvisi.constant import *
35  import os  import os
# Line 62  def wavePropagation(domain,h,tend,lam,mu Line 62  def wavePropagation(domain,h,tend,lam,mu
62     # define small radius around point xc     # define small radius around point xc
63     # Lsup(x) returns the maximum value of the argument x     # Lsup(x) returns the maximum value of the argument x
64     src_radius = 0.1*Lsup(domain.getSize())     src_radius = 0.1*Lsup(domain.getSize())
65     dunit=numarray.array([1.,0.,0.]) # defines direction of point source     dunit=numpy.array([1.,0.,0.]) # defines direction of point source
66    
67     mypde.setValue(D=kronecker*rho)     mypde.setValue(D=kronecker*rho)
68     # ... set initial values ....     # ... set initial values ....
# Line 74  def wavePropagation(domain,h,tend,lam,mu Line 74  def wavePropagation(domain,h,tend,lam,mu
74     t=0     t=0
75    
76     # define the location of the point source     # define the location of the point source
77     L=Locator(domain,numarray.array(xc))     L=Locator(domain,numpy.array(xc))
78     # find potential at point source     # find potential at point source
79     u_pc=L.getValue(u)     u_pc=L.getValue(u)
80        

Legend:
Removed from v.2406  
changed lines
  Added in v.2407

  ViewVC Help
Powered by ViewVC 1.1.26