Changeset 3537
- Timestamp:
- Aug 29, 2006, 1:05:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/visualiser/offline.py
r3536 r3537 1 from Numeric import array, Float, zeros1 from Numeric import array, Float, ravel, zeros 2 2 from Scientific.IO.NetCDF import NetCDFFile 3 3 from Tkinter import Button, E, W … … 19 19 20 20 self.vtk_heightQuantityCache = [] 21 for i in range(self.maxFrameNumber ):21 for i in range(self.maxFrameNumber + 1): # maxFrameNumber is zero indexed. 22 22 self.vtk_heightQuantityCache.append({}) 23 23 … … 38 38 self.vtk_heightQuantityCache[self.frameNumber][quantityName]\ 39 39 = self.read_height_quantity(quantityName, True, self.frameNumber); 40 print "Caching %s (frame %d)" % (quantityName, self.frameNumber)41 else:42 print "Using cache of %s (frame %d)" % (quantityName, self.frameNumber)43 40 polydata.SetPoints(self.vtk_heightQuantityCache[self.frameNumber][quantityName]) 44 41 else: … … 56 53 else: 57 54 N_vert = len(fin.variables[quantityName]) 58 x = array(fin.variables['x'], Float)59 y = array(fin.variables['y'], Float)55 x = ravel(array(fin.variables['x'], Float)) 56 y = ravel(array(fin.variables['y'], Float)) 60 57 if dynamic is True: 61 58 q = array(fin.variables[quantityName][self.frameNumber], Float) 62 59 else: 63 q = array(fin.variables[quantityName], Float)60 q = ravel(array(fin.variables[quantityName], Float)) 64 61 65 62 q *= self.height_zScales[quantityName]
Note: See TracChangeset
for help on using the changeset viewer.