Changeset 7915
- Timestamp:
- Aug 5, 2010, 6:50:49 PM (14 years ago)
- Location:
- trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/debris_avalanche_RUN.py
r7837 r7915 2 2 import time 3 3 from shallow_water_domain_avalanche import * 4 from Numeric import array, zeros,Float, sqrt4 from Numeric import Float, sqrt 5 5 from config import g, epsilon 6 from numpy import sin, cos, tan 6 from numpy import sin, cos, tan, array, zeroz 7 7 from scipy import linspace 8 8 from parameters import * -
trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/domain.py
r7837 r7915 24 24 """ 25 25 26 from Numeric import array, zeros, Float, Int 26 from Numeric import Float, Int 27 from numpy import array, zeros 27 28 28 29 from config import timestepping_method … … 175 176 self.vertexlist is built 176 177 """ 177 from Numericimport array178 from numpy import array 178 179 179 180 vertexlist = [None]*len(self.coordinates) … … 322 323 self.element_tag is defined 323 324 """ 324 from Numeric import array, Int 325 from Numeric import Int 326 from numpy import array 325 327 326 328 if tagged_elements is None: … … 393 395 394 396 if obj is True: 395 from Numericimport concatenate, reshape397 from numpy import concatenate, reshape 396 398 V = self.vertices 397 399 N = V.shape[0] … … 412 414 """ 413 415 414 from Numeric import zeros, Float 416 from Numeric import Float 417 from numpy import zeros 415 418 q = zeros( len(self.conserved_quantities), Float) 416 419 for i, name in enumerate(self.conserved_quantities): … … 436 439 """ 437 440 438 from Numeric import zeros, Float 441 from Numeric import Float 442 from numpy import zeros 439 443 q = zeros( len(self.evolved_quantities), Float) 440 444 … … 1079 1083 """ 1080 1084 import copy 1081 from Numeric import zeros,Float 1085 from Numeric import Float 1086 from numpy import zeros 1082 1087 1083 1088 N = self.number_of_elements … … 1137 1142 """ 1138 1143 import copy 1139 from Numeric import zeros,Float 1144 from Numeric import Float 1145 from numpy import zeros 1140 1146 1141 1147 N = self.number_of_elements … … 1352 1358 """ 1353 1359 1354 from Numeric import ones, sum, equal, Float 1360 from Numeric import Float 1361 from numpy import ones, sum, equal 1355 1362 1356 1363 N = self.number_of_elements -
trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/generic_boundary_conditions.py
r7837 r7915 43 43 self.velocity = domain.quantities['velocity'].vertex_values 44 44 45 from Numeric import zeros, Float 45 from Numeric import Float 46 from numpy import zeros 46 47 self.evolved_quantities = zeros(5, Float) 47 48 … … 103 104 raise msg 104 105 105 from Numeric import array, Float 106 from Numeric import Float 107 from numpy import zeros 106 108 self.conserved_quantities=array(conserved_quantities).astype(Float) 107 109 … … 132 134 133 135 134 from Numeric import array, Float 136 from Numeric import Float 137 from numpy import zeros 135 138 try: 136 139 q = array(q).astype(Float) … … 173 176 def __init__(self, filename, domain): 174 177 import time 175 from Numericimport array178 from numpy import array 176 179 from config import time_format 177 180 from util import File_function … … 223 226 def __init__(self, filename, domain, verbose = False): 224 227 import time 225 from Numeric import array, zeros, Float 228 from Numeric import Float 229 from numpy import zeros, array 226 230 from config import time_format 227 231 from util import file_function … … 421 425 def __init__(self, domain = None, filename = None): 422 426 import time 423 from Numericimport array427 from numpy import array 424 428 from config import time_format 425 429 … … 479 483 480 484 def read_time_boundary(self): 481 from Numeric import zeros, Float, alltrue 485 from Numeric import Float 486 from numpy import zeros, alltrue 482 487 from config import time_format 483 488 import time -
trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/parameters.py
r7837 r7915 1 from Numeric import zeros, Float, sqrt 1 from Numeric import Float, sqrt 2 from numpy import zeros 2 3 from config import g 3 4 from scipy import sin, cos, tan, arcsin, arccos, arctan, pi -
trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/quantity.py
r7837 r7915 24 24 25 25 from domain import Domain 26 from Numeric import array, zeros, Float 26 from Numeric import Float 27 from numpy import array, zeros 27 28 28 29 msg = 'First argument in Quantity.__init__ ' … … 60 61 61 62 62 from Numeric import zeros, Float 63 from Numeric import Float 64 from numpy import zeros 63 65 64 66 #Allocate space for boundary values … … 194 196 """ 195 197 196 from Numeric import array, Float 198 from Numeric import Float 199 from numpy import array 197 200 198 201 values = array(values).astype(Float) … … 237 240 238 241 """ 239 from Numericimport take242 from numpy import take 240 243 241 244 if location not in ['vertices', 'centroids', 'unique vertices']: … … 310 313 """ 311 314 312 from Numeric import concatenate, zeros, Float, Int, array, reshape 315 from Numeric import Float, Int 316 from numpy import concatenate, zeros, array, reshape 313 317 314 318 … … 402 406 """ 403 407 404 from Numeric import sum, equal, ones, Float 408 from Numeric import Float 409 from numpy import sum, equal, ones 405 410 406 411 N = self.centroid_values.shape[0] … … 427 432 #print 'compute_gradient' 428 433 429 from Numeric import array, zeros, Float 434 from Numeric import Float 435 from numpy import array, zeros 430 436 431 437 N = self.centroid_values.shape[0] … … 518 524 #print 'compute_minmod_gradients' 519 525 520 from Numeric import array, zeros, Float,sign 526 from Numeric import Float,sign 527 from numpy import array, zeros 521 528 522 529 def xmin(a,b): … … 712 719 vertex values are updated 713 720 """ 714 from Numeric import zeros, Float 721 from Numeric import Float 722 from numpy import zeros 715 723 716 724 N = self.domain.number_of_elements … … 763 771 def limit_range(self): 764 772 import sys 765 from Numeric import zeros, Float 773 from Numeric import Float 774 from numpy import zeros 766 775 from util import minmod, minmod_kurganov, maxmod, vanleer, vanalbada 767 776 limiter = self.domain.limiter … … 825 834 826 835 import sys 827 from Numeric import zeros, Float 836 from Numeric import Float 837 from numpy import zeros 828 838 from util import minmod, minmod_kurganov, maxmod, vanleer 829 839 … … 950 960 #from domain import Domain 951 961 from shallow_water_domain import Domain 952 from Numericimport arange962 from numpy import arange 953 963 954 964 points1 = [0.0, 1.0, 2.0, 3.0] -
trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/shallow_water_domain_avalanche.py
r7837 r7915 218 218 """ 219 219 220 from Numeric import zeros, Float 220 from Numeric import Float 221 from numpy import zeros 221 222 222 223 assert len(q) == 3,\ … … 266 267 from config import g, epsilon, h0 267 268 from math import sqrt 268 from Numericimport array269 from numpy import array 269 270 270 271 #Align momentums with x-axis … … 336 337 def compute_timestep(domain): 337 338 import sys 338 from Numeric import zeros, Float 339 from Numeric import Float 340 from numpy import zeros 339 341 340 342 N = domain.number_of_elements … … 398 400 def compute_fluxes_C_wellbalanced(domain): 399 401 import sys 400 from Numeric import zeros, Float 402 from Numeric import Float 403 from numpy import zeros 401 404 402 405 N = domain.number_of_elements … … 475 478 def compute_fluxes_C_nonwellbalanced2(domain): 476 479 import sys 477 from Numeric import zeros, Float 480 from Numeric import Float 481 from numpy import zeros 478 482 479 483 N = domain.number_of_elements … … 582 586 583 587 import sys 584 from Numeric import zeros, Float 588 from Numeric import Float 589 from numpy import zeros 585 590 from config import epsilon, h0, h_min 586 591 … … 667 672 668 673 import sys 669 from Numeric import zeros, Float 674 from Numeric import Float 675 from numpy import zeros 670 676 from config import epsilon, h0 671 677 … … 774 780 """ 775 781 776 from Numeric import zeros, Float 782 from Numeric import Float 783 from numpy import zeros 777 784 778 785 N = domain.number_of_elements … … 941 948 942 949 from util import gradient 943 from Numeric import zeros, Float, array, sum 950 from Numeric import Float 951 from numpy import zeros, array, sum 944 952 945 953 xmom = domain.quantities['xmomentum'].explicit_update … … 975 983 976 984 from util import gradient 977 from Numeric import zeros, Float, array, sum 985 from Numeric import Float 986 from numpy import zeros, array, sum 978 987 from parameters import F1#This is an additional friction!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 979 988 … … 1011 1020 1012 1021 from util import gradient 1013 from Numeric import zeros, Float, array, sum 1022 from Numeric import Float 1023 from numpy import zeros, array, sum 1014 1024 from parameters import F2#This is an additional friction!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1015 1025 … … 1111 1121 """ 1112 1122 1113 from Numeric import ones, Float, array 1123 from Numeric import Float 1124 from numpy import ones, array 1114 1125 1115 1126 … … 1193 1204 1194 1205 from config import rho_a, rho_w, eta_w 1195 from Numeric import array, Float 1206 from Numeric import Float 1207 from numpy import array 1196 1208 1197 1209 if len(args) == 2: … … 1224 1236 1225 1237 from math import pi, cos, sin, sqrt 1226 from Numeric import Float, ones, ArrayType 1238 from Numeric import Float, ArrayType 1239 from numpy import ones 1227 1240 1228 1241 xmom_update = domain.quantities['xmomentum'].explicit_update -
trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/util.py
r7837 r7915 4 4 5 5 def mean(x): 6 from Numericimport sum6 from numpy import sum 7 7 return sum(x)/len(x) 8 8 … … 142 142 143 143 def analytic_cannal(C,t): 144 from Numeric import zeros, Float,sqrt,sin,cos 144 from Numeric import Float,sqrt,sin,cos 145 from numpy import zeros 145 146 146 147
Note: See TracChangeset
for help on using the changeset viewer.