Changeset 7715
- Timestamp:
- May 11, 2010, 1:28:44 PM (15 years ago)
- Location:
- anuga_core/source/anuga/fit_interpolate
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/fit.py
r7711 r7715 35 35 from anuga.utilities.sparse import Sparse, Sparse_CSR 36 36 from anuga.geometry.polygon import inside_polygon, is_inside_polygon 37 from anuga.fit_interpolate. search_functionsimport search_tree_of_vertices37 from anuga.fit_interpolate.mesh_quadtree import search_tree_of_vertices 38 38 39 39 from anuga.utilities.cg_solve import conjugate_gradient -
anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py
r7713 r7715 31 31 from anuga.geospatial_data.geospatial_data import Geospatial_data, \ 32 32 ensure_absolute 33 from anuga.fit_interpolate. search_functionsimport set_last_triangle, MeshQuadtree33 from anuga.fit_interpolate.mesh_quadtree import set_last_triangle, MeshQuadtree 34 34 import anuga.utilities.log as log 35 35 -
anuga_core/source/anuga/fit_interpolate/interpolate.py
r7711 r7715 33 33 from anuga.geospatial_data.geospatial_data import Geospatial_data 34 34 from anuga.geospatial_data.geospatial_data import ensure_absolute 35 from anuga.fit_interpolate. search_functionsimport search_tree_of_vertices35 from anuga.fit_interpolate.mesh_quadtree import search_tree_of_vertices 36 36 from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate 37 37 from anuga.abstract_2d_finite_volumes.file_function import file_function -
anuga_core/source/anuga/fit_interpolate/test_meshquad.py
r7713 r7715 4 4 from anuga.geometry.aabb import AABB 5 5 from anuga.geometry.quad import Cell 6 from anuga.fit_interpolate. search_functionsimport MeshQuadtree6 from anuga.fit_interpolate.mesh_quadtree import MeshQuadtree 7 7 from anuga.abstract_2d_finite_volumes.general_mesh import General_mesh as Mesh 8 8 … … 43 43 44 44 # test a point that falls within a triangle 45 result = Q.search( 10, 10)45 result = Q.search([10, 10]) 46 46 assert type(result) in [types.ListType,types.TupleType],\ 47 47 'should be a list' … … 136 136 137 137 Q = MeshQuadtree(mesh) 138 results = Q.search( 4.5, 3)138 results = Q.search([4.5, 3]) 139 139 assert len(results) == 1 140 140 idx, _ = results[0] 141 141 self.assertEqual(idx, 2) 142 results = Q.search( 5,4.)142 results = Q.search([5,4.]) 143 143 self.assertEqual(len(results),1) 144 144 idx, _ = results[0] … … 162 162 163 163 Q = MeshQuadtree(mesh) 164 results = Q.search( 4.5, 3)164 results = Q.search([4.5, 3]) 165 165 assert len(results) == 1 166 166 self.assertEqual(results[0], 2) 167 results = Q.search( 5,4.)167 results = Q.search([5,4.]) 168 168 self.assertEqual(len(results),1) 169 169 self.assertEqual(results[0], 2) -
anuga_core/source/anuga/fit_interpolate/test_search_functions.py
r7713 r7715 3 3 4 4 import unittest 5 from search_functionsimport search_tree_of_vertices, set_last_triangle6 from search_functionsimport _search_triangles_of_vertices7 from search_functionsimport _trilist_from_data8 from search_functionsimport compute_interpolation_values, MeshQuadtree5 from mesh_quadtree import search_tree_of_vertices, set_last_triangle 6 from mesh_quadtree import _search_triangles_of_vertices 7 from mesh_quadtree import _trilist_from_data 8 from mesh_quadtree import compute_interpolation_values, MeshQuadtree 9 9 10 10 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh … … 156 156 x = ensure_numeric([0.5, 0.5]) 157 157 158 triangles = _trilist_from_data(mesh, root.search(x [0], x[1]))158 triangles = _trilist_from_data(mesh, root.search(x)) 159 159 160 160 found, sigma0, sigma1, sigma2, k = \ … … 175 175 [10, 3]]: 176 176 177 triangles = _trilist_from_data(mesh, root.search(x [0], x[1]))177 triangles = _trilist_from_data(mesh, root.search(x)) 178 178 179 179 #print x, candidate_vertices
Note: See TracChangeset
for help on using the changeset viewer.