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

Diff of /trunk/doc/examples/diffusion_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 30  qH=qc*whereNegative(length(x-xc)-r) Line 30  qH=qc*whereNegative(length(x-xc)-r)
30  # ... set initial temperature ....  # ... set initial temperature ....
31  T=Tref  T=Tref
32    
33  s = Scene(renderer = Renderer.DISPLAY, x_size = 500, y_size = 500)  s = Scene(renderer = Renderer.OFFLINE_JPG, x_size = 500, y_size = 500)
34  dc = DataCollector(source = Source.ESCRIPT)  dc = DataCollector(source = Source.ESCRIPT)
35    
36  # ... start iteration:  # ... start iteration:
# Line 46  while t<tend: Line 46  while t<tend:
46        Map(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,        Map(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,
47                lut = Lut.COLOR, cell_to_point = False, outline = True)                lut = Lut.COLOR, cell_to_point = False, outline = True)
48    
49        s.render(image_name = "diffusion_%2d.jpg" % i)        c = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST)
50    
51          s.render(image_name = "diffusion_%02d.jpg" % i)
52    

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

  ViewVC Help
Powered by ViewVC 1.1.26