Changeset 8816
- Timestamp:
- Apr 5, 2013, 8:54:18 PM (12 years ago)
- Location:
- trunk/anuga_core/source
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/damage_modelling/inundation_damage.py
r8249 r8816 6 6 import os 7 7 from math import sqrt 8 from Scientific.Functions.Interpolation import InterpolatingFunction 8 #from Scientific.Functions.Interpolation import InterpolatingFunction 9 from scipy.interpolate import interp1d 9 10 from random import choice 10 11 … … 208 209 STRUCT_COLLAPSED_TITLE = "STRUCT_COLLAPSED"#"collapsed structure if 1" 209 210 STRUCT_INUNDATED_TITLE = "STRUCT_INUNDATED"#"inundated structure if 1" 210 double_brick_damage_array = num.array([[-kinds.default_float_kind.MAX, 0.0], 211 double_brick_damage_array = num.array([#[-kinds.default_float_kind.MAX, 0.0], 212 [-1000.0, 0.0], 211 213 [0.0-depth_epsilon, 0.0], 212 214 [0.0,0.016], … … 218 220 [2.0,0.587], 219 221 [2.5,0.647], 220 [kinds.default_float_kind.MAX,64.7]]) 221 double_brick_damage_curve = InterpolatingFunction( \ 222 (num.ravel(double_brick_damage_array[:,0:1]),), 223 num.ravel(double_brick_damage_array[:,1:])) 224 225 brick_veeer_damage_array = num.array([[-kinds.default_float_kind.MAX, 0.0], 222 [1000.0, 64.7] 223 #[kinds.default_float_kind.MAX,64.7] 224 ]) 225 #double_brick_damage_curve = InterpolatingFunction( \ 226 # (num.ravel(double_brick_damage_array[:,0:1]),), 227 # num.ravel(double_brick_damage_array[:,1:])) 228 double_brick_damage_curve = interp1d(double_brick_damage_array[:,0],double_brick_damage_array[:,1]) 229 230 brick_veeer_damage_array = num.array([#[-kinds.default_float_kind.MAX, 0.0], 231 [-1000.0,0.0], 226 232 [0.0-depth_epsilon, 0.0], 227 233 [0.0,0.016], … … 233 239 [2.0,0.633], 234 240 [2.5,0.694], 235 [kinds.default_float_kind.MAX,69.4]]) 236 brick_veeer_damage_curve = InterpolatingFunction( \ 237 (num.ravel(brick_veeer_damage_array[:,0:1]),), 238 num.ravel(brick_veeer_damage_array[:,1:])) 241 [1000.0,69.4] 242 #[kinds.default_float_kind.MAX,69.4] 243 ]) 244 #brick_veeer_damage_curve = InterpolatingFunction( \ 245 # (num.ravel(brick_veeer_damage_array[:,0:1]),), 246 # num.ravel(brick_veeer_damage_array[:,1:])) 247 248 brick_veeer_damage_curve = interp1d(brick_veeer_damage_array[:,0],brick_veeer_damage_array[:,1]) 249 239 250 struct_damage_curve = {'Double Brick':double_brick_damage_curve, 240 251 'Brick Veneer':brick_veeer_damage_curve} 241 252 default_struct_damage_curve = brick_veeer_damage_curve 242 253 243 contents_damage_array = num.array([[-kinds.default_float_kind.MAX, 0.0], 254 contents_damage_array = num.array([#[-kinds.default_float_kind.MAX, 0.0], 255 [-1000.0,0.0], 244 256 [0.0-depth_epsilon, 0.0], 245 257 [0.0,0.013], … … 250 262 [1.5,0.976], 251 263 [2.0,0.986], 252 [kinds.default_float_kind.MAX,98.6]]) 253 contents_damage_curve = InterpolatingFunction( \ 254 (num.ravel(contents_damage_array[:,0:1]),), 255 num.ravel(contents_damage_array[:,1:])) 256 264 [1000.0,98.6] 265 #[kinds.default_float_kind.MAX,98.6] 266 ]) 267 #contents_damage_curve = InterpolatingFunction( \ 268 # (num.ravel(contents_damage_array[:,0:1]),), 269 # num.ravel(contents_damage_array[:,1:])) 270 271 contents_damage_curve = interp1d(contents_damage_array[:,0],contents_damage_array[:,1]) 257 272 #building collapse probability 258 273 # inundation depth above ground floor, m -
trunk/anuga_core/source/anuga/test_all.py
r8813 r8816 33 33 34 34 # Directories that should not be searched for test files. 35 exclude_dirs = ['shallow_water_balanced' , 'damage_modelling', # Special requirements35 exclude_dirs = ['shallow_water_balanced' , #'damage_modelling', # Special requirements 36 36 '.svn', # subversion 37 37 'props', 'wcprops', 'prop-base', 'text-base', 'tmp'] … … 197 197 from optparse import OptionParser 198 198 199 import os 200 for file in os.listdir('.'): 201 if file.endswith('.sww') or\ 202 file.endswith('.msh') or\ 203 file.endswith('.csv') or\ 204 file.endswith('.asc') or\ 205 file.endswith('.prj') or\ 206 file.endswith('.tsh') or\ 207 file.endswith('.sts') or\ 208 file.endswith('.tms') or\ 209 file.endswith('.txt'): 210 os.remove(file) 211 199 212 check_anuga_import() 200 213 … … 238 251 #os.remove(filename) 239 252 240 #if sys.platform == 'win32': 241 # raw_input('Press the RETURN key') 253 254 255 import os 256 for file in os.listdir('.'): 257 if file.endswith('.sww') or\ 258 file.endswith('.msh') or\ 259 file.endswith('.csv') or\ 260 file.endswith('.asc') or\ 261 file.endswith('.prj') or\ 262 file.endswith('.tsh') or\ 263 file.endswith('.sts') or\ 264 file.endswith('.tms') or\ 265 file.endswith('.txt'): 266 try: 267 os.remove(file) 268 except: 269 pass 270 -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/dam_break_wet
- Property svn:ignore
-
old new 1 1 .deps 2 .python_cache
-
- Property svn:ignore
Note: See TracChangeset
for help on using the changeset viewer.