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

Contents of /trunk/pyvisi/examples/escript_scalarData3D.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 417 - (show annotations)
Fri Jan 6 01:54:48 2006 UTC (14 years, 8 months ago) by cochrane
File MIME type: text/x-python
File size: 647 byte(s)
Initial import to repository.  These are the example scripts specific for
escript Data object testing.

1 #!/usr/bin/env python
2
3
4 # $Id: escript_scalarData3D.py,v 1.3 2006/01/03 08:46:20 paultcochrane Exp $
5
6 from esys.escript import *
7 from esys import bruce
8
9 import numarray
10
11 from pyvisi import *
12 from pyvisi.renderers.vtk import *
13
14 brickDomain = bruce.Brick(9,9,9,10,10,10)
15 brickFunctionSpace = escript.ContinuousFunction(brickDomain)
16
17 domainData = brickFunctionSpace.getX()
18
19 # plotting scalar data in a 3D array
20 scalarData3D = sin(domainData[0])
21
22 scene = Scene()
23 plot = IsosurfacePlot(scene)
24 plot.setData(scalarData3D)
25 scene.render(pause=True)
26
27 scene.save(fname="escript_scalarData3D_isosurfacePlot.png", format="png")
28
29 # vim: expandtab shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.26