/[escript]/trunk/pyvisi_old/examples/escript_threeByThreeTensorData3D.py
ViewVC logotype

Contents of /trunk/pyvisi_old/examples/escript_threeByThreeTensorData3D.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 786 - (show annotations)
Tue Jul 25 04:58:05 2006 UTC (13 years, 1 month ago) by gross
File MIME type: text/x-python
File size: 1405 byte(s)
switched off pyvisi
1 #!/usr/bin/env python
2
3
4 # $Id: escript_threeByThreeTensorData3D.py,v 1.3 2006/01/05 00:13:50 paultcochrane Exp $
5 """
6 @var __author__: name of author
7 @var __license__: licence agreement
8 @var __copyright__: copyrights
9 @var __url__: url entry point on documentation
10 @var __version__: version
11 @var __date__: date of the version
12 """
13
14 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
15 http://www.access.edu.au
16 Primary Business: Queensland, Australia"""
17 __license__="""Licensed under the Open Software License version 3.0
18 http://www.opensource.org/licenses/osl-3.0.php"""
19 __author__="Paul Cochrane"
20 __url__="http://www.iservo.edu.au/esys"
21 __version__="$Revision$"
22 __date__="$Date$"
23
24 from esys.escript import *
25 from esys import bruce
26
27 import numarray
28
29 from esys.pyvisi import *
30 from esys.pyvisi.renderers.vtk import *
31
32 online=False
33
34 brickDomain = bruce.Brick(9,9,9,10,10,10)
35 brickFunctionSpace=escript.ContinuousFunction(brickDomain)
36
37 tensorData3x3 = numarray.array([[1.0,2.0,3.0],[3.0,4.0,5.0],[5.0,6.0,7.0]])
38
39 # plotting 3x3 tensors in a 3D array
40 threeByThreeTensorData3D = Data(tensorData3x3, brickFunctionSpace, True)
41 scene = Scene()
42 plot = EllipsoidPlot(scene)
43 plot.setData(threeByThreeTensorData3D)
44 if online: scene.render(pause=True)
45
46 scene.save(fname="escript_threeByThreeTensorData3D_ellipsoidPlot.png",
47 format="png")
48
49 # vim: expandtab shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.26