Changeset 2300 for inundation/pyvolution/shallow_water.py
- Timestamp:
- Jan 30, 2006, 9:47:34 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/shallow_water.py
r2206 r2300 89 89 90 90 #Stored output 91 self.store = False91 self.store = True 92 92 self.format = 'sww' 93 93 self.smooth = True … … 101 101 102 102 103 def set_quantities_to_be_stored(self, q): 104 """Specify which quantities will be stored in the sww file. 105 106 q must be either: 107 - the name of a quantity 108 - a list of quantity names 109 - None 110 111 In the two first cases, the named quantities will be stored at each yieldstep 112 (This is in addition to the quantities elevation and friction) 113 If q is None, storage will be switche off altogether. 114 """ 115 116 117 if q is None: 118 self.quantities_to_be_stored = [] 119 self.store = False 120 return 121 122 if isinstance(q, basestring): 123 q = [q] # Turn argument into a list 124 125 #Check correcness 126 for quantity_name in q: 127 msg = 'Quantity %s is not a valid conserved quantity' %quantity_name 128 assert quantity_name in self.conserved_quantities, msg 129 130 self.quantities_to_be_stored = q 131 103 132 104 133 def initialise_visualiser(self,scale_z=1.0,rect=None):
Note: See TracChangeset
for help on using the changeset viewer.