Changeset 3963
- Timestamp:
- Nov 10, 2006, 12:35:03 PM (18 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
r3946 r3963 330 330 self.quantities[name].set_values(*args, **kwargs) 331 331 332 333 def get_quantity_names(self): 334 """Get a list of all the quantity names that this domain is aware of. 335 Any value in the result should be a valid input to get_quantity. 336 """ 337 return self.quantities.keys() 332 338 333 339 def get_quantity(self, name, location='vertices', indices = None): -
anuga_core/source/anuga/visualiser/commandline_viewer.py
r3823 r3963 57 57 58 58 # Start the visualiser (in its own thread). 59 o.run() 59 o.start() 60 # Wait for the visualiser to terminate before shutdown 61 o.join() 62 -
anuga_core/source/anuga/visualiser/realtime.py
r3960 r3963 61 61 qty_index = zeros(N_vert, Float) 62 62 triangles = self.source.get_triangles() 63 vertex_values, _ = self.source.get_quantity(quantityName).get_vertex_values(xy=False, smooth=False) 63 64 64 65 for n in range(len(triangles)): 65 66 for v in range(3): 66 qty_index[triangles[n][v]] = self.source.get_quantity(quantityName).vertex_values[n][v] 67 #qty_index[triangles[n][v]] = self.source.get_quantity(quantityName).vertex_values[n][v] 68 qty_index[triangles[n][v]] = vertex_values[n * 3 + v] 67 69 68 70 points = vtkPoints() … … 95 97 triangles = self.source.get_triangles() 96 98 quantities = {} 97 for q in self.source. quantities.keys():99 for q in self.source.get_quantity_names(): 98 100 quantities[q], _ = self.source.get_quantity(q).get_vertex_values(xy=False) 99 101 return quantities
Note: See TracChangeset
for help on using the changeset viewer.