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

Diff of /trunk/pyvisi/py_src/streamlinemodule.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1147 by ksteube, Wed May 16 06:39:11 2007 UTC revision 1148 by jongui, Wed May 16 22:45:33 2007 UTC
# Line 9  class StreamLineModule: Line 9  class StreamLineModule:
9      Class that defines the streamline module.      Class that defines the streamline module.
10      """      """
11    
12      def __init__(self, object, source):      def __init__(self):
13          """          """
14          Initialise the streamline module.          Initialise the streamline module.
15            """
16    
17            self.__vtk_stream_line = vtk.vtkStreamLine()
18    
19        def _setupStreamLineModule(self, object, source):
20            """
21            Setup the streamline.
22    
23          @type object: vtkUnstructuredGrid, etc          @type object: vtkUnstructuredGrid, etc
24          @param object: Input for the streamline          @param object: Input for the streamline
# Line 21  class StreamLineModule: Line 28  class StreamLineModule:
28    
29          self.__object = object          self.__object = object
30          self.__source = source          self.__source = source
         self.__vtk_stream_line = vtk.vtkStreamLine()  
   
         self.__setupStreamLineModule()  
   
     def __setupStreamLineModule(self):  
         """  
         Setup the streamline.  
         """  
31    
32          self.__setInput()          self.__setInput()
33          self.__setSource()          self.__setSource()
# Line 42  class StreamLineModule: Line 41  class StreamLineModule:
41          self.setIntegrationToBothDirections()          self.setIntegrationToBothDirections()
42          # Default integrator is set to vtkRungeKutta4          # Default integrator is set to vtkRungeKutta4
43          self.setIntegrator(vtk.vtkRungeKutta4())              self.setIntegrator(vtk.vtkRungeKutta4())    
         self.__vtk_stream_line.Update()  
44    
45      def __setInput(self):      def __setInput(self):
46          """          """
# Line 104  class StreamLineModule: Line 102  class StreamLineModule:
102          goes) and backward (where the streamline came from).          goes) and backward (where the streamline came from).
103          """          """
104    
105          self.__vtk_stream_line.SetIntegrationDirectionToIntegrateBothDirections()          self.__vtk_stream_line.\
106                    SetIntegrationDirectionToIntegrateBothDirections()
107    
108      def setIntegrator(self, integrator):      def setIntegrator(self, integrator):
109          """          """
# Line 131  class StreamLineModule: Line 130  class StreamLineModule:
130    
131          self.__vtk_stream_line.SpeedScalarsOff()          self.__vtk_stream_line.SpeedScalarsOff()
132    
133      def _getOutput(self):      def _getStreamLineModuleOutput(self):
134          """          """
135          Return the output of the streamline.          Return the output of the streamline.
136    

Legend:
Removed from v.1147  
changed lines
  Added in v.1148

  ViewVC Help
Powered by ViewVC 1.1.26