Changeset 2220
- Timestamp:
- Jan 18, 2006, 2:11:39 PM (19 years ago)
- Location:
- inundation
- Files:
-
- 66 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/netherlands.py
r2215 r2220 83 83 N = 130 #size = 33800 84 84 N = 600 #Size = 720000 85 N = 2 585 N = 20 86 86 87 87 … … 171 171 172 172 173 for t in domain.evolve(yieldstep = 0.005, finaltime = 1.0):173 for t in domain.evolve(yieldstep = 0.005, finaltime = None): 174 174 domain.write_time() 175 175 #domain.write_boundary() -
inundation/pyvolution/shallow_water_vtk.py
r2214 r2220 61 61 62 62 self.distribute_to_vertices_and_edges() 63 #s = '''for x in range(5):64 # self.distribute_to_vertices_and_edges()'''65 # global profiler66 # profiler = profiler.runctx(s, globals(), locals())67 63 68 64 #Initialise real time viz if requested -
inundation/pyvolution/vtk_realtime_visualiser.py
r2214 r2220 16 16 setup: Dictionary mapping quantity name -> boolean. 17 17 if setup[q] is true, draw the quantity when the visualiser starts. 18 18 19 19 updating: Dictionary mapping quantity name -> boolean. 20 20 if updating[q] is true, update the rendering of this quantity each 21 21 timestep. 22 22 23 23 qcolor: Dictionary mapping quantity name -> (float, float, float) 24 24 if the name of a quantity is found in qcolor, the colour specified (in 25 25 (r, g, b) from 0.0 to 1.0) is used for display of that quantity instead of 26 26 (0.5, 0.5, 0.5) (the default) 27 27 28 28 scale_z: Dictionary mapping quantity name -> float 29 29 Override the z scaling of this quantity with the float specified. … … 50 50 self.idle = threading.Event() 51 51 self.redraw_ready = threading.Event() 52 52 53 53 # Internal use - storage of vtk objects 54 54 self.grids = {} … … 77 77 self.range_y = self.max_y - self.min_y 78 78 self.range_xy = max(self.range_x, self.range_y) 79 79 80 80 def run(self): 81 81 self.initialise_gui() 82 82 self.add_axes() 83 83 self.setup_all() 84 self.root.after(1 00, self.idle.set)84 self.root.after(1, self.idle.set) 85 85 self.root.mainloop() 86 86 … … 88 88 """Prepare the GUI for the Visualiser, and set up the 89 89 renderer. 90 90 91 91 """ 92 92 # Using the TK VTK widget allows extendability … … 95 95 96 96 # Message handling with after 97 self.root.after(1 00, self.redraw)98 97 self.root.after(1, self.redraw) 98 99 99 self.renderWidget = vtkTkRenderWidget(self.root, width=400, height=400) 100 100 self.renderWidget.pack(expand='true', fill='both') … … 105 105 self.quitButton = Tkinter.Button(self.root, text='Quit', command=self.shutdown) 106 106 self.quitButton.pack(side=Tkinter.BOTTOM) 107 107 108 108 def add_axes(self): 109 109 """Add axes to this Visualiser … … 150 150 else: 151 151 scale = self.default_scale_z 152 152 153 153 for v in range(self.N_vert): 154 154 grid.InsertNextPoint(self.vert_index[v][0], … … 161 161 self.polydata[q] = vtk.vtkPolyData() 162 162 polydata = self.polydata[q] 163 163 164 164 polydata.SetPoints(grid) 165 165 polydata.SetPolys(self.cells) … … 193 193 if self.updating[q]: 194 194 self.draw_quantity(q) 195 195 196 196 self.renderWindow.Render() 197 197 self.root.update_idletasks()
Note: See TracChangeset
for help on using the changeset viewer.