Changeset 4026
- Timestamp:
- Nov 21, 2006, 8:36:47 PM (18 years ago)
- Location:
- anuga_core/source
- Files:
-
- 20 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/show_balanced_limiters.py
r3846 r4026 36 36 domain = Domain(points, vertices, boundary) 37 37 domain.smooth = False 38 domain.visualise = False39 #domain.visualise = True40 38 domain.default_order = 2 41 39 domain.set_name('show_balanced_limiters') -
anuga_core/source/anuga/advection/advection.py
r3928 r4026 79 79 self.default_order = self.order = 1 80 80 81 #Realtime visualisation82 self.visualiser = None83 self.visualise = False84 self.visualise_color_stage = False85 self.visualise_stage_range = 1.086 self.visualise_timer = True87 self.visualise_range_z = None88 89 90 81 self.smooth = True 91 92 def initialise_visualiser(self,scale_z=1.0,rect=None):93 #Realtime visualisation94 if self.visualiser is None:95 from realtime_visualisation_new import Visualiser96 # from vtk_realtime_visualiser import Visualiser97 self.visualiser = Visualiser(self,scale_z,rect)98 self.visualise = True99 100 82 101 83 def check_integrity(self): … … 373 355 """ 374 356 375 #Initialise real time viz if requested376 if self.visualise is True and self.time == 0.0:377 #pass378 #import realtime_visualisation_new as visualise379 #visualise.create_surface(self)380 self.initialise_visualiser()381 self.visualiser.setup_all()382 self.visualiser.update_timer()383 384 385 357 #Call basic machinery from parent class 386 358 for t in Generic_domain.evolve(self, … … 390 362 skip_initial_step=skip_initial_step): 391 363 392 393 394 395 #Real time viz396 if self.visualise is True:397 #pass398 self.visualiser.update_all()399 self.visualiser.update_timer()400 401 402 364 #Pass control on to outer loop for more specific actions 403 365 yield(t) -
anuga_core/source/anuga/examples/advection_dirichlet.py
r3560 r4026 20 20 domain = Domain(points, vertices, boundary, velocity=[1.0, -1.0]) 21 21 domain.smooth = False 22 domain.visualise = True23 22 24 23 #Boundaries -
anuga_core/source/anuga/examples/advection_waves.py
r3560 r4026 19 19 domain = Domain(points, vertices, boundary, velocity=[1.0, -0.8]) 20 20 #domain.smooth = False 21 domain.visualise = True22 21 23 22 #Boundaries -
anuga_core/source/anuga/examples/bed_w_eden_boundary.py
r3565 r4026 17 17 domain = Domain(points, vertices, boundary) 18 18 domain.smooth = False 19 domain.visualise = False20 19 domain.default_order = 2 21 20 domain.store = True #Store for visualisation purposes -
anuga_core/source/anuga/examples/bed_w_file_boundary.py
r3565 r4026 19 19 domain = Domain(points, vertices, boundary) 20 20 domain.smooth = False 21 domain.visualise = True22 21 domain.default_order=2 23 22 -
anuga_core/source/anuga/examples/cornell_room.py
r3846 r4026 63 63 print "Number of triangles = ", len(domain) 64 64 65 domain.visualise = False66 domain.checkpoint = False67 65 domain.store = True #Store for visualisation purposes 68 66 domain.format = 'sww' #Native netcdf visualisation format -
anuga_core/source/anuga/examples/flatbed_compare.py
r3565 r4026 20 20 domain = Domain(points, vertices, boundary) 21 21 domain.smooth = False 22 domain.visualise = True23 22 domain.default_order=2 24 23 -
anuga_core/source/anuga/examples/island.py
r3876 r4026 61 61 domain.maximum_allowed_speed = 100.0 62 62 domain.minimum_storable_height = 1.0e-4 63 domain.visualise_wet_dry_cutoff = 5.0e-264 63 65 64 #------------------------------------------------------------------------------ … … 101 100 domain.check_integrity() 102 101 103 domain.initialise_visualiser()104 102 #------------------------------------------------------------------------------ 105 103 # Evolve system through time -
anuga_core/source/anuga/examples/netherlands.py
r3962 r4026 122 122 123 123 if N > 150: 124 domain.visualise = False125 124 domain.checkpoint = False 126 125 domain.store = True #Store for visualisation purposes … … 132 131 domain.set_name(basename) 133 132 else: 134 #domain.initialise_visualiser(rect=[0.0,0.0,1.0,1.0])135 #domain.initialise_visualiser()136 #domain.visualiser.coloring['stage'] = False137 domain.visualise_timer = True138 133 domain.checkpoint = False 139 134 domain.store = False 140 domain.visualise = False141 135 vis = RealtimeVisualiser(domain) 142 136 vis.render_quantity_height("elevation", dynamic=False) … … 177 171 t0 = time.time() 178 172 179 180 #from realtime_visualisation_new import Visualiser181 #V = Visualiser(domain,title='netherlands')182 #V.update_quantity('stage')183 #V.update_quantity('elevation')184 185 186 187 188 173 for t in domain.evolve(yieldstep = 0.005, finaltime = None): 189 174 domain.write_time() … … 192 177 print domain.quantities['stage'].get_values(location='centroids', 193 178 indices=[0]) 194 #domain.visualiser.update_quantity('elevation')195 179 #time.sleep(0.1) 196 180 #raw_input('pause>') 197 181 #V.update_quantity('stage') 198 182 #rpdb.set_active() 199 #domain.visualiser.scale_z = 1.0200 #domain.visualiser.update_quantity_color('xmomentum',scale_z = 4.0)201 183 #integral_label.text='Integral=%10.5e'%domain.quantities['stage'].get_integral() 202 184 vis.evolveFinished() -
anuga_core/source/anuga/examples/run_gong.py
r3846 r4026 21 21 from mesh_factory import rectangular 22 22 from anuga.pyvolution.pmesh2domain import pmesh_to_domain, pmesh_to_domain_instance 23 from anuga.visualiser import RealtimeVisualiser 23 24 24 25 from Numeric import array … … 50 51 domain.checkpoint = False #True 51 52 domain.default_order = 1 52 domain.visualise = visualise53 53 domain.smooth = True 54 54 domain.set_datadir('.') 55 55 domain.starttime = 20000 56 56 57 if ( domain.visualise):57 if (visualise): 58 58 domain.store = False #True #Store for visualisation purposes 59 59 else: … … 122 122 domain.check_integrity() 123 123 124 # prepare the visualiser 125 if visualise is True: 126 v = RealtimeVisualiser(domain) 127 v.render_quantity_height('elevation', dynamic=False) 128 v.render_quantity_height('stage', dynamic=True) 129 v.colour_height_quantity('stage', (0.0, 0.0, 0.8)) 130 v.start() 124 131 ###################### 125 132 #Evolution … … 127 134 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 128 135 domain.write_time() 136 if visualise is True: 137 v.update() 138 if visualise is True: 139 v.evolveFinished() 129 140 130 141 print 'That took %.2f seconds' %(time.time()-t0) -
anuga_core/source/anuga/examples/run_sw_rectangle.py
r3697 r4026 48 48 print 'Number of triangles =', len(domain) 49 49 50 # Turn on the visualisation51 try:52 domain.initialise_visualiser()53 except:54 pass55 56 57 50 #----------------------------------------------------------------- 58 51 # Boundaries and Initial conditions … … 91 84 domain.set_name('new_limiter_second_order') 92 85 print 'Number of triangles =', len(domain) 93 94 # Turn on the visualisation95 try:96 domain.initialise_visualiser()97 except:98 pass99 86 100 87 #----------------------------------------------------------------- … … 136 123 print 'Number of triangles =', len(domain) 137 124 138 # Turn on the visualisation139 try:140 domain.initialise_visualiser()141 except:142 pass143 144 125 #----------------------------------------------------------------- 145 126 # Boundaries and Initial conditions -
anuga_core/source/anuga/examples/run_tsh.py
r3846 r4026 60 60 domain.checkpoint = False #True 61 61 domain.default_order = 1 62 domain.visualise = visualise63 62 domain.smooth = True 64 63 domain.set_datadir('.') 65 64 66 if ( domain.visualise):65 if (visualise): 67 66 domain.store = False #True #Store for visualisation purposes 68 67 else: … … 149 148 150 149 domain.check_integrity() 151 150 151 # prepare the visualiser 152 if visualise is True: 153 v = RealtimeVisualiser(domain) 154 v.render_quantity_height('elevation', dynamic=False) 155 v.render_quantity_height('stage', dynamic=True) 156 v.colour_height_quantity('stage', (0.0, 0.0, 0.8)) 157 v.start() 152 158 ###################### 153 159 #Evolution … … 155 161 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 156 162 domain.write_time() 163 if visualise is True: 164 v.update() 165 if visualise is True: 166 v.evolveFinished() 167 157 168 158 169 print 'That took %.2f seconds' %(time.time()-t0) -
anuga_core/source/anuga/examples/run_tsh_weir.py
r3846 r4026 43 43 domain.set_name('weir') 44 44 domain.checkpoint = False #True 45 domain.visualise = True #False46 45 domain.default_order = 2 47 46 -
anuga_core/source/anuga/examples/twolevels.py
r3846 r4026 30 30 domain.default_order=2 31 31 domain.smooth = False 32 domain.visualise = True33 32 34 33 #PLAY WITH THIS [0;1]: -
anuga_core/source/anuga/examples/wind_example_variable.py
r3565 r4026 19 19 domain = Domain(points, vertices, boundary) 20 20 domain.smooth = True 21 domain.visualise = False22 21 domain.store = True 23 22 domain.default_order=2 -
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r4005 r4026 164 164 self.forcing_terms.append(gravity) 165 165 166 #Realtime visualisation167 self.visualiser = None168 self.visualise = False169 self.visualise_color_stage = False170 self.visualise_stage_range = 1.0171 self.visualise_timer = True172 self.visualise_range_z = None173 174 166 #Stored output 175 167 self.store = True … … 329 321 get_maximum_location(indices=wet_elements) 330 322 331 332 333 334 def initialise_visualiser(self,scale_z=1.0,rect=None):335 #Realtime visualisation336 if self.visualiser is None:337 from realtime_visualisation_new import Visualiser338 self.visualiser = Visualiser(self,scale_z,rect)339 self.visualiser.setup['elevation']=True340 self.visualiser.updating['stage']=True341 self.visualise = True342 if self.visualise_color_stage == True:343 self.visualiser.coloring['stage'] = True344 self.visualiser.qcolor['stage'] = (0.0, 0.0, 0.8)345 print 'initialise visualiser'346 print self.visualiser.setup347 print self.visualiser.updating348 349 323 def check_integrity(self): 350 324 Generic_Domain.check_integrity(self) … … 435 409 self.distribute_to_vertices_and_edges() 436 410 437 #Initialise real time viz if requested438 if self.visualise is True and self.time == 0.0:439 if self.visualiser is None:440 self.initialise_visualiser()441 442 self.visualiser.update_timer()443 self.visualiser.setup_all()444 445 #Store model data, e.g. for visualisation446 411 if self.store is True and self.time == 0.0: 447 412 self.initialise_storage() … … 460 425 duration=duration, 461 426 skip_initial_step=skip_initial_step): 462 #Real time viz463 if self.visualise is True:464 self.visualiser.update_all()465 self.visualiser.update_timer()466 467 427 468 428 #Store model data, e.g. for subsequent visualisation -
anuga_core/source/anuga/shallow_water/shallow_water_domain_kinetic.py
r3699 r4026 93 93 self.forcing_terms.append(manning_friction) 94 94 95 #Realtime visualisation96 self.visualiser = None97 self.visualise = False98 self.visualise_color_stage = False99 self.visualise_stage_range = 1.0100 self.visualise_timer = True101 self.visualise_range_z = None102 103 95 #Stored output 104 96 self.store = False … … 112 104 113 105 self.quantities_to_be_stored = ['stage','xmomentum','ymomentum'] 114 115 116 117 def initialise_visualiser(self,scale_z=1.0,rect=None):118 #Realtime visualisation119 if self.visualiser is None:120 from realtime_visualisation_new import Visualiser121 self.visualiser = Visualiser(self,scale_z,rect)122 self.visualiser.setup['elevation']=True123 self.visualiser.updating['stage']=True124 self.visualise = True125 if self.visualise_color_stage == True:126 self.visualiser.coloring['stage'] = True127 self.visualiser.qcolor['stage'] = (0.0, 0.0, 0.8)128 print 'initialise visualiser'129 print self.visualiser.setup130 print self.visualiser.updating131 106 132 107 def check_integrity(self): … … 214 189 #and or visualisation 215 190 self.distribute_to_vertices_and_edges() 216 217 #Initialise real time viz if requested218 if self.visualise is True and self.time == 0.0:219 if self.visualiser is None:220 self.initialise_visualiser()221 222 self.visualiser.update_timer()223 self.visualiser.setup_all()224 191 225 192 #Store model data, e.g. for visualisation … … 237 204 for t in Generic_Domain.evolve(self, yieldstep, finaltime, 238 205 skip_initial_step): 239 #Real time viz240 if self.visualise is True:241 self.visualiser.update_all()242 self.visualiser.update_timer()243 244 206 245 207 #Store model data, e.g. for subsequent visualisation -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r4024 r4026 2775 2775 domain.geo_reference = Geo_reference(56,11,11) 2776 2776 domain.smooth = False 2777 domain.visualise = False2778 2777 domain.store = True 2779 2778 domain.set_name('bedslope') … … 2837 2836 #Now evolve them both, just to be sure 2838 2837 ######################################x 2839 visualise = False2840 #visualise = True2841 domain.visualise = visualise2842 2838 domain.time = 0. 2843 2839 from time import sleep … … 2850 2846 2851 2847 for t in domain.evolve(yieldstep = yiel, finaltime = final): 2852 if visualise: sleep(1.)2853 2848 #domain.write_time() 2854 2849 pass … … 2859 2854 2860 2855 domain2.smooth = False 2861 domain2.visualise = visualise2862 2856 domain2.store = False 2863 2857 domain2.default_order=2 … … 2875 2869 2876 2870 for t in domain2.evolve(yieldstep = yiel, finaltime = final): 2877 if visualise: sleep(1.)2878 2871 #domain2.write_time() 2879 2872 pass … … 2916 2909 domain = Domain(points, vertices, boundary) 2917 2910 domain.smooth = False 2918 domain.visualise = False2919 2911 domain.store = True 2920 2912 domain.set_name('test_file') … … 3025 3017 domain.geo_reference = Geo_reference(56,11,11) 3026 3018 domain.smooth = True 3027 domain.visualise = False3028 3019 domain.store = True 3029 3020 domain.set_name('bedslope') … … 3093 3084 #Now evolve them both, just to be sure 3094 3085 ######################################x 3095 visualise = False3096 visualise = True3097 domain.visualise = visualise3098 3086 domain.time = 0. 3099 3087 from time import sleep … … 3105 3093 3106 3094 for t in domain.evolve(yieldstep = yiel, finaltime = final): 3107 if visualise: sleep(.03)3108 3095 #domain.write_time() 3109 3096 pass 3110 3097 3111 3098 domain2.smooth = True 3112 domain2.visualise = visualise3113 3099 domain2.store = False 3114 3100 domain2.default_order=2 … … 3128 3114 3129 3115 for t in domain2.evolve(yieldstep = yiel, finaltime = final): 3130 if visualise: sleep(.03)3131 3116 #domain2.write_time() 3132 3117 pass -
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r3928 r4026 1995 1995 domain.check_integrity() 1996 1996 1997 #domain.visualise = True #If you want to take a sticky beak1998 1999 1997 initial_volume = domain.quantities['stage'].get_integral() 2000 1998 initial_xmom = domain.quantities['xmomentum'].get_integral() … … 2046 2044 2047 2045 domain.check_integrity() 2048 2049 #domain.visualise = True #If you want to take a sticky beak2050 2046 2051 2047 initial_volume = domain.quantities['stage'].get_integral() … … 2110 2106 2111 2107 domain.check_integrity() 2112 2113 #domain.visualise = True #If you want to take a sticky beak2114 2108 2115 2109 initial_volume = domain.quantities['stage'].get_integral() … … 2188 2182 domain.check_integrity() 2189 2183 2190 #domain.visualise = True #If you want to take a sticky beak2191 2192 2184 initial_volume = domain.quantities['stage'].get_integral() 2193 2185 initial_xmom = domain.quantities['xmomentum'].get_integral() … … 2253 2245 domain.check_integrity() 2254 2246 2255 #domain.visualise = True #If you want to take a sticky beak2256 2257 2247 initial_volume = domain.quantities['stage'].get_integral() 2258 2248 initial_xmom = domain.quantities['xmomentum'].get_integral() … … 2304 2294 domain = Domain(points, vertices, boundary) 2305 2295 domain.smooth = False 2306 domain.visualise = False2307 2296 domain.default_order = 1 2308 2297 domain.minimum_allowed_height = min_depth … … 2463 2452 domain = Domain(points, vertices, boundary) 2464 2453 domain.smooth = False 2465 domain.visualise = False2466 2454 domain.default_order=1 2467 2455 … … 2507 2495 domain = Domain(points, vertices, boundary) 2508 2496 domain.smooth = False 2509 domain.visualise = False2510 2497 domain.default_order=2 2511 2498 domain.beta_w = 0.9 … … 2571 2558 domain = Domain(points, vertices, boundary) 2572 2559 domain.smooth = False 2573 domain.visualise = False2574 2560 domain.default_order=2 2575 2561 domain.beta_w = 0.9 … … 2623 2609 domain = Domain(points, vertices, boundary) 2624 2610 domain.smooth = False 2625 domain.visualise = False2626 2611 domain.default_order=domain._order_=2 2627 2612 domain.beta_w = 0.9 … … 3332 3317 domain = Domain(points, vertices, boundary) 3333 3318 domain.smooth = False 3334 domain.visualise = False3335 3319 domain.default_order=2 3336 3320
Note: See TracChangeset
for help on using the changeset viewer.