Changeset 8649 for trunk/anuga_core/source/anuga/visualiser
- Timestamp:
- Nov 26, 2012, 8:57:18 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga/visualiser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/visualiser/commandline_viewer.py
r7276 r8649 39 39 # the stage height: 40 40 # 0 and 10 are the minimum and maximum values of the stage. 41 o.colour_height_quantity('stage', (lambda q: q['stage'], 0, 10))41 o.colour_height_quantity('stage', (lambda q: q['stage'], 1.0, 5.0)) 42 42 # Or with the magnitude of the momentum at that point: 43 43 # Needs the sqrt function from numeric. Again, 0 and 10 44 44 # define the colour range. 45 # o.colour_height_quantity('stage', 45 from numpy import sqrt 46 #o.colour_height_quantity('stage', 46 47 # (lambda q:sqrt((q['xmomentum'] ** 2) + 47 48 # (q['ymomentum'] ** 2)), 48 49 # 0, 10)) 50 o.colour_height_quantity('stage', 51 (lambda q: q['xmomentum']/ 52 (q['stage'] - q['elevation']), 53 0, 5)) 54 55 56 # Draw some axes on the visualiser so we can see how big the wave is 57 49 58 50 59 # Draw some axes on the visualiser so we can see how big the wave is -
trunk/anuga_core/source/anuga/visualiser/numerical_dam_break_dry.py
r8641 r8649 93 93 from anuga.visualiser import RealtimeVisualiser 94 94 vis = RealtimeVisualiser(domain) 95 vis.render_quantity_height("stage", zScale =1.0, dynamic=True) 95 vis.render_quantity_height("height",dynamic=True) 96 #vis.render_quantity_height("stage", zScale =1.0, dynamic=True) 96 97 vis.colour_height_quantity('stage', (0.0, 0.0, 1.0)) 97 98 vis.start() … … 110 111 fileName = 'stage_%03d' % i + '.vtk' 111 112 i = i+1 112 vis.store_height_quantity('stage',fileName) 113 113 vis.store_height_quantity('height',fileName) 114 114 115 115 #test against know data -
trunk/anuga_core/source/anuga/visualiser/visualiser.py
r8641 r8649 195 195 map(scalars.InsertNextValue, colour[0](self.build_quantity_dict())) 196 196 self.vtk_polyData[quantityName].GetPointData().SetScalars(scalars) 197 #mapper.SetScalarRange(colour[1:])197 mapper.SetScalarRange(colour[1:]) 198 198 mapper.Update() 199 199 else:
Note: See TracChangeset
for help on using the changeset viewer.