/[escript]/trunk/pyvisi/examples/escript_scalarData2D.py
ViewVC logotype

Diff of /trunk/pyvisi/examples/escript_scalarData2D.py

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

revision 604 by cochrane, Fri Jan 6 01:54:48 2006 UTC revision 605 by gross, Mon Mar 20 07:16:27 2006 UTC
# Line 4  Line 4 
4  # $Id: escript_scalarData2D.py,v 1.3 2006/01/03 08:46:20 paultcochrane Exp $  # $Id: escript_scalarData2D.py,v 1.3 2006/01/03 08:46:20 paultcochrane Exp $
5    
6  from esys.escript import *  from esys.escript import *
7  from esys import bruce  import esys.finley as fe
8    
9  import numarray  import numarray
10    
11  from pyvisi import *  from esys.pyvisi import *
12  from pyvisi.renderers.vtk import *  from esys.pyvisi.renderers.vtk import *
13    
14  tensorDomain = bruce.Rectangle(9,9,10,10)  online=True
15    
16    tensorDomain = fe.Rectangle(9,9)
17  tensorFunctionSpace=escript.ContinuousFunction(tensorDomain)  tensorFunctionSpace=escript.ContinuousFunction(tensorDomain)
18  domainData = tensorFunctionSpace.getX()  domainData = tensorFunctionSpace.getX()
19    
# Line 21  scalarData2D = sin(domainData[0]) Line 23  scalarData2D = sin(domainData[0])
23  scene = Scene()  scene = Scene()
24  plot = ContourPlot(scene)  plot = ContourPlot(scene)
25  plot.setData(scalarData2D)  plot.setData(scalarData2D)
26  scene.render(pause=True)  if online: scene.render(pause=True)
27    
28  scene.save(fname="escript_scalarData2D_contourPlot.png", format="png")  scene.save(fname="escript_scalarData2D_contourPlot.png", format="png")
29    
30  scene = Scene()  scene = Scene()
31  plot = SurfacePlot(scene)  plot = SurfacePlot(scene)
32  plot.setData(scalarData2D)  plot.setData(scalarData2D)
33  scene.render(pause=True)  if online: scene.render(pause=True)
34    
35  scene.save(fname="escript_scalarData2D_surfacePlot.png", format="png")  scene.save(fname="escript_scalarData2D_surfacePlot.png", format="png")
36    

Legend:
Removed from v.604  
changed lines
  Added in v.605

  ViewVC Help
Powered by ViewVC 1.1.26