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

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

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

revision 1097 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 Brick  from esys.finley import Brick
5  from esys.pyvisi import Scene, DataCollector, Map  from esys.pyvisi import Scene, DataCollector, Velocity, Camera
6  from esys.pyvisi.constant import *  from esys.pyvisi.constant import *
7  #... set some parameters ...  #... set some parameters ...
8  lam=1.  lam=1.
# Line 43  sigma_mises=sqrt(((sigma[0,0]-sigma[1,1] Line 43  sigma_mises=sqrt(((sigma[0,0]-sigma[1,1]
43  #... output ...  #... output ...
44  #saveVTK("deform.xml",disp=u,stress=sigma_mises)  #saveVTK("deform.xml",disp=u,stress=sigma_mises)
45    
46  s = Scene(renderer = Renderer.ONLINE, x_size = 500, y_size = 500)  s = Scene(renderer = Renderer.OFFLINE_JPG, x_size = 500, y_size = 500)
47    
48  dc = DataCollector(source = Source.ESCRIPT)  dc = DataCollector(source = Source.ESCRIPT)
49  dc.setData(disp = u,stress = sigma_mises)  dc.setData(disp = u,stress = sigma_mises)
50    
51  Map(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,  v = Velocity(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST,
52        lut = Lut.COLOR, cell_to_point = True, outline = True)          arrow = Arrow.THREE_D, color_mode = ColorMode.SCALAR,
53            lut = Lut.COLOR, cell_to_point = True, outline = True)
54    v.setScaleFactor(scale_factor = 0.3)
55    
56    c = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST)
57    c.isometricView()
58    
59  s.render(image_name = "heatedblock.jpg")  s.render(image_name = "heatedblock.jpg")

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

  ViewVC Help
Powered by ViewVC 1.1.26