Changeset 7715


Ignore:
Timestamp:
May 11, 2010, 1:28:44 PM (15 years ago)
Author:
hudson
Message:

New MeshQuadtree? module, removed unneeded arguments from search.

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  
    3535from anuga.utilities.sparse import Sparse, Sparse_CSR
    3636from anuga.geometry.polygon import inside_polygon, is_inside_polygon
    37 from anuga.fit_interpolate.search_functions import search_tree_of_vertices
     37from anuga.fit_interpolate.mesh_quadtree import search_tree_of_vertices
    3838
    3939from anuga.utilities.cg_solve import conjugate_gradient
  • anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py

    r7713 r7715  
    3131from anuga.geospatial_data.geospatial_data import Geospatial_data, \
    3232     ensure_absolute
    33 from anuga.fit_interpolate.search_functions import set_last_triangle, MeshQuadtree
     33from anuga.fit_interpolate.mesh_quadtree import set_last_triangle, MeshQuadtree
    3434import anuga.utilities.log as log
    3535
  • anuga_core/source/anuga/fit_interpolate/interpolate.py

    r7711 r7715  
    3333from anuga.geospatial_data.geospatial_data import Geospatial_data
    3434from anuga.geospatial_data.geospatial_data import ensure_absolute
    35 from anuga.fit_interpolate.search_functions import search_tree_of_vertices
     35from anuga.fit_interpolate.mesh_quadtree import search_tree_of_vertices
    3636from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate
    3737from anuga.abstract_2d_finite_volumes.file_function import file_function
  • anuga_core/source/anuga/fit_interpolate/test_meshquad.py

    r7713 r7715  
    44from anuga.geometry.aabb import AABB
    55from anuga.geometry.quad import Cell
    6 from anuga.fit_interpolate.search_functions import MeshQuadtree
     6from anuga.fit_interpolate.mesh_quadtree import MeshQuadtree
    77from anuga.abstract_2d_finite_volumes.general_mesh import General_mesh as Mesh
    88
     
    4343
    4444        # test a point that falls within a triangle
    45         result = Q.search(10, 10)
     45        result = Q.search([10, 10])
    4646        assert type(result) in [types.ListType,types.TupleType],\
    4747                            'should be a list'
     
    136136
    137137        Q = MeshQuadtree(mesh)
    138         results = Q.search(4.5, 3)
     138        results = Q.search([4.5, 3])
    139139        assert len(results) == 1
    140140        idx, _ = results[0]
    141141        self.assertEqual(idx, 2)
    142         results = Q.search(5,4.)
     142        results = Q.search([5,4.])
    143143        self.assertEqual(len(results),1)
    144144        idx, _ = results[0]
     
    162162
    163163        Q = MeshQuadtree(mesh)
    164         results = Q.search(4.5, 3)
     164        results = Q.search([4.5, 3])
    165165        assert len(results) == 1
    166166        self.assertEqual(results[0], 2)
    167         results = Q.search(5,4.)
     167        results = Q.search([5,4.])
    168168        self.assertEqual(len(results),1)
    169169        self.assertEqual(results[0], 2)     
  • anuga_core/source/anuga/fit_interpolate/test_search_functions.py

    r7713 r7715  
    33
    44import unittest
    5 from search_functions import search_tree_of_vertices, set_last_triangle
    6 from search_functions import _search_triangles_of_vertices
    7 from search_functions import _trilist_from_data
    8 from search_functions import compute_interpolation_values, MeshQuadtree
     5from mesh_quadtree import search_tree_of_vertices, set_last_triangle
     6from mesh_quadtree import _search_triangles_of_vertices
     7from mesh_quadtree import _trilist_from_data
     8from mesh_quadtree import compute_interpolation_values, MeshQuadtree
    99
    1010from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
     
    156156        x = ensure_numeric([0.5, 0.5])
    157157
    158         triangles = _trilist_from_data(mesh, root.search(x[0], x[1]))
     158        triangles = _trilist_from_data(mesh, root.search(x))
    159159   
    160160        found, sigma0, sigma1, sigma2, k = \
     
    175175                  [10, 3]]:
    176176               
    177             triangles = _trilist_from_data(mesh, root.search(x[0], x[1]))
     177            triangles = _trilist_from_data(mesh, root.search(x))
    178178
    179179            #print x, candidate_vertices
Note: See TracChangeset for help on using the changeset viewer.