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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 cochrane 417 #!/usr/bin/env python
2    
3    
4     # $Id: escript_twoByTwoTensorData1D.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     from pyvisi import *
12     from pyvisi.renderers.vtk import *
13    
14     vectorDomain = bruce.Rectangle(9,1,10,1)
15     vectorFunctionSpace=escript.ContinuousFunction(vectorDomain)
16    
17     tensorData2x2 = numarray.array([[1.0,2.0],[3.0,4.0]])
18    
19     # plotting 2x2 tensors in a 1D array
20     twoByTwoTensorData1D = Data(tensorData2x2, vectorFunctionSpace, True)
21     scene = Scene()
22     plot = EllipsoidPlot(scene)
23     plot.setData(twoByTwoTensorData1D)
24     scene.render(pause=True)
25    
26     scene.save(fname="escript_twoByTwoTensorData1D_ellipsoidPlot.png",
27     format="png")
28    
29     # vim: expandtab shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.26