/[escript]/trunk/doc/examples/usersguide/mount.py
ViewVC logotype

Diff of /trunk/doc/examples/usersguide/mount.py

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

revision 3891 by caltinay, Wed Feb 1 06:16:25 2012 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 1  Line 1 
1    
2    from __future__ import print_function
3  ########################################################  ########################################################
4  #  #
5  # Copyright (c) 2003-2010 by University of Queensland  # Copyright (c) 2003-2010 by University of Queensland
# Line 60  else: Line 62  else:
62    
63  mts=Mountains(mydomain,eps=EPS)  mts=Mountains(mydomain,eps=EPS)
64  while t<T_END:  while t<T_END:
65      print "STEP ", t      print("STEP ", t)
66      mts.setVelocity(v*cos(OMEGA*t))      mts.setVelocity(v*cos(OMEGA*t))
67      Z=mts.update()      Z=mts.update()
68            
69      saveVTK("state.%d.vtu"%n,sol=Z, v=mts.getVelocity())      saveVTK("state.%d.vtu"%n,sol=Z, v=mts.getVelocity())
70      print "Integral(Z)=",integrate(Z),Lsup(mts.getVelocity()[DIM-1])      print("Integral(Z)=",integrate(Z),Lsup(mts.getVelocity()[DIM-1]))
71      n+=1      n+=1
72      t+=mts.getSafeTimeStepSize()      t+=mts.getSafeTimeStepSize()
73    

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

  ViewVC Help
Powered by ViewVC 1.1.26