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

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

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

revision 4004 by jfenwick, Fri Sep 21 02:47:54 2012 UTC revision 4005 by caltinay, Fri Sep 28 06:09:03 2012 UTC
# Line 212  while t<tend: Line 212  while t<tend:
212      if (n < ls):      if (n < ls):
213          y=source[n]*(cos(length(x-xc)*3.1415/src_length)+1)*whereNegative(length(x-xc)-src_length)          y=source[n]*(cos(length(x-xc)*3.1415/src_length)+1)*whereNegative(length(x-xc)-src_length)
214          y=y*src_dir; mypde.setValue(y=y) #set the source as a function on the boundary          y=y*src_dir; mypde.setValue(y=y) #set the source as a function on the boundary
215      print(n,"-th time step t ",t)      print("time step %d, t=%s"%(n,t))

Legend:
Removed from v.4004  
changed lines
  Added in v.4005

  ViewVC Help
Powered by ViewVC 1.1.26