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

Diff of /trunk/doc/examples/cookbook/example03b.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 74  tend=200.* yr #the time we want to end t Line 74  tend=200.* yr #the time we want to end t
74  outputs = 200 # number of time steps required.  outputs = 200 # number of time steps required.
75  h=(tend-t)/outputs #size of time step  h=(tend-t)/outputs #size of time step
76  #user warning  #user warning
77  print "Expected Number of Output Files is: ", outputs  print("Expected Number of Output Files is: ", outputs)
78  print "Step size is: ", h/day, "days"  print("Step size is: ", h/day, "days")
79  i=0 #loop counter  i=0 #loop counter
80  #the folder to put our outputs in, leave blank "" for script path  #the folder to put our outputs in, leave blank "" for script path
81  save_path= os.path.join("data","example03")  save_path= os.path.join("data","example03")
# Line 108  while t<=tend: Line 108  while t<=tend:
108        mypde.setValue(Y=qH+T*rhocp/h)        mypde.setValue(Y=qH+T*rhocp/h)
109        T=mypde.getSolution()        T=mypde.getSolution()
110        saveVTK(os.path.join(save_path,"data.%03d.vtu"%i), T=T)        saveVTK(os.path.join(save_path,"data.%03d.vtu"%i), T=T)
111        print "time step %s at t=%e days completed."%(i,t/day)        print("time step %s at t=%e days completed."%(i,t/day))
112    
113  # use  # use
114  #  #

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

  ViewVC Help
Powered by ViewVC 1.1.26