Changeset 7207
- Timestamp:
- Jun 17, 2009, 4:12:11 PM (16 years ago)
- Location:
- branches/numpy/anuga
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/abstract_2d_finite_volumes/general_mesh.py
r6843 r7207 194 194 self.edgelengths[i, :] = [l0, l1, l2] 195 195 196 # Build structure listing which triangl sebelong to which node.196 # Build structure listing which triangles belong to which node. 197 197 if verbose: print 'Building inverted triangle structure' 198 198 self.build_inverted_triangle_structure() -
branches/numpy/anuga/abstract_2d_finite_volumes/quantity.py
r7176 r7207 1187 1187 import types 1188 1188 1189 msg = 'Indices must be a list, array or None'1189 msg = "'indices' must be a list, array or None" 1190 1190 assert isinstance(indices, (NoneType, list, num.ndarray)), msg 1191 1191 -
branches/numpy/anuga/geospatial_data/test_geospatial_data.py
r7176 r7207 1721 1721 1722 1722 P = G1.get_data_points(absolute=False) 1723 expected = [[ 425835., 137518.]]1723 expected = [[982420., 28233.]] 1724 1724 msg = 'expected=%s, but\nP=%s' % (str(expected), str(P)) 1725 1725 assert num.allclose(P, expected), msg -
branches/numpy/anuga/pmesh/test_mesh_interface.py
r7035 r7207 76 76 polygon_absolute, closed=False), 77 77 msg) 78 # 'FAILED!')79 78 80 79 # Assuming the order of the region points is known. -
branches/numpy/anuga/shallow_water/data_manager.py
r7176 r7207 3189 3189 % (num.min(times), num.max(times), len(times.flat)) 3190 3190 3191 q = amplitudes.flatten()3191 # q = amplitudes.flatten() 3192 3192 name = 'Amplitudes (ha) [cm]' 3193 print ' %s in [%f, %f]' % (name, min(q), max(q))3194 3195 q = uspeed.flatten()3193 print ' %s in [%f, %f]' % (name, num.min(amplitudes), num.max(amplitudes)) 3194 3195 # q = uspeed.flatten() 3196 3196 name = 'Speeds (ua) [cm/s]' 3197 print ' %s in [%f, %f]' % (name, min(q), max(q))3198 3199 q = vspeed.flatten()3197 print ' %s in [%f, %f]' % (name, num.min(uspeed), num.max(uspeed)) 3198 3199 # q = vspeed.flatten() 3200 3200 name = 'Speeds (va) [cm/s]' 3201 print ' %s in [%f, %f]' % (name, min(q), max(q))3202 3203 q = elevations.flatten()3201 print ' %s in [%f, %f]' % (name, num.min(vspeed), num.max(vspeed)) 3202 3203 # q = elevations.flatten() 3204 3204 name = 'Elevations (e) [m]' 3205 print ' %s in [%f, %f]' % (name, min(q), max(q))3205 print ' %s in [%f, %f]' % (name, num.min(elevations), num.max(elevations)) 3206 3206 3207 3207 # print number_of_latitudes, number_of_longitudes … … 3337 3337 print ' Quantities [SI units]:' 3338 3338 for name in ['stage', 'xmomentum', 'ymomentum', 'elevation']: 3339 q = outfile.variables[name][:] .flatten()3340 print ' %s in [%f, %f]' % (name, min(q),max(q))3339 q = outfile.variables[name][:] # .flatten() 3340 print ' %s in [%f, %f]' % (name, num.min(q), num.max(q)) 3341 3341 3342 3342 outfile.close() … … 7363 7363 points = num.ascontiguousarray(num.concatenate((x[:,num.newaxis], 7364 7364 y[:,num.newaxis]), 7365 axis=1))7365 axis=1)) 7366 7366 point_indices = inside_polygon(points, polygon) 7367 7367 -
branches/numpy/anuga/shallow_water/shallow_water_domain.py
r7193 r7207 913 913 """ 914 914 915 boundary_flows, total_boundary_inflow, total_boundary_outflow = self.compute_boundary_flows() 915 (boundary_flows, total_boundary_inflow, 916 total_boundary_outflow) = self.compute_boundary_flows() 916 917 917 918 s = '---------------------------\n' -
branches/numpy/anuga/shallow_water/tsunami_okada.py
r6472 r7207 215 215 yrec=x 216 216 for i in range(0,len(zrec[0])): 217 if (num.a ny(zrec[0][i]==yrec) and num.any(zrec[1][i]==xrec)):217 if (num.all(zrec[0][i]==yrec) and num.all(zrec[1][i]==xrec)): 218 218 Z=zrec[2][i] 219 219 Z=0.001*Z -
branches/numpy/anuga/utilities/interp.py
r6304 r7207 138 138 """ 139 139 import arrayfns 140 import numpy.ma MA140 import numpy.ma as MA 141 141 import numpy as N 142 142 from where_close import where_close
Note: See TracChangeset
for help on using the changeset viewer.