Пример #1
0
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(
         self, module_manager,
         vtk.vtkEnSight6Reader(), 'Reading vtkEnSight6.',
         (), ('vtkEnSight6',),
         replaceDoc=True,
         inputFunctions=None, outputFunctions=None)
Пример #2
0
 def readEnSight(self,ts=0,verbose=False):
     sys.exit('ReadEnSight function need improvement, access a connectionPort to a certain block of data')
     self.reader = vtk.vtkEnSight6Reader()
     self.reader.SetCaseFileName(self.filename)
     self.reader.ReadAllVariablesOn()
     self.reader.Update()
     timesteps = vtk_to_numpy(self.reader.GetTimeSets().GetItem(0))
     if ts >= len(timesteps):
         ts = len(timesteps) - 1 
     self.reader.SetTimeValue(timesteps[ts])
Пример #3
0
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(
         self,
         module_manager,
         vtk.vtkEnSight6Reader(),
         "Reading vtkEnSight6.",
         (),
         ("vtkEnSight6",),
         replaceDoc=True,
         inputFunctions=None,
         outputFunctions=None,
     )
Пример #4
0
 def readEnSight(self, ts=0, verbose=False):
     sys.exit(
         'ReadEnSight function need improvement, access a connectionPort to a certain block of data'
     )
     self.reader = vtk.vtkEnSight6Reader()
     self.reader.SetCaseFileName(self.filename)
     self.reader.ReadAllVariablesOn()
     self.reader.Update()
     timesteps = vtk_to_numpy(self.reader.GetTimeSets().GetItem(0))
     if ts >= len(timesteps):
         ts = len(timesteps) - 1
     self.reader.SetTimeValue(timesteps[ts])