Changeset 705 for inundation/ga/storm_surge/pyvolution/least_squares.py
- Timestamp:
- Dec 14, 2004, 12:59:59 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/least_squares.py
r641 r705 245 245 #Find vertices near x 246 246 candidate_vertices = root.search(x[0], x[1]) 247 248 247 is_more_elements = True 249 if candidate_vertices == []: 250 # The point isn't even within the root cell! 251 is_more_elements = False 252 element_found = False 253 else: 254 element_found, sigma0, sigma1, sigma2, k = \ 255 self.search_triangles_of_vertices(candidate_vertices, x) 256 248 249 element_found, sigma0, sigma1, sigma2, k = \ 250 self.search_triangles_of_vertices(candidate_vertices, x) 257 251 while not element_found and is_more_elements: 258 candidate_vertices = root.expand_search() 259 if candidate_vertices == []: 260 # All the triangles have been searched. 252 candidate_vertices, branch = root.expand_search() 253 if branch == []: 254 # Searching all the verts from the root cell that haven't 255 # been searched. This is the last try 256 element_found, sigma0, sigma1, sigma2, k = \ 257 self.search_triangles_of_vertices(candidate_vertices, x) 261 258 is_more_elements = False 262 259 else: 263 260 element_found, sigma0, sigma1, sigma2, k = \ 264 261 self.search_triangles_of_vertices(candidate_vertices, x) 265 266 262 267 263 268 264 #Update interpolation matrix A if necessary … … 301 297 sigma0 = -10.0 302 298 sigma1 = -10.0 299 k = -10.0 303 300 304 301 #For all vertices in same cell as point x … … 317 314 #print "PDSG - xi1", xi1 318 315 #print "PDSG - xi2", xi2 319 320 # 316 #print "PDSG element %i verts((%f, %f),(%f, %f),(%f, %f))" \ 317 # % (k, xi0[0], xi0[1], xi1[0], xi1[1], xi2[0], xi2[1]) 321 318 322 319 #Get the three normals
Note: See TracChangeset
for help on using the changeset viewer.