- Timestamp:
- Mar 17, 2009, 11:14:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/search_functions.py
r6174 r6536 8 8 import time 9 9 10 from anuga.utilities.polygon import is_inside_triangle 10 11 from anuga.utilities.numerical_tools import get_machine_precision 11 12 from anuga.config import max_float … … 145 146 for k, tri_verts_norms in triangles: 146 147 tri = tri_verts_norms[0] 147 n0, n1, n2 = tri_verts_norms[1] 148 148 149 # k is the triangle index 149 150 # tri is a list of verts (x, y), representing a tringle 150 151 # Find triangle that contains x (if any) and interpolate 151 element_found, sigma0, sigma1, sigma2 =\ 152 find_triangle_compute_interpolation(tri, n0, n1, n2, x) 152 if is_inside_triangle(x, tri, closed=True): 153 n0, n1, n2 = tri_verts_norms[1] 154 element_found, sigma0, sigma1, sigma2 =\ 155 find_triangle_compute_interpolation(tri, n0, n1, n2, x) 156 else: 157 element_found = False 158 159 153 160 if element_found is True: 154 161 # Don't look for any other triangles in the triangle list
Note: See TracChangeset
for help on using the changeset viewer.