/[escript]/branches/symbolic_from_3470/dudley/test/python/FCT_test2.py
ViewVC logotype

Diff of /branches/symbolic_from_3470/dudley/test/python/FCT_test2.py

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

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 96  dom.setX(2*dom.getX()-1) Line 96  dom.setX(2*dom.getX()-1)
96  x=dom.getX()  x=dom.getX()
97  u0=1/(4.*pi*E*T0)**(DIM/2.)*exp(-length(dom.getX()-getCenter(T0))**2/(4.*E*T0))  u0=1/(4.*pi*E*T0)**(DIM/2.)*exp(-length(dom.getX()-getCenter(T0))**2/(4.*E*T0))
98    
99  print "QUALITY ",QUALITY(T0,u0)  print("QUALITY ",QUALITY(T0,u0))
100    
101  x=Function(dom).getX()  x=Function(dom).getX()
102  if DIM == 2:  if DIM == 2:
# Line 120  saveVTK("u.%s.vtu"%c,u=u0) Line 120  saveVTK("u.%s.vtu"%c,u=u0)
120  fc.setInitialSolution(u0)  fc.setInitialSolution(u0)
121  t=T0  t=T0
122  while t<T_END:  while t<T_END:
123      print "time step t=",t+dt        print("time step t=",t+dt)  
124      u=fc.solve(dt)        u=fc.solve(dt)  
125      if TEST_SUPG:      if TEST_SUPG:
126          #========== supg tests ================          #========== supg tests ================
# Line 135  while t<T_END: Line 135  while t<T_END:
135              nnn+=1              nnn+=1
136      c+=1      c+=1
137      t+=dt      t+=dt
138      print "QUALITY FCT: time = %s pi"%(t/pi),QUALITY(t,u),      print("QUALITY FCT: time = %s pi"%(t/pi),QUALITY(t,u), end=' ')
139      if TEST_SUPG:      if TEST_SUPG:
140         print "QUALITY SUPG: ",QUALITY(t,u_supg)         print("QUALITY SUPG: ",QUALITY(t,u_supg))
141         # saveVTK("u.%s.vtu"%c,u=u,u_supg=u_supg)         # saveVTK("u.%s.vtu"%c,u=u,u_supg=u_supg)
142      else:      else:
143         # 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

  ViewVC Help
Powered by ViewVC 1.1.26