/[escript]/trunk/pyvisi/py_src/outline.py
ViewVC logotype

Annotation of /trunk/pyvisi/py_src/outline.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2313 - (hide annotations)
Tue Mar 17 03:41:17 2009 UTC (10 years, 6 months ago) by gross
File MIME type: text/x-python
File size: 1807 byte(s)
pyvisi is now rejecting to work under MPI with more than 1 processor. Tests for this configuration are dropped now.



1 ksteube 1809
2     ########################################################
3     #
4     # Copyright (c) 2003-2008 by University of Queensland
5     # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7     #
8     # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11     #
12     ########################################################
13    
14     __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15     Earth Systems Science Computational Center (ESSCC)
16     http://www.uq.edu.au/esscc
17     Primary Business: Queensland, Australia"""
18     __license__="""Licensed under the Open Software License version 3.0
19     http://www.opensource.org/licenses/osl-3.0.php"""
20     __url__="http://www.uq.edu.au/esscc/escript-finley"
21    
22 ksteube 1147 """
23 jongui 1197 @var __author__: name of author
24     @var __copyright__: copyrights
25     @var __license__: licence agreement
26     @var __url__: url entry point on documentation
27     @var __version__: version
28     @var __date__: date of the version
29 ksteube 1147 """
30    
31 jongui 1197 __author__="John Ngui, john.ngui@uq.edu.au"
32    
33    
34 ksteube 1147 import vtk
35 gross 2313 from esys.escript import getMPISizeWorld
36 ksteube 1147
37     class Outline:
38     """
39     Class that defines an outline.
40     """
41    
42     def __init__(self, object):
43     """
44     Initialise the outline.
45    
46     @type object: vtkUnstructuredGrid, etc
47     @param object: Data source to the outline
48     """
49 gross 2313 if getMPISizeWorld()>1:
50     raise ValueError,"pyvisi.Outline is not running on more than one processor."
51 ksteube 1147 self.__object = object
52     self.__vtk_outline = vtk.vtkOutlineFilter()
53     self.__setInput()
54    
55     def __setInput(self):
56     """
57     Set the input for the outline.
58     """
59    
60     self.__vtk_outline.SetInput(self.__object)
61    
62 jongui 1148 def _getOutlineOutput(self):
63 ksteube 1147 """
64     Return the output of the outline.
65    
66     @rtype: vtkPolyData
67     @return: Polyognal data
68     """
69    
70     return self.__vtk_outline.GetOutput()
71    

  ViewVC Help
Powered by ViewVC 1.1.26