Changeset 8578 for trunk/anuga_core/source/anuga/pmesh/mesh_quadtree.py
- Timestamp:
- Sep 14, 2012, 9:56:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/pmesh/mesh_quadtree.py
r7872 r8578 24 24 25 25 import numpy as num 26 import sys 26 27 27 28 … … 41 42 It contains optimisations and search patterns specific to meshes. 42 43 """ 43 def __init__(self, mesh ):44 def __init__(self, mesh, verbose=False): 44 45 """Build quad tree for mesh. 45 46 … … 60 61 61 62 normals = mesh.get_normals() 62 63 64 if verbose : 65 print '['+60*' '+']', 66 sys.stdout.flush() 67 68 M = N/60 69 63 70 # Check each triangle 64 for i in range(N): 71 for i in xrange(N): 72 73 if verbose and i%M == 0 : 74 #restart_line() 75 print '\r['+(i/M)*'.'+(60-(i/M))*' ' +']', 76 sys.stdout.flush() 77 65 78 i3 = 3*i 66 79 x0, y0 = V[i3, :] … … 68 81 x2, y2 = V[i3+2, :] 69 82 83 #FIXME SR: Should save memory by just using triangle id! 70 84 node_data = [i, V[i3:i3+3, :], normals[i, :]] 71 85 … … 74 88 min([y0, y1, y2]), max([y0, y1, y2])), \ 75 89 node_data)) 90 91 if verbose: 92 print '' 76 93 77 94 def search_fast(self, point):
Note: See TracChangeset
for help on using the changeset viewer.