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

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

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

revision 3025 by ahallam, Thu May 6 01:20:46 2010 UTC revision 3029 by ahallam, Fri May 21 02:01:37 2010 UTC
# Line 45  if getMPISizeWorld() > 1: Line 45  if getMPISizeWorld() > 1:
45    
46  #################################################ESTABLISHING VARIABLES  #################################################ESTABLISHING VARIABLES
47  # where to save output data  # where to save output data
48  savepath = "data/example07"  savepath = "data/example07a"
49  mkDir(savepath)  mkDir(savepath)
50  #Geometric and material property related variables.  #Geometric and material property related variables.
51  mx = 1000. # model lenght  mx = 1000. # model lenght
# Line 112  while t<tend: Line 112  while t<tend:
112      u_m1=u; u=u_p1 # shift values back one time step for next iteration      u_m1=u; u=u_p1 # shift values back one time step for next iteration
113          # save current displacement, acceleration and pressure          # save current displacement, acceleration and pressure
114      if (t >= rtime):      if (t >= rtime):
115          saveVTK(os.path.join(savepath,"ex07b.%i.vtu"%n),displacement=length(u),tensor=pres)          saveVTK(os.path.join(savepath,"ex07a.%i.vtu"%n),displacement=length(u),tensor=pres)
116          rtime=rtime+rtime_inc #increment data save time          rtime=rtime+rtime_inc #increment data save time
117      # increment loop values      # increment loop values
118      t=t+h; n=n+1      t=t+h; n=n+1

Legend:
Removed from v.3025  
changed lines
  Added in v.3029

  ViewVC Help
Powered by ViewVC 1.1.26