Changeset 479
- Timestamp:
- Nov 1, 2004, 9:22:46 PM (20 years ago)
- Location:
- inundation/ga/storm_surge/pyvolution
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/compile.py
r196 r479 114 114 compiler = CC 115 115 else: 116 compiler = 'gcc '116 compiler = 'gcc -O3' 117 117 if LD: 118 118 loader = LD -
inundation/ga/storm_surge/pyvolution/data_manager.py
r341 r479 110 110 111 111 FN = check_dir(data_dir) + filename + '_size%d' %size 112 112 113 print FN 114 print filename 113 115 if time is not None: 114 116 FN += '_time%.2f' %time 115 117 116 118 FN += '.' + format 117 119 120 print FN 121 118 122 return FN 119 123 -
inundation/ga/storm_surge/pyvolution/least_squares.py
r467 r479 413 413 #return sparse.solve(self.B,Atz) 414 414 415 return conjugate_gradient(self.B, Atz, Atz )415 return conjugate_gradient(self.B, Atz, Atz,imax=2*len(Atz) ) 416 416 #FIXME: Should we store the result here for later use? (ON) 417 417 -
inundation/ga/storm_surge/pyvolution/netherlands.py
r451 r479 95 95 #N = 150 96 96 N = 110 97 #N = 6097 N = 60 98 98 99 99 print 'Creating domain' … … 120 120 domain.format = 'sww' #Native netcdf visualisation format 121 121 import sys, os 122 root, ext = os.path.splitext(sys.argv[0]) 122 #FIXME: This was os.path.splitext but caused weird filenames based on root 123 base = os.path.basename(sys.argv[0]) 123 124 if domain.smooth is True: 124 125 s = 'smooth' 125 126 else: 126 127 s = 'nonsmooth' 127 domain.filename = root+ '_py3_' + s128 domain.filename = base + '_py3_' + s 128 129 else: 129 130 domain.visualise = True -
inundation/ga/storm_surge/pyvolution/run_profile.py
r272 r479 20 20 # 21 21 22 N = 1622 N = 32 23 23 24 24 print 'Creating domain' -
inundation/ga/storm_surge/pyvolution/test_sparse.py
r474 r479 34 34 """ 35 35 36 A = Sparse( 3,3)36 A = Sparse(4,3) 37 37 A[1,1] = 4 38 38 A[2,0] = 6 … … 49 49 50 50 def test_dense(self): 51 A = Sparse( 3,3)51 A = Sparse(4,3) 52 52 A[1,1] = 4 53 53 54 assert allclose(A.todense(), [[0,0,0], [0,4,0], [0,0,0] ])54 assert allclose(A.todense(), [[0,0,0], [0,4,0], [0,0,0], [0,0,0]]) 55 55 56 56
Note: See TracChangeset
for help on using the changeset viewer.