# Diff of /branches/symbolic_from_3470/dudley/test/python/FCT_test1.py

revision 3788 by caltinay, Tue Mar 15 04:23:54 2011 UTC revision 3789 by caltinay, Tue Jan 31 04:55:05 2012 UTC
# Line 93  c=0 Line 93  c=0
93  # saveVTK("u.%s.vtu"%c,u=u0)  # saveVTK("u.%s.vtu"%c,u=u0)
94  fc.setInitialSolution(u0)  fc.setInitialSolution(u0)
95  t=T0  t=T0
96  print "QUALITY FCT: time = %s pi"%(t/pi),inf(u0),sup(u0),integrate(u0)  print("QUALITY FCT: time = %s pi"%(t/pi),inf(u0),sup(u0),integrate(u0))
97  while t<T_END:  while t<T_END:
98      print "time step t=",t+dt        print("time step t=",t+dt)
99      u=fc.solve(dt, verbose=True)      u=fc.solve(dt, verbose=True)
100      print "QUALITY FCT: time = %s pi"%(t+dt/pi),inf(u),sup(u),integrate(u)      print("QUALITY FCT: time = %s pi"%(t+dt/pi),inf(u),sup(u),integrate(u))
101      if TEST_SUPG:      if TEST_SUPG:
102          #========== supg tests ================          #========== supg tests ================
103          nn=max(ceil(dt/dt_supg),1.)          nn=max(ceil(dt/dt_supg),1.)
# Line 112  while t<T_END: Line 112  while t<T_END:
112      c+=1      c+=1
113      t+=dt      t+=dt
114      if TEST_SUPG:      if TEST_SUPG:
115         print "QUALITY SUPG: time = %s pi"%(t/pi),inf(u_supg),sup(u_supg),integrate(u_supg)         print("QUALITY SUPG: time = %s pi"%(t/pi),inf(u_supg),sup(u_supg),integrate(u_supg))
116         # saveVTK("u2.%s.vtu"%c,u=u,u_supg=u_supg)         # saveVTK("u2.%s.vtu"%c,u=u,u_supg=u_supg)
117      else:      else:
118         # saveVTK("u.%s.vtu"%c,u=u)         # saveVTK("u.%s.vtu"%c,u=u)

Legend:
 Removed from v.3788 changed lines Added in v.3789