Changeset 3960
- Timestamp:
- Nov 9, 2006, 4:47:53 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/visualiser/realtime.py
r3958 r3960 45 45 def setup_grid(self): 46 46 self.vtk_cells = vtkCellArray() 47 triangles = self.source. triangles48 N_tri = self.source.number_of_triangles47 triangles = self.source.get_triangles() 48 N_tri = len(self.source) 49 49 verticies = self.source.get_vertex_coordinates() 50 50 N_vert = len(verticies) … … 58 58 59 59 def update_height_quantity(self, quantityName, dynamic=True): 60 N_vert = len(self.source. vertex_coordinates)60 N_vert = len(self.source.get_vertex_coordinates()) 61 61 qty_index = zeros(N_vert, Float) 62 triangles = self.source.get_triangles() 62 63 63 for n in range(len( self.source.triangles)):64 for n in range(len(triangles)): 64 65 for v in range(3): 65 qty_index[ self.source.triangles[n][v]] = self.source.quantities[quantityName].vertex_values[n][v]66 qty_index[triangles[n][v]] = self.source.get_quantity(quantityName).vertex_values[n][v] 66 67 67 68 points = vtkPoints() … … 92 93 93 94 def build_quantity_dict(self): 94 N_vert = len(self.source.vertex_coordinates)95 triangles = self.source.get_triangles() 95 96 quantities = {} 96 97 for q in self.source.quantities.keys(): 97 quantities[q] = zeros(N_vert, Float) 98 for n in range(len(self.source.triangles)): 99 for v in range(3): 100 quantities[q][self.source.triangles[n][v]] = self.source.quantities[q].vertex_values[n][v] 98 quantities[q], _ = self.source.get_quantity(q).get_vertex_values(xy=False) 101 99 return quantities 102 100
Note: See TracChangeset
for help on using the changeset viewer.