Changeset 7810
- Timestamp:
- Jun 8, 2010, 2:31:04 PM (13 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/benchmarks/benchmark_sww2dem.py
r7708 r7810 4 4 """ 5 5 6 from anuga. shallow_water.data_managerimport sww2dem6 from anuga.file_conversion.sww2dem import sww2dem 7 7 from create_test_sww import create_test_sww 8 8 import os.path … … 27 27 verbose=True, 28 28 format='asc') 29 29 30 30 31 31 # use existing file … … 33 33 create_test_sww(sww_name) 34 34 35 35 36 start_time = time.time() 36 cProfile.run('sww2dem_test()')37 #sww2dem_test()37 #cProfile.run('sww2dem_test()') 38 sww2dem_test() 38 39 stop_time = time.time() 39 40 print ('sww2dem took %.1fs\n\n\n' % (stop_time - start_time)) -
trunk/anuga_core/benchmarks/create_test_sww.py
r7697 r7810 2 2 # Import necessary modules 3 3 #------------------------------------------------------------------------------ 4 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross 5 from anuga.shallow_water import Domain 6 from anuga.shallow_water import Reflective_boundary 7 from anuga.shallow_water import Dirichlet_boundary 8 4 import anuga 9 5 10 6 def create_test_sww(sww_name): … … 13 9 # Setup computational domain 14 10 #------------------------------------------------------------------------------ 15 points, vertices, boundary = rectangular_cross(50, 50,11 points, vertices, boundary = anuga.rectangular_cross(50, 50, 16 12 len1=50.0, len2=50.0) # Mesh 17 13 18 domain = Domain(points, vertices, boundary) # Create domain14 domain = anuga.Domain(points, vertices, boundary) # Create domain 19 15 domain.set_name(sww_name) # Output name 20 16 … … 33 29 # Setup boundary conditions 34 30 #------------------------------------------------------------------------------ 35 Bi = Dirichlet_boundary([0.4, 0, 0]) # Inflow36 Br = Reflective_boundary(domain) # Solid reflective wall31 Bi = anuga.Dirichlet_boundary([0.4, 0, 0]) # Inflow 32 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 37 33 38 34 domain.set_boundary({'left': Bi, 'right': Br, 'top': Br, 'bottom': Br}) -
trunk/anuga_core/source/anuga/__init__.py
r7800 r7810 22 22 import sys 23 23 sys.path += __path__ 24 24 25 25 26 #----------------------------------------------------- … … 78 79 import Transmissive_boundary 79 80 81 82 83 #----------------------------- 84 # Shalow Water Tsunamis 85 #----------------------------- 86 87 from anuga.shallow_water.smf import slide_tsunami, slump_tsunami 80 88 81 89 … … 110 118 #----------------------------- 111 119 from anuga.shallow_water.sww_interrogate import get_flow_through_cross_section 120 112 121 113 122 #----------------------------- … … 281 290 282 291 283 284 285 292 from anuga.config import use_psyco 293 if use_psyco: 294 # try using psyco if available 295 try: 296 import psyco 297 except: 298 import os 299 if os.name == 'posix' and os.uname()[4] in ['x86_64', 'ia64']: 300 pass 301 # Psyco isn't supported on 64 bit systems, but it doesn't matter 302 else: 303 log.critical('WARNING: psyco (speedup) could not be imported, ' 304 'you may want to consider installing it') 305 else: 306 psyco.full() # aggressively compile everything 307 #psyco.background() # attempt to profile code - only compile most used 308 309 310 311 312 -
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/file_function.py
r7690 r7810 2 2 """File function 3 3 Takes a file as input, and returns it as a mathematical function. 4 For example, you can load an arbitrary 2D heightfield mesh, and treat it as a function as so: 4 For example, you can load an arbitrary 2D heightfield mesh, and treat it as a 5 function like so: 5 6 6 7 F = file_function('my_mesh.sww', ...) 7 8 evaluated_point = F(x, y) 8 9 9 Values will be interpolated across the surface of the mesh. Holes in the mesh have an undefined value. 10 Values will be interpolated across the surface of the mesh. Holes in the mesh 11 have an undefined value. 10 12 11 13 """ … … 21 23 22 24 23 24 ##25 # @brief Read time history of data from NetCDF file, return callable object.26 # @param filename Name of .sww or .tms file.27 # @param domain Associated domain object.28 # @param quantities Name of quantity to be interpolated or a list of names.29 # @param interpolation_points List of absolute UTM coordinates for points30 # (N x 2) or geospatial object or31 # points file name at which values are sought.32 # @param time_thinning33 # @param verbose True if this function is to be verbose.34 # @param use_cache True means that caching of intermediate result is attempted.35 # @param boundary_polygon36 # @param output_centroids if True, data for the centroid of the triangle will be output37 # @return A callable object.38 25 def file_function(filename, 39 26 domain=None, … … 107 94 if verbose: 108 95 msg = 'Quantities specified in file_function are None,' 109 msg += ' so I will usestage, xmomentum, and ymomentum in that order'96 msg += ' so using stage, xmomentum, and ymomentum in that order' 110 97 log.critical(msg) 111 98 quantities = ['stage', 'xmomentum', 'ymomentum'] … … 140 127 msg = 'Caching was requested, but caching module'+\ 141 128 'could not be imported' 142 raise msg129 raise Exception(msg) 143 130 144 131 f, starttime = cache(_file_function, … … 160 147 #Update domain.startime if it is *earlier* than starttime from file 161 148 if starttime > domain.starttime: 162 msg = 'WARNING: Start time as specified in domain (%f)' \163 % domain.starttime164 msg += ' is earlier than the starttime of file %s (%f).' \165 % (filename, starttime)149 msg = 'WARNING: Start time as specified in domain (%f)' \ 150 % domain.starttime 151 msg += ' is earlier than the starttime of file %s (%f).' \ 152 % (filename, starttime) 166 153 msg += ' Modifying domain starttime accordingly.' 167 154 … … 206 193 try: 207 194 fid = open(filename) 208 except Exception, e:195 except IOError, e: 209 196 msg = 'File "%s" could not be opened: Error="%s"' % (filename, e) 210 raise msg197 raise IOError(msg) 211 198 212 199 # read first line of file, guess file type … … 312 299 if filename[-3:] == 'tms' and spatial is True: 313 300 msg = 'Files of type tms must not contain spatial information' 314 raise msg301 raise Exception(msg) 315 302 316 303 if filename[-3:] == 'sww' and spatial is False: 317 304 msg = 'Files of type sww must contain spatial information' 318 raise msg305 raise Exception(msg) 319 306 320 307 if filename[-3:] == 'sts' and spatial is False: 321 308 #What if mux file only contains one point 322 309 msg = 'Files of type sts must contain spatial information' 323 raise msg310 raise Exception(msg) 324 311 325 312 if filename[-3:] == 'sts' and boundary_polygon is None: 326 313 #What if mux file only contains one point 327 314 msg = 'Files of type sts require boundary polygon' 328 raise msg315 raise Exception(msg) 329 316 330 317 # Get first timestep … … 333 320 except ValueError: 334 321 msg = 'Could not read starttime from file %s' % filename 335 raise msg322 raise Exception(msg) 336 323 337 324 # Get variables … … 380 367 triangles = fid.variables['volumes'][:] 381 368 382 x = num.reshape(x, (len(x), 1))383 y = num.reshape(y, (len(y), 1))384 vertex_coordinates = num.concatenate((x, y), axis=1) #m x 2 array369 x = num.reshape(x, (len(x), 1)) 370 y = num.reshape(y, (len(y), 1)) 371 vertex_coordinates = num.concatenate((x, y), axis=1) #m x 2 array 385 372 386 373 if boundary_polygon is not None: 387 374 # Remove sts points that do not lie on boundary 388 # FIXME(Ole): Why don't we just remove such points from the list of points and associated data? 389 # I am actually convinced we can get rid of neighbour_gauge_id altogether as the sts file is produced using the ordering file. 390 # All sts points are therefore always present in the boundary. In fact, they *define* parts of the boundary. 375 # FIXME(Ole): Why don't we just remove such points from the list of 376 # points and associated data? 377 # I am actually convinced we can get rid of neighbour_gauge_id 378 # altogether as the sts file is produced using the ordering file. 379 # All sts points are therefore always present in the boundary. 380 # In fact, they *define* parts of the boundary. 391 381 boundary_polygon=ensure_numeric(boundary_polygon) 392 boundary_polygon[:, 0] -= xllcorner393 boundary_polygon[:, 1] -= yllcorner382 boundary_polygon[:, 0] -= xllcorner 383 boundary_polygon[:, 1] -= yllcorner 394 384 temp=[] 395 385 boundary_id=[] … … 420 410 gauge_neighbour_id=ensure_numeric(gauge_neighbour_id) 421 411 422 if len(num.compress(gauge_neighbour_id>=0, gauge_neighbour_id)) \412 if len(num.compress(gauge_neighbour_id>=0, gauge_neighbour_id)) \ 423 413 != len(temp)-1: 424 414 msg='incorrect number of segments' … … 433 423 if interpolation_points is not None: 434 424 # Adjust for georef 435 interpolation_points[:, 0] -= xllcorner436 interpolation_points[:, 1] -= yllcorner425 interpolation_points[:, 0] -= xllcorner 426 interpolation_points[:, 1] -= yllcorner 437 427 else: 438 428 gauge_neighbour_id=None -
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py
r7780 r7810 16 16 from time import time as walltime 17 17 18 from anuga.config import epsilon19 from anuga.config import beta_euler, beta_rk220 21 18 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 22 from anuga.abstract_2d_finite_volumes.generic_boundary_conditions \23 import ( Boundary, File_boundary, AWI_boundary,24 Dirichlet_boundary, Time_boundary, Transmissive_boundary )25 19 from pmesh2domain import pmesh_to_domain 26 20 from region import Set_region as region_set_region … … 32 26 import numpy as num 33 27 34 35 ##36 # @brief Generic Domain class37 28 class Generic_Domain: 38 39 ## 40 # @brief Generic computational Domain constructor. 29 ''' 30 Generic computational Domain constructor. 41 31 # @param source Name of mesh file or coords of mesh vertices. 42 32 # @param triangles Mesh connectivity (see mesh.py for more information). … … 55 45 # @param numproc ?? 56 46 # @param number_of_full_nodes ?? 57 # @param number_of_full_triangles ?? 47 # @param number_of_full_triangles ?? 48 ''' 49 58 50 def __init__(self, source=None, 59 51 triangles=None, … … 136 128 self.number_of_full_nodes = self.mesh.number_of_full_nodes 137 129 self.number_of_full_triangles = self.mesh.number_of_full_triangles 138 self.number_of_triangles_per_node = self.mesh.number_of_triangles_per_node 130 self.number_of_triangles_per_node = \ 131 self.mesh.number_of_triangles_per_node 139 132 140 133 self.vertex_value_indices = self.mesh.vertex_value_indices … … 162 155 self.other_quantities = other_quantities 163 156 164 # Test that conserved_quantities are stored in the first entries of evolved_quantities 157 # Test that conserved_quantities are stored in the first entries of 158 # evolved_quantities 165 159 for i, quantity in enumerate(self.conserved_quantities): 166 msg = 'The conserved quantities must be the first entries of evolved_quantities' 160 msg = 'The conserved quantities must be the first entries of ' 161 msg += 'evolved_quantities' 167 162 assert quantity == self.evolved_quantities[i], msg 168 163 … … 205 200 for key in self.ghost_recv_dict: 206 201 buffer_shape = self.ghost_recv_dict[key][0].shape[0] 207 self.ghost_recv_dict[key].append(num.zeros((buffer_shape, self.nsys), 202 self.ghost_recv_dict[key].append( \ 203 num.zeros((buffer_shape, self.nsys), 208 204 num.float)) 209 205 … … 321 317 322 318 def get_edge_midpoint_coordinates(self, *args, **kwargs): 323 return self.mesh.get_edge_midpoint_coordinates(*args, **kwargs) 319 return self.mesh.get_edge_midpoint_coordinates(*args, **kwargs) 324 320 325 321 def get_edge_midpoint_coordinate(self, *args, **kwargs): … … 972 968 973 969 for i, quantity in enumerate(self.conserved_quantities): 974 msg = 'Conserved quantities must be the first entries of evolved_quantities' 970 msg = 'Conserved quantities must be the first entries ' 971 msg += 'of evolved_quantities' 975 972 assert quantity == self.evolved_quantities[i], msg 976 973 … … 1005 1002 1006 1003 msg = '' 1007 #if self.recorded_min_timestep == self.recorded_max_timestep:1008 # msg += 'Time = %.4f, delta t = %.8f, steps=%d (%d)'\1009 # %(self.time, self.recorded_min_timestep, self.number_of_steps,1010 # self.number_of_first_order_steps)1011 #elif self.recorded_min_timestep > self.recorded_max_timestep:1012 # msg += 'Time = %.4f, steps=%d (%d)'\1013 # %(self.time, self.number_of_steps,1014 # self.number_of_first_order_steps)1015 #else:1016 # msg += 'Time = %.4f, delta t in [%.8f, %.8f], steps=%d (%d)'\1017 # %(self.time, self.recorded_min_timestep,1018 # self.recorded_max_timestep, self.number_of_steps,1019 # self.number_of_first_order_steps)1020 1004 1021 1005 model_time = self.get_time() 1022 1006 if self.recorded_min_timestep == self.recorded_max_timestep: 1023 1007 msg += 'Time = %.4f, delta t = %.8f, steps=%d' \ 1024 % (model_time, self.recorded_min_timestep, self.number_of_steps) 1008 % (model_time, self.recorded_min_timestep, \ 1009 self.number_of_steps) 1025 1010 elif self.recorded_min_timestep > self.recorded_max_timestep: 1026 1011 msg += 'Time = %.4f, steps=%d' \ … … 1790 1775 q_evol[:] = q_cons 1791 1776 else: 1792 msg = 'Method conserved_values_to_evolved_values must be overridden by Domain subclass' 1777 msg = 'Method conserved_values_to_evolved_values must be overridden' 1778 msg += ' by Domain subclass' 1793 1779 raise Exception, msg 1794 1780 … … 1824 1810 q_evol = self.get_evolved_quantities(vol_id, edge = edge_id) 1825 1811 1826 q_evol = self.conserved_values_to_evolved_values(q_bdry, q_evol) 1812 q_evol = self.conserved_values_to_evolved_values \ 1813 (q_bdry, q_evol) 1827 1814 else: 1828 msg = 'Boundary must return array of either conserved or evolved quantities' 1815 msg = 'Boundary must return array of either conserved' 1816 msg += ' or evolved quantities' 1829 1817 raise Exception, msg 1830 1818 … … 1872 1860 % self.max_smallsteps 1873 1861 log.critical(msg) 1874 timestep = self.evolve_min_timestep # Try enforcing min_step 1875 1876 log.critical(self.timestepping_statistics(track_speeds=True)) 1862 timestep = self.evolve_min_timestep # Try enforce min_step 1863 1864 stats = self.timestepping_statistics(track_speeds=True) 1865 log.critical(stats) 1877 1866 1878 1867 raise Exception, msg … … 2038 2027 2039 2028 # Optimisation with psyco 2040 from anuga.config import use_psyco2041 2042 if use_psyco:2043 try:2044 import psyco2045 except:2046 import os2047 if os.name == 'posix' and os.uname()[4] in ['x86_64', 'ia64']:2048 pass2049 # Psyco isn't supported on 64 bit systems, but it doesn't matter2050 else:2051 log.critical('WARNING: psyco (speedup) could not be imported, '2052 'you may want to consider installing it')2053 else:2054 psyco.bind(Generic_Domain.update_boundary)2055 # psyco.bind(Domain.update_timestep) # Not worth it2056 psyco.bind(Generic_Domain.update_conserved_quantities)2057 psyco.bind(Generic_Domain.distribute_to_vertices_and_edges)2029 #from anuga.config import use_psyco 2030 2031 #if use_psyco: 2032 #try: 2033 #import psyco 2034 #except: 2035 #import os 2036 #if os.name == 'posix' and os.uname()[4] in ['x86_64', 'ia64']: 2037 #pass 2038 ## Psyco isn't supported on 64 bit systems, but it doesn't matter 2039 #else: 2040 #log.critical('WARNING: psyco (speedup) could not be imported, ' 2041 #'you may want to consider installing it') 2042 #else: 2043 #psyco.bind(Generic_Domain.update_boundary) 2044 ##psyco.bind(Domain.update_timestep) # Not worth it 2045 #psyco.bind(Generic_Domain.update_conserved_quantities) 2046 #psyco.bind(Generic_Domain.distribute_to_vertices_and_edges) 2058 2047 2059 2048 -
trunk/anuga_core/source/anuga/config.py
r7454 r7810 244 244 #netcdf_mode_w = 'w' # Old style NetCDF used by OSG viewer 245 245 246 -
trunk/anuga_core/source/anuga/fit_interpolate/interpolate.py
r7778 r7810 1234 1234 1235 1235 1236 ##1237 # @brief ??1238 # @param file_name Name of the .SWW file to read.1239 def read_sww(file_name):1240 """1241 obsolete - Nothing should be calling this1242 1243 Read in an sww file.1244 1245 Input;1246 file_name - the sww file1247 1248 Output;1249 x - Vector of x values1250 y - Vector of y values1251 z - Vector of bed elevation1252 volumes - Array. Each row has 3 values, representing1253 the vertices that define the volume1254 time - Vector of the times where there is stage information1255 stage - array with respect to time and vertices (x,y)1256 """1257 1258 msg = 'Function read_sww in interpolat.py is obsolete'1259 raise Exception, msg1260 1261 #FIXME Have this reader as part of data_manager?1262 1263 from Scientific.IO.NetCDF import NetCDFFile1264 import tempfile1265 import sys1266 import os1267 1268 #Check contents1269 #Get NetCDF1270 1271 # see if the file is there. Throw a QUIET IO error if it isn't1272 # I don't think I could implement the above1273 1274 #throws prints to screen if file not present1275 junk = tempfile.mktemp(".txt")1276 fd = open(junk,'w')1277 stdout = sys.stdout1278 sys.stdout = fd1279 fid = NetCDFFile(file_name, netcdf_mode_r)1280 sys.stdout = stdout1281 fd.close()1282 #clean up1283 os.remove(junk)1284 1285 # Get the variables1286 x = fid.variables['x'][:]1287 y = fid.variables['y'][:]1288 volumes = fid.variables['volumes'][:]1289 time = fid.variables['time'][:]1290 1291 keys = fid.variables.keys()1292 keys.remove("x")1293 keys.remove("y")1294 keys.remove("volumes")1295 keys.remove("time")1296 #Turn NetCDF objects into numeric arrays1297 quantities = {}1298 for name in keys:1299 quantities[name] = fid.variables[name][:]1300 1301 fid.close()1302 return x, y, volumes, time, quantities1303 1304 1305 #-------------------------------------------------------------1306 if __name__ == "__main__":1307 names = ["x","y"]1308 someiterable = [[1,2],[3,4]]1309 csvwriter = writer(file("some.csv", "wb"))1310 csvwriter.writerow(names)1311 for row in someiterable:1312 csvwriter.writerow(row) -
trunk/anuga_core/source/anuga/pmesh/mesh_quadtree.py
r7778 r7810 6 6 7 7 """ 8 import time9 8 10 from anuga.utilities.numerical_tools import get_machine_precision11 9 from anuga.utilities.numerical_tools import ensure_numeric 12 10 from anuga.config import max_float … … 15 13 from anuga.geometry.aabb import AABB 16 14 17 from anuga.utilities import compile 18 if compile .can_use_C_extension('polygon_ext.c'):15 from anuga.utilities import compile as compile_c 16 if compile_c.can_use_C_extension('polygon_ext.c'): 19 17 # Underlying C implementations can be accessed 20 18 from polygon_ext import _is_inside_triangle 21 19 else: 22 msg = 'C implementations could not be accessed by %s.\n ' % __file__20 msg = 'C implementations could not be accessed by %s.\n ' % __file__ 23 21 msg += 'Make sure compile_all.py has been run as described in ' 24 22 msg += 'the ANUGA installation guide.' … … 69 67 x2, y2 = V[i3+2, :] 70 68 71 node_data = [i, V[i3:i3+3, :], normals[i,:]]69 node_data = [i, V[i3:i3+3, :], normals[i, :]] 72 70 73 71 # insert a tuple with an AABB, and the triangle index as data … … 76 74 node_data)) 77 75 78 def search_fast(self, x):76 def search_fast(self, point): 79 77 """ 80 78 Find the triangle (element) that the point x is in. 81 79 82 80 Inputs: 83 x: The point to test81 point: The point to test 84 82 85 83 Return: … … 93 91 """ 94 92 95 x = ensure_numeric(x, num.float)93 point = ensure_numeric(point, num.float) 96 94 97 95 # check the last triangle found first 98 96 element_found, sigma0, sigma1, sigma2, k = \ 99 self._search_triangles_of_vertices(self.last_triangle, x)97 self._search_triangles_of_vertices(self.last_triangle, point) 100 98 if element_found: 101 99 return True, sigma0, sigma1, sigma2, k … … 104 102 105 103 # test neighbouring tris 106 tri_data = branch.test_leaves( x)104 tri_data = branch.test_leaves(point) 107 105 element_found, sigma0, sigma1, sigma2, k = \ 108 self._search_triangles_of_vertices(tri_data, x)106 self._search_triangles_of_vertices(tri_data, point) 109 107 if element_found: 110 108 return True, sigma0, sigma1, sigma2, k … … 115 113 while branch: 116 114 for sibling in next_search: 117 tri_data = sibling.search( x)115 tri_data = sibling.search(point) 118 116 element_found, sigma0, sigma1, sigma2, k = \ 119 self._search_triangles_of_vertices(tri_data, x)117 self._search_triangles_of_vertices(tri_data, point) 120 118 if element_found: 121 119 return True, sigma0, sigma1, sigma2, k … … 124 122 branch = branch.parent 125 123 if branch: 126 tri_data = branch.test_leaves( x)124 tri_data = branch.test_leaves(point) 127 125 element_found, sigma0, sigma1, sigma2, k = \ 128 self._search_triangles_of_vertices(tri_data, x)126 self._search_triangles_of_vertices(tri_data, point) 129 127 if element_found: 130 128 return True, sigma0, sigma1, sigma2, k … … 133 131 134 132 135 def _search_triangles_of_vertices(self, triangles, x):133 def _search_triangles_of_vertices(self, triangles, point): 136 134 """Search for triangle containing x among triangle list 137 135 … … 141 139 Input check disabled to speed things up. 142 140 143 xis the point to test141 point is the point to test 144 142 triangles is the triangle list 145 143 return the found triangle and its interpolation sigma. … … 147 145 148 146 for node_data in triangles: 149 if bool(_is_inside_triangle( x, node_data[0][1], \147 if bool(_is_inside_triangle(point, node_data[0][1], \ 150 148 int(True), 1.0e-12, 1.0e-12)): 151 149 normals = node_data[0][2] … … 155 153 xi0, xi1, xi2 = node_data[0][1] 156 154 157 sigma0 = num.dot(( x-xi1), n0)/num.dot((xi0-xi1), n0)158 sigma1 = num.dot(( x-xi2), n1)/num.dot((xi1-xi2), n1)159 sigma2 = num.dot(( x-xi0), n2)/num.dot((xi2-xi0), n2)155 sigma0 = num.dot((point-xi1), n0)/num.dot((xi0-xi1), n0) 156 sigma1 = num.dot((point-xi2), n1)/num.dot((xi1-xi2), n1) 157 sigma2 = num.dot((point-xi0), n2)/num.dot((xi2-xi0), n2) 160 158 161 159 # Don't look for any other triangles in the triangle list -
trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r7778 r7810 1419 1419 1420 1420 # Optimisation with psyco 1421 from anuga.config import use_psyco1422 if use_psyco:1423 try:1424 import psyco1425 except:1426 import os1427 if os.name == 'posix' and os.uname()[4] in ['x86_64', 'ia64']:1428 pass1429 # Psyco isn't supported on 64 bit systems, but it doesn't matter1430 else:1431 msg = ('WARNING: psyco (speedup) could not be imported, '1432 'you may want to consider installing it')1433 log.critical(msg)1434 else:1435 psyco.bind(Domain.distribute_to_vertices_and_edges)1436 psyco.bind(Domain.compute_fluxes)1421 #from anuga.config import use_psyco 1422 #if use_psyco: 1423 #try: 1424 #import psyco 1425 #except: 1426 #import os 1427 #if os.name == 'posix' and os.uname()[4] in ['x86_64', 'ia64']: 1428 #pass 1429 ##Psyco isn't supported on 64 bit systems, but it doesn't matter 1430 #else: 1431 #msg = ('WARNING: psyco (speedup) could not be imported, ' 1432 #'you may want to consider installing it') 1433 #log.critical(msg) 1434 #else: 1435 #psyco.bind(Domain.distribute_to_vertices_and_edges) 1436 #psyco.bind(Domain.compute_fluxes) 1437 1437 1438 1438 -
trunk/anuga_core/source/anuga/utilities/log.py
r7519 r7810 92 92 93 93 global _setup, log_logging_level 94 fname = '' # default to no frame name if it cannot be found 95 lnum = 0 94 96 95 97 # have we been setup?
Note: See TracChangeset
for help on using the changeset viewer.