/[escript]/trunk/doc/examples/helmholtz_with_pyvisi.py
ViewVC logotype

Diff of /trunk/doc/examples/helmholtz_with_pyvisi.py

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

revision 1098 by jongui, Mon Apr 16 23:03:55 2007 UTC revision 1099 by jongui, Tue Apr 17 01:45:08 2007 UTC
# Line 2  Line 2 
2  from esys.escript import *  from esys.escript import *
3  from esys.escript.linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
4  from esys.finley import Rectangle  from esys.finley import Rectangle
5  from esys.pyvisi import Scene, DataCollector, Map  from esys.pyvisi import Scene, DataCollector, Map, Camera
6  from esys.pyvisi.constant import *  from esys.pyvisi.constant import *
7    
8  #... set some parameters ...  #... set some parameters ...
# Line 24  print "error is ",Lsup(u-x[0]) Line 24  print "error is ",Lsup(u-x[0])
24  # output should be similar to "error is 1.e-7"  # output should be similar to "error is 1.e-7"
25  #saveVTK("x0.xml",sol=u)  #saveVTK("x0.xml",sol=u)
26    
27  s = Scene(renderer = Renderer.ONLINE, x_size = 800, y_size = 600)  s = Scene(renderer = Renderer.OFFLINE_JPG, x_size = 800, y_size = 600)
28    
29  dc = DataCollector(source = Source.ESCRIPT)  dc = DataCollector(source = Source.ESCRIPT)
30  dc.setData(sol = u)  dc.setData(sol = u)
# Line 32  dc.setData(sol = u) Line 32  dc.setData(sol = u)
32  Map(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,  Map(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,
33        lut = Lut.COLOR, cell_to_point = False, outline = True)        lut = Lut.COLOR, cell_to_point = False, outline = True)
34    
35    c = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST)
36    
37  s.render(image_name = "helmholtz.jpg")  s.render(image_name = "helmholtz.jpg")

Legend:
Removed from v.1098  
changed lines
  Added in v.1099

  ViewVC Help
Powered by ViewVC 1.1.26