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

Diff of /trunk/doc/examples/poisson_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 Poisson  from esys.escript.linearPDEs import Poisson
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  # generate domain:  # generate domain:
# Line 17  u = mypde.getSolution() Line 17  u = mypde.getSolution()
17  # write u to an external file  # write u to an external file
18  #saveVTK("u.xml",sol=u)  #saveVTK("u.xml",sol=u)
19    
20  s = Scene(renderer = Renderer.ONLINE, x_size = 500, y_size = 500)  s = Scene(renderer = Renderer.OFFLINE_JPG, x_size = 500, y_size = 500)
21    
22  dc = DataCollector(source = Source.ESCRIPT)  dc = DataCollector(source = Source.ESCRIPT)
23  dc.setData(sol = u)  dc.setData(sol = u)
# Line 25  dc.setData(sol = u) Line 25  dc.setData(sol = u)
25  Map(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,  Map(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,
26        lut = Lut.COLOR, cell_to_point = True, outline = True)        lut = Lut.COLOR, cell_to_point = True, outline = True)
27    
28    c = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST)
29    
30  s.render(image_name = "poisson.jpg")  s.render(image_name = "poisson.jpg")

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

  ViewVC Help
Powered by ViewVC 1.1.26