Changeset 1471 for inundation/ga
- Timestamp:
- May 26, 2005, 5:41:07 PM (19 years ago)
- Location:
- inundation/ga/storm_surge
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/Hobart/run_hobart_buildings.py
r1438 r1471 42 42 domain.default_order = 1 43 43 domain.smooth = True 44 domain.visualise = True 44 45 # Turn on visualiser 46 domain.initialise_visualiser() 47 48 # Colours for Hobart 49 domain.visualiser.stage_color = (0.0,0.38,0.1) 50 domain.visualiser.friction_color = (0.1,0.99,0.1) 51 domain.visualiser.other_color = (0.99,0.4,0.1) 52 45 53 46 54 #------------------------------ -
inundation/ga/storm_surge/parallel/advection.py
r1466 r1471 44 44 45 45 #Realtime visualisation 46 self.visualise = False 46 self.visualiser = None 47 self.visualise = False 47 48 self.visualise_color_stage = False 48 49 self.visualise_timer = True … … 312 313 #Initialise real time viz if requested 313 314 if self.visualise is True and self.time == 0.0: 314 import realtime_visualisation_new as visualise315 #import realtime_visualisation_new as visualise 315 316 self.visualiser.update_quantity('stage') 316 317 self.visualiser.update_timer() -
inundation/ga/storm_surge/parallel/run_parallel_advection.py
r1466 r1471 30 30 # Initial condition is zero by default 31 31 32 #turn on the visualisation 32 33 domain.initialise_visualiser() 33 34 … … 60 61 61 62 #Check that the boundary value gets propagated to all elements 62 for t in domain.evolve(yieldstep = 0. 1, finaltime = 3.0):63 for t in domain.evolve(yieldstep = 0.5, finaltime = 3.0): 63 64 if myid == 0: 64 65 domain.write_time() -
inundation/ga/storm_surge/pyvolution/realtime_visualisation_new.py
r1462 r1471 2 2 3 3 elevation_color = (0.3,0.4,0.5) 4 stage_color = (0.1,0.4,0.99) 5 6 # Colours for Hobart 7 stage_color = (0.0,0.38,0.1) 8 friction_color = (0.1,0.99,0.1) 9 other_color = (0.99,0.4,0.1) 4 stage_color = (0.1,0.4,0.99) 5 friction_color = (0.1,0.99,0.1) 6 other_color = (0.99,0.4,0.1) 7 10 8 11 9 class Visualiser: … … 60 58 #print 'keys',self.domain.quantities.keys() 61 59 #print 'shape of stage',shape(self.stage) 60 61 self.stage_color = stage_color 62 self.elevation_color = elevation_color 63 self.friction_color = friction_color 64 self.other_color = other_color 62 65 63 66 setup_scene() … … 98 101 range_z = max(range_z, max_z - min_z) 99 102 except: 100 print 'Visualisation: could not find range of '+qname1103 #print 'Visualisation: could not find range of '+qname1 101 104 pass 102 105 … … 108 111 range_z = max(range_z, max_z - min_z) 109 112 except: 110 print 'Visualisation: could not find range of '+qname2113 #print 'Visualisation: could not find range of '+qname2 111 114 pass 112 115 … … 115 118 def update_all(self): 116 119 117 self.update_quantity('elevation', elevation_color)118 self.update_quantity('stage',s tage_color)120 self.update_quantity('elevation',self.elevation_color) 121 self.update_quantity('stage',self.stage_color) 119 122 120 123 def update_timer(self): … … 130 133 131 134 if qcolor is None: 132 qcolor = other_color135 qcolor = self.other_color 133 136 134 137 if qname=='elevation': 135 qcolor = elevation_color138 qcolor = self.elevation_color 136 139 137 140 if qname=='stage': 138 qcolor = s tage_color139 141 qcolor = self.stage_color 142 140 143 if qname=='friction': 141 qcolor = friction_color144 qcolor = self.friction_color 142 145 143 146 if scale_z is None: … … 161 164 if qcolor is None: 162 165 if qname=='elevation': 163 qcolor = elevation_color166 qcolor = self.elevation_color 164 167 165 168 if qname=='stage': 166 qcolor = s tage_color167 169 qcolor = self.stage_color 170 168 171 if qname=='friction': 169 qcolor = friction_color172 qcolor = self.friction_color 170 173 171 174 if scale_z is None: … … 530 533 def create_surface(domain,scale_z=1.0): 531 534 532 visualiser = Visualiser(domain,scale_z) 533 domain.visualiser = visualiser 534 535 visualiser.update_quantity('elevation') 536 visualiser.update_quantity('stage') 537 visualiser.update_timer() 535 domain.initialise_visualiser(scale_z) 536 537 domain.visualiser.update_quantity('elevation') 538 domain.visualiser.update_quantity('stage') 539 domain.visualiser.update_timer() 538 540 539 541 def update(domain): 540 542 541 visualiser = domain.visualiser542 543 if domain.visualise_color_stage: 543 visualiser.update_quantity_color('stage')544 domain.visualiser.update_quantity_color('stage') 544 545 else: 545 visualiser.update_quantity('stage')546 547 visualiser.update_timer()546 domain.visualiser.update_quantity('stage') 547 548 domain.visualiser.update_timer() -
inundation/ga/storm_surge/pyvolution/shallow_water.py
r1387 r1471 57 57 from domain import * 58 58 from region import * 59 from realtime_visualisation_new import Visualiser 59 60 Generic_domain = Domain #Rename 60 61 … … 80 81 81 82 #Realtime visualisation 82 self.visualise = False 83 self.visualiser = None 84 self.visualise = False 83 85 self.visualise_color_stage = False 84 86 self.visualise_stage_range = 1.0 … … 105 107 #self.z = self.quantities['elevation'] 106 108 #self.eta = self.quantities['friction'] 109 110 def initialise_visualiser(self,scale_z=1.0): 111 #Realtime visualisation 112 if self.visualiser is None: 113 self.visualiser = Visualiser(self,scale_z) 114 self.visualise = True 107 115 108 116 def check_integrity(self):
Note: See TracChangeset
for help on using the changeset viewer.