/[escript]/trunk/doc/examples/cookbook/cblib1.py
ViewVC logotype

Diff of /trunk/doc/examples/cookbook/cblib1.py

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

revision 3891 by caltinay, Fri Nov 12 01:19:02 2010 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 103  def wavesolver2d(domain,h,tend,lam,mu,rh Line 103  def wavesolver2d(domain,h,tend,lam,mu,rh
103     # define small radius around point xc     # define small radius around point xc
104     # Lsup(x) returns the maximum value of the argument x     # Lsup(x) returns the maximum value of the argument x
105     src_radius = 50#2*Lsup(domain.getSize())     src_radius = 50#2*Lsup(domain.getSize())
106     print "src_radius = ",src_radius     print("src_radius = ",src_radius)
107    
108     dunit=numpy.array([0.,1.]) # defines direction of point source     dunit=numpy.array([0.,1.]) # defines direction of point source
109    
# Line 151  def wavesolver2d(domain,h,tend,lam,mu,rh Line 151  def wavesolver2d(domain,h,tend,lam,mu,rh
151       #stress =       #stress =
152        t+=h        t+=h
153        n+=1        n+=1
154        print n,"-th time step t ",t        print(n,"-th time step t ",t)
155        u_pot = cbphones(domain,u,[[300.,200.],[500.,200.],[750.,200.]],2)        u_pot = cbphones(domain,u,[[300.,200.],[500.,200.],[750.,200.]],2)
156    
157  #     print "u at point charge=",u_pc  #     print "u at point charge=",u_pc
# Line 224  def wavesolver2df(domain,h,tend,lam,mu,r Line 224  def wavesolver2df(domain,h,tend,lam,mu,r
224     # define small radius around point xc     # define small radius around point xc
225     # Lsup(x) returns the maximum value of the argument x     # Lsup(x) returns the maximum value of the argument x
226     src_radius = 50#2*Lsup(domain.getSize())     src_radius = 50#2*Lsup(domain.getSize())
227     print "src_radius = ",src_radius     print("src_radius = ",src_radius)
228    
229     dunit=numpy.array([0.,1.]) # defines direction of point source     dunit=numpy.array([0.,1.]) # defines direction of point source
230    
# Line 270  def wavesolver2df(domain,h,tend,lam,mu,r Line 270  def wavesolver2df(domain,h,tend,lam,mu,r
270       #stress =       #stress =
271       t+=h       t+=h
272       n+=1       n+=1
273       print n,"-th time step t ",t       print(n,"-th time step t ",t)
274       u_pot = cbphones(domain,u,[[300.,200.],[500.,200.],[750.,200.]],2)       u_pot = cbphones(domain,u,[[300.,200.],[500.,200.],[750.,200.]],2)
275    
276  #     print "u at point charge=",u_pc  #     print "u at point charge=",u_pc

Legend:
Removed from v.3891  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26