Changeset 3532
- Timestamp:
- Aug 25, 2006, 4:38:51 PM (17 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/config.py
r3531 r3532 108 108 maximum_allowed_speed = 100.0 #Maximal particle speed of water 109 109 110 minimum_ allowed_depth = 0.0110 minimum_sww_depth = 0.0 -
anuga_core/source/anuga/pyvolution/data_manager.py
r3529 r3532 67 67 from anuga.coordinate_transforms.geo_reference import Geo_reference 68 68 from anuga.geospatial_data.geospatial_data import Geospatial_data 69 from anuga.config import minimum_ allowed_depth69 from anuga.config import minimum_sww_depth 70 70 71 71 def make_filename(s): … … 252 252 Data_format.__init__(self, domain, 'sww', mode) 253 253 254 if hasattr(domain, 'minimum_ allowed_depth'):255 self.minimum_ allowed_depth = domain.minimum_allowed_depth254 if hasattr(domain, 'minimum_sww_depth'): 255 self.minimum_sww_depth = domain.minimum_sww_depth 256 256 else: 257 self.minimum_ allowed_depth = minimum_allowed_depth257 self.minimum_sww_depth = minimum_sww_depth 258 258 259 259 # NetCDF file definition … … 380 380 from os import stat 381 381 382 minimum_ allowed_depth = 0.001383 #minimum_ allowed_depth = 0.0 #FIXME pass in or read from domain382 minimum_sww_depth = 0.001 383 #minimum_sww_depth = 0.0 #FIXME pass in or read from domain 384 384 from Numeric import choose 385 385 … … 482 482 #print z[:] 483 483 #print A-z[:] 484 A = choose( A-z[:] >= self.minimum_ allowed_depth,484 A = choose( A-z[:] >= self.minimum_sww_depth, 485 485 (z[:], A)) 486 486 stage[i,:] = A.astype(self.precision) -
anuga_core/source/anuga/pyvolution/shallow_water.py
r3529 r3532 63 63 64 64 from anuga.utilities.numerical_tools import gradient, mean 65 from anuga.config import minimum_ allowed_depth65 from anuga.config import minimum_sww_depth 66 66 67 67 … … 126 126 self.format = 'sww' 127 127 self.set_store_vertices_uniquely(False) 128 self.minimum_ allowed_depth = minimum_allowed_depth128 self.minimum_sww_depth = minimum_sww_depth 129 129 self.quantities_to_be_stored = ['stage','xmomentum','ymomentum'] 130 130 -
anuga_core/source/anuga/pyvolution/test_data_manager.py
r3529 r3532 459 459 460 460 461 def test_sww_minimum_ allowed_depth(self):461 def test_sww_minimum_sww_depth(self): 462 462 """Test that sww information can be written correctly 463 463 multiple timesteps using a different reduction operator (min) … … 472 472 self.domain.smooth = True 473 473 self.domain.reduction = min 474 self.domain.minimum_ allowed_depth = 100474 self.domain.minimum_sww_depth = 100 475 475 476 476 sww = get_dataobject(self.domain) … … 4992 4992 #------------------------------------------------------------- 4993 4993 if __name__ == "__main__": 4994 #suite = unittest.makeSuite(Test_Data_Manager,'test_sww_minimum_ allowed_depth')4994 #suite = unittest.makeSuite(Test_Data_Manager,'test_sww_minimum_sww_depth') 4995 4995 suite = unittest.makeSuite(Test_Data_Manager,'test') 4996 4996 runner = unittest.TextTestRunner()
Note: See TracChangeset
for help on using the changeset viewer.