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

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

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

revision 1197 by jongui, Mon Jun 18 02:08:34 2007 UTC revision 1809 by ksteube, Thu Sep 25 06:43:44 2008 UTC
# Line 1  Line 1 
1    
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  """  """
23  @var __author__: name of author  @var __author__: name of author
24  @var __copyright__: copyrights  @var __copyright__: copyrights
# Line 8  Line 29 
29  """  """
30    
31  __author__="John Ngui, john.ngui@uq.edu.au"  __author__="John Ngui, john.ngui@uq.edu.au"
 __copyright__="""  Copyright (c) 2006 by ACcESS MNRF  
                     http://www.access.edu.au  
                 Primary Business: Queensland, Australia"""  
 __license__="""Licensed under the Open Software License version 3.0  
              http://www.opensource.org/licenses/osl-3.0.php"""  
 __url__="http://www.iservo.edu.au/esys"  
 __version__="$Revision$"  
 __date__="$Date$"  
32    
33    
34  import vtk  import vtk
# Line 87  class DataCollector: Line 100  class DataCollector:
100          self.__count += 1          self.__count += 1
101    
102          if(self.__source == Source.XML):          if(self.__source == Source.XML):
103              # Check whether the specified file exists, otherwise exit.              # Check whether the specified file exists, otherwise an error is
104                # raised.
105              if not(os.access(file_name, os.F_OK)):              if not(os.access(file_name, os.F_OK)):
106                  raise IOError("\nERROR: '%s' file does NOT exists.\n" % \                  raise IOError("\nERROR: '%s' file does NOT exists.\n" % \
107                          file_name)                          file_name)
# Line 119  class DataCollector: Line 133  class DataCollector:
133              # will always be displayed. The reason Modified is used is              # will always be displayed. The reason Modified is used is
134              # because the same temporary file name is always used              # because the same temporary file name is always used
135              # (previous file is overwritten). Modified MUST NOT be used in              # (previous file is overwritten). Modified MUST NOT be used in
136              # setFileName, it can cause incorrect output such as map.              # setFileName, as it can cause incorrect output such as map.
137              self.__vtk_xml_reader.Modified()              self.__vtk_xml_reader.Modified()
138    
139              # Update must be called after Modified. If Update is called before              # Update must be called after Modified. If Update is called before
# Line 150  class DataCollector: Line 164  class DataCollector:
164          """          """
165    
166          # Check whether the specified scalar is available in either point          # Check whether the specified scalar is available in either point
167          # or cell data. If not available, error is raised.          # or cell data. If not available, an error is raised.
168    
169          # NOTE: This check is similar to the check used in _getScalarRange          # NOTE: This check is similar to the check used in _getScalarRange
170          # but this is used only when a scalar attribute has been specified.          # but this is used only when a scalar attribute has been specified.
# Line 283  class DataCollector: Line 297  class DataCollector:
297                  self.__get_attribute_list(                  self.__get_attribute_list(
298                  self._getDataCollectorOutput().GetPointData())                  self._getDataCollectorOutput().GetPointData())
299    
300          # Get all the available cell data attribute into another list.            # Get all the available cell data attributes into another list.
301          self.__cell_attribute = \          self.__cell_attribute = \
302                  self.__get_attribute_list(                  self.__get_attribute_list(
303                  self._getDataCollectorOutput().GetCellData())                  self._getDataCollectorOutput().GetCellData())
# Line 297  class DataCollector: Line 311  class DataCollector:
311          """          """
312    
313          # Check whether any scalar is available in either point or cell data.          # Check whether any scalar is available in either point or cell data.
314          # If not available, program exits.          # If not available, an error is raised.
315    
316          # NOTE: This check is similar to the check used in _setActiveScalar          # NOTE: This check is similar to the check used in _setActiveScalar
317          # but this is used only when no scalar attribute has been specified.          # but this is used only when no scalar attribute has been specified.
# Line 319  class DataCollector: Line 333  class DataCollector:
333          """          """
334                    
335          # Check whether any vector is available in either point or cell data.          # Check whether any vector is available in either point or cell data.
336          # If not available, program exits.          # If not available, an error is raised.
337    
338          # NOTE: This check is similar to the check used in _setActiveVector          # NOTE: This check is similar to the check used in _setActiveVector
339          # but this is used only when no vector attribute has been specified.          # but this is used only when no vector attribute has been specified.
# Line 351  class DataCollector: Line 365  class DataCollector:
365          """          """
366    
367          # Check whether any tensor is available in either point or cell data.          # Check whether any tensor is available in either point or cell data.
368          # If not available, program exits.          # If not available, an error is raised.
369    
370          # NOTE: This check is similar to the check used in _setActiveTensor          # NOTE: This check is similar to the check used in _setActiveTensor
371          # but this is used only when no tensor attribute has been specified.          # but this is used only when no tensor attribute has been specified.

Legend:
Removed from v.1197  
changed lines
  Added in v.1809

  ViewVC Help
Powered by ViewVC 1.1.26