Changeset 3537


Ignore:
Timestamp:
Aug 29, 2006, 1:05:41 PM (18 years ago)
Author:
steve
Message:

Fixed the offline.py visualiser under Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/visualiser/offline.py

    r3536 r3537  
    1 from Numeric import array, Float, zeros
     1from Numeric import array, Float, ravel, zeros
    22from Scientific.IO.NetCDF import NetCDFFile
    33from Tkinter import Button, E, W
     
    1919
    2020        self.vtk_heightQuantityCache = []
    21         for i in range(self.maxFrameNumber):
     21        for i in range(self.maxFrameNumber + 1): # maxFrameNumber is zero indexed.
    2222            self.vtk_heightQuantityCache.append({})
    2323
     
    3838                self.vtk_heightQuantityCache[self.frameNumber][quantityName]\
    3939                    = 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)
    4340            polydata.SetPoints(self.vtk_heightQuantityCache[self.frameNumber][quantityName])
    4441        else:
     
    5653        else:
    5754            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))
    6057        if dynamic is True:
    6158            q = array(fin.variables[quantityName][self.frameNumber], Float)
    6259        else:
    63             q = array(fin.variables[quantityName], Float)
     60            q = ravel(array(fin.variables[quantityName], Float))
    6461
    6562        q *= self.height_zScales[quantityName]
Note: See TracChangeset for help on using the changeset viewer.