Changeset 6304 for branches/numpy/anuga/damage_modelling
- Timestamp:
- Feb 10, 2009, 11:11:04 AM (16 years ago)
- Location:
- branches/numpy
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/damage_modelling/inundation_damage.py
r6151 r6304 10 10 from types import StringType 11 11 12 import Numericas num12 import numpy as num 13 13 14 14 … … 17 17 except ImportError: 18 18 # Hand-built mockup of the things we need from the kinds package, since it 19 # was recently removed from the standard Numeric distro. Some users may19 # was recently removed from the standard numeric distro. Some users may 20 20 # not have it by default. 21 21 class _bunch: … … 314 314 315 315 # the data being created 316 struct_damage = num.zeros(self.structure_count, num. Float)317 contents_damage = num.zeros(self.structure_count, num. Float)316 struct_damage = num.zeros(self.structure_count, num.float) 317 contents_damage = num.zeros(self.structure_count, num.float) 318 318 self.struct_inundated = ['']* self.structure_count 319 319 -
branches/numpy/anuga/damage_modelling/test_inundation_damage.py
r6151 r6304 17 17 from anuga.shallow_water.data_manager import get_dataobject 18 18 19 import Numericas num19 import numpy as num 20 20 21 21 … … 83 83 #Initial condition - with jumps 84 84 bed = domain.quantities['elevation'].vertex_values 85 stage = num.zeros(bed.shape, num. Float)85 stage = num.zeros(bed.shape, num.float) 86 86 87 87 h = 0.3 … … 153 153 #Initial condition - with jumps 154 154 bed = domain.quantities['elevation'].vertex_values 155 stage = num.zeros(bed.shape, num. Float)155 stage = num.zeros(bed.shape, num.float) 156 156 157 157 h = 30. … … 476 476 edm = EventDamageModel([0.0]*17, [0.0]*17, [0.0]*17, 477 477 [0.0]*17, [0.0]*17) 478 edm.struct_damage = num.zeros(17,num. Float)479 edm.contents_damage = num.zeros(17,num. Float)478 edm.struct_damage = num.zeros(17,num.float) 479 edm.contents_damage = num.zeros(17,num.float) 480 480 collapse_probability = {0.4:[0], #0 481 481 0.6:[1], #1 … … 597 597 pass 598 598 suite = unittest.makeSuite(Test_inundation_damage,'test') 599 #suite = unittest.makeSuite(Test_inundation_damage,'test_inundation_damage_list_as_input')600 599 runner = unittest.TextTestRunner() 601 600 runner.run(suite)
Note: See TracChangeset
for help on using the changeset viewer.