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

Annotation of /trunk/pyvisi/examples/escript_threeByThreeTensorData2D.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 605 - (hide annotations)
Mon Mar 20 07:16:27 2006 UTC (13 years, 8 months ago) by gross
File MIME type: text/x-python
File size: 793 byte(s)
pyvisi with vtk runs noe on the altix
1 cochrane 417 #!/usr/bin/env python
2    
3    
4     # $Id: escript_threeByThreeTensorData2D.py,v 1.3 2006/01/05 00:13:50 paultcochrane Exp $
5    
6     from esys.escript import *
7     from esys import bruce
8    
9     import numarray
10    
11 gross 605 from esys.pyvisi import *
12     from esys.pyvisi.renderers.vtk import *
13 cochrane 417
14 gross 605 online=False
15    
16 cochrane 417 tensorDomain = bruce.Rectangle(9,9,10,10)
17     tensorFunctionSpace=escript.ContinuousFunction(tensorDomain)
18    
19     tensorData3x3 = numarray.array([[1.0,2.0,3.0],[3.0,4.0,5.0],[5.0,6.0,7.0]])
20    
21     # plotting 3x3 tensors in a 2D array
22     threeByThreeTensorData2D = Data(tensorData3x3, tensorFunctionSpace, True)
23     scene = Scene()
24     plot = EllipsoidPlot(scene)
25     plot.setData(threeByThreeTensorData2D)
26 gross 605 if online: scene.render(pause=True)
27 cochrane 417
28     scene.save(fname="escript_threeByThreeTensorData2D_ellipsoidPlot.png",
29     format="png")
30    
31     # vim: expandtab shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.26