Changeset 7711


Ignore:
Timestamp:
May 7, 2010, 4:00:13 PM (14 years ago)
Author:
hudson
Message:

Refactored geometry classes to live in their own folder.

Location:
anuga_core/source/anuga
Files:
2 added
29 edited
2 copied
5 moved

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py

    r7704 r7711  
    2121from anuga.abstract_2d_finite_volumes.region \
    2222        import Set_region as region_set_region
    23 from anuga.utilities.polygon import inside_polygon
     23from anuga.geometry.polygon import inside_polygon
    2424from anuga.abstract_2d_finite_volumes.util import get_textual_float
    2525from quantity import Quantity
  • anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py

    r7317 r7711  
    865865        # We should make it fast - probably based on the
    866866        # quad tree structure.
    867         from anuga.utilities.polygon import is_outside_polygon,\
     867        from anuga.geometry.polygon import is_outside_polygon,\
    868868             is_inside_polygon
    869869
     
    10331033    """
    10341034
    1035     from anuga.utilities.polygon import intersection
    1036     from anuga.utilities.polygon import is_inside_polygon
     1035    from anuga.geometry.polygon import intersection
     1036    from anuga.geometry.polygon import is_inside_polygon
    10371037
    10381038    msg = 'Line segment must contain exactly two points'
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r7590 r7711  
    1818
    1919from anuga.utilities.numerical_tools import ensure_numeric, is_scalar
    20 from anuga.utilities.polygon import inside_polygon
     20from anuga.geometry.polygon import inside_polygon
    2121from anuga.geospatial_data.geospatial_data import Geospatial_data
    2222from anuga.fit_interpolate.fit import fit_to_mesh
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py

    r7276 r7711  
    1616
    1717from anuga.coordinate_transforms.geo_reference import Geo_reference
    18 from anuga.utilities.polygon import is_inside_polygon
     18from anuga.geometry.polygon import is_inside_polygon
    1919from anuga.utilities.numerical_tools import ensure_numeric
    2020
     
    967967        and check that boundary is as expected
    968968        """
    969 
    970 
    971         from anuga.utilities.polygon import plot_polygons
    972969
    973970        # First do the continuous version of mesh
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_quantity.py

    r7590 r7711  
    1313from anuga.geospatial_data.geospatial_data import Geospatial_data
    1414from anuga.coordinate_transforms.geo_reference import Geo_reference
    15 from anuga.utilities.polygon import *
     15from anuga.geometry.polygon import *
    1616
    1717import numpy as num
  • anuga_core/source/anuga/abstract_2d_finite_volumes/util.py

    r7695 r7711  
    55"""
    66
    7 import anuga.utilities.polygon
     7import anuga.geometry.polygon
    88import sys
    99import os
     
    184184
    185185    msg = 'point_on_line has moved from util.py.  '
    186     msg += 'Please use "from anuga.utilities.polygon import point_on_line"'
     186    msg += 'Please use "from anuga.geometry.polygon import point_on_line"'
    187187    warn(msg, DeprecationWarning)
    188188
    189     return utilities.polygon.point_on_line(*args, **kwargs)   
     189    return utilities.geometry.point_on_line(*args, **kwargs)   
    190190
    191191   
     
    198198                 '"from anuga.utilities.polygon import inside_polygon"')
    199199
    200     return utilities.polygon.inside_polygon(*args, **kwargs)   
     200    return geometry.polygon.inside_polygon(*args, **kwargs)   
    201201
    202202   
     
    207207    log.critical('outside_polygon has moved from util.py.')
    208208    log.critical('Please use '
    209                  '"from anuga.utilities.polygon import outside_polygon"')
    210 
    211     return utilities.polygon.outside_polygon(*args, **kwargs)   
     209                 '"from anuga.geometry.polygon import outside_polygon"')
     210
     211    return geometry.geometry.outside_polygon(*args, **kwargs)   
    212212
    213213   
     
    218218    log.critical('read_polygon has moved from util.py.')
    219219    log.critical('Please use '
    220                  '"from anuga.utilities.polygon import read_polygon"')
    221 
    222     return utilities.polygon.read_polygon(*args, **kwargs)   
     220                 '"from anuga.geometry.polygon import read_polygon"')
     221
     222    return geometry.geometry.read_polygon(*args, **kwargs)   
    223223
    224224
     
    231231                 '"from anuga.utilities.polygon import populate_polygon"')
    232232
    233     return utilities.polygon.populate_polygon(*args, **kwargs)   
     233    return utilities.geometry.populate_polygon(*args, **kwargs)   
    234234
    235235
  • anuga_core/source/anuga/culvert_flows/culvert_class.py

    r7495 r7711  
    44from anuga.culvert_flows.culvert_polygons import create_culvert_polygons
    55from anuga.utilities.system_tools import log_to_file
    6 from anuga.utilities.polygon import inside_polygon
    7 from anuga.utilities.polygon import is_inside_polygon
    8 from anuga.utilities.polygon import plot_polygons
     6from anuga.geometry.polygon import inside_polygon, is_inside_polygon, plot_polygons
    97
    108from anuga.utilities.numerical_tools import mean
  • anuga_core/source/anuga/culvert_flows/culvert_polygons.py

    r7276 r7711  
    44# Import necessary modules
    55from math import sqrt
    6 from anuga.utilities.polygon import inside_polygon, polygon_area
     6from anuga.geometry.polygon import inside_polygon, polygon_area
    77
    88import numpy as num
  • anuga_core/source/anuga/culvert_flows/culvert_polygons_example.py

    r5301 r7711  
    88"""
    99
    10 from anuga.utilities.polygon import plot_polygons
     10from anuga.geometry.polygon import plot_polygons
    1111from culvert_polygons import create_culvert_polygons
    1212
  • anuga_core/source/anuga/culvert_flows/new_culvert_class.py

    r7706 r7711  
    44from anuga.culvert_flows.culvert_polygons import create_culvert_polygons
    55from anuga.utilities.system_tools import log_to_file
    6 from anuga.utilities.polygon import inside_polygon
    7 from anuga.utilities.polygon import is_inside_polygon
    8 from anuga.utilities.polygon import plot_polygons
     6from anuga.geometry.polygon import inside_polygon, is_inside_polygon, plot_polygons
    97
    108from anuga.utilities.numerical_tools import mean
  • anuga_core/source/anuga/culvert_flows/test_culvert_class.py

    r7562 r7711  
    77
    88from anuga.utilities.system_tools import get_pathname_from_package
    9 from anuga.utilities.polygon import Polygon_function
     9from anuga.geometry.polygon import Polygon_function
    1010       
    1111from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross
  • anuga_core/source/anuga/culvert_flows/test_culvert_polygons.py

    r6150 r7711  
    66import os.path
    77
    8 from anuga.utilities.polygon import inside_polygon, polygon_area
     8from anuga.geometry.polygon import inside_polygon, polygon_area
    99
    1010
  • anuga_core/source/anuga/fit_interpolate/fit.py

    r7710 r7711  
    3434from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate
    3535from anuga.utilities.sparse import Sparse, Sparse_CSR
    36 from anuga.utilities.polygon import inside_polygon, is_inside_polygon
     36from anuga.geometry.polygon import inside_polygon, is_inside_polygon
    3737from anuga.fit_interpolate.search_functions import search_tree_of_vertices
    3838
  • anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py

    r7710 r7711  
    2727from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError
    2828from anuga.utilities.numerical_tools import ensure_numeric
    29 from anuga.utilities.quad import build_quadtree
    3029
    3130from anuga.coordinate_transforms.geo_reference import Geo_reference
    3231from anuga.geospatial_data.geospatial_data import Geospatial_data, \
    3332     ensure_absolute
    34 from anuga.fit_interpolate.search_functions import set_last_triangle
     33from anuga.fit_interpolate.search_functions import set_last_triangle, MeshQuadtree
    3534import anuga.utilities.log as log
    3635
     
    107106            #This stores indices of vertices
    108107            t0 = time.time()
    109             self.root = build_quadtree(self.mesh)
     108            self.root = MeshQuadtree(self.mesh)
    110109       
    111110            build_quadtree_time =  time.time()-t0
  • anuga_core/source/anuga/fit_interpolate/interpolate.py

    r7710 r7711  
    3131from anuga.coordinate_transforms.geo_reference import Geo_reference
    3232from anuga.utilities.numerical_tools import ensure_numeric, NAN
    33 from anuga.utilities.polygon import in_and_outside_polygon
    3433from anuga.geospatial_data.geospatial_data import Geospatial_data
    3534from anuga.geospatial_data.geospatial_data import ensure_absolute
     
    3837from anuga.abstract_2d_finite_volumes.file_function import file_function
    3938from anuga.config import netcdf_mode_r, netcdf_mode_w, netcdf_mode_a
    40 from utilities.polygon import interpolate_polyline
     39from anuga.geometry.polygon import interpolate_polyline, in_and_outside_polygon
    4140import anuga.utilities.log as log
    4241
     
    872871                # mesh boundary as defined by triangles and vertex_coordinates.
    873872                from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    874                 from anuga.utilities.polygon import outside_polygon
     873                from anuga.geometry.polygon import outside_polygon
    875874
    876875                # Create temporary mesh object from mesh info passed
     
    900899                        if sys.platform == 'win32':
    901900                            # FIXME (Ole): Why only Windoze?
    902                             from anuga.utilities.polygon import plot_polygons
     901                            from anuga.geometry.polygon import plot_polygons
    903902                            title = ('Interpolation points fall '
    904903                                     'outside specified mesh')
     
    932931                import sys
    933932                if sys.platform == 'win32':
    934                     from anuga.utilities.polygon import plot_polygons
     933                    from anuga.geometry.polygon import plot_polygons
    935934                    title = ('Interpolation function: '
    936935                             'Polygon and interpolation points')
  • anuga_core/source/anuga/fit_interpolate/search_functions.py

    r7707 r7711  
    1111from anuga.utilities.numerical_tools import ensure_numeric
    1212from anuga.config import max_float
     13from anuga.geometry.quad import Cell
     14from anuga.geometry.aabb import AABB
    1315
    1416from anuga.utilities import compile
     
    190192    search_one_cell_time = initial_search_value
    191193    search_more_cells_time = initial_search_value
     194
     195
     196class MeshQuadtree(Cell):
     197    """ A quadtree constructed from the given mesh.
     198    """
     199    def __init__(self, mesh):
     200        """Build quad tree for mesh.
     201
     202        All vertex indices in the mesh are stored in a quadtree.
     203        """
     204       
     205        extents = AABB(*mesh.get_extent(absolute=True))   
     206        extents.grow(1.001) # To avoid round off error
     207        Cell.__init__(self, extents)
     208       
     209        N = len(mesh)
     210
     211        # Get x,y coordinates for all vertices for all triangles
     212        V = mesh.get_vertex_coordinates(absolute=True)
     213       
     214        # Check each triangle
     215        for i in range(N):
     216            x0, y0 = V[3*i, :]
     217            x1, y1 = V[3*i+1, :]
     218            x2, y2 = V[3*i+2, :]
     219
     220            # insert a tuple with an AABB, and the triangle index as data
     221            self._insert((AABB(min([x0, x1, x2]), max([x0, x1, x2]), \
     222                             min([y0, y1, y2]), max([y0, y1, y2])), \
     223                             i))
     224
  • anuga_core/source/anuga/fit_interpolate/test_meshquad.py

    r7709 r7711  
    22import numpy as num
    33
    4 from quad import AABB, Cell, build_quadtree
     4from anuga.geometry.aabb import AABB
     5from anuga.geometry.quad import Cell
     6from anuga.fit_interpolate.search_functions import MeshQuadtree
    57from anuga.abstract_2d_finite_volumes.general_mesh import General_mesh as Mesh
    68
     
    1618    def tearDown(self):
    1719        pass
    18 
    19     def test_AABB_contains(self):
    20         box = AABB(1, 21, 1, 11)
    21         assert box.contains(10, 5)
    22         assert box.contains(1, 1)
    23         assert box.contains(20, 6)
    24         assert not box.contains(-1, -1)
    25         assert not box.contains(5, 70)
    26         assert not box.contains(6, -70)
    27         assert not box.contains(-1, 6)
    28         assert not box.contains(50, 6)       
    29        
    30     def test_AABB_split_vert(self):
    31         parent = AABB(1, 21, 1, 11)
    32        
    33         child1, child2 = parent.split(0.6)
    34 
    35         self.assertEqual(child1.xmin, 1)
    36         self.assertEqual(child1.xmax, 13)
    37         self.assertEqual(child1.ymin, 1)
    38         self.assertEqual(child1.ymax, 11)
    39        
    40         self.assertEqual(child2.xmin, 9)
    41         self.assertEqual(child2.xmax, 21)
    42         self.assertEqual(child2.ymin, 1)
    43         self.assertEqual(child2.ymax, 11)   
    44 
    45     def test_AABB_split_horiz(self):
    46         parent = AABB(1, 11, 1, 41)
    47        
    48         child1, child2 = parent.split(0.6)
    49 
    50         self.assertEqual(child1.xmin, 1)
    51         self.assertEqual(child1.xmax, 11)
    52         self.assertEqual(child1.ymin, 1)
    53         self.assertEqual(child1.ymax, 25)
    54        
    55         self.assertEqual(child2.xmin, 1)
    56         self.assertEqual(child2.xmax, 11)
    57         self.assertEqual(child2.ymin, 17)
    58         self.assertEqual(child2.ymax, 41)         
    59        
    60     def test_add_data(self):
    61         cell = Cell(AABB(0,10, 0,5))
    62         cell.insert([(AABB(1,3, 1, 3), 111), (AABB(8,9, 1, 2), 222),  \
    63                      (AABB(7, 8, 3, 4), 333), (AABB(1, 10, 0, 1), 444)])
    64 
    65         result = cell.retrieve()
    66         assert type(result) in [types.ListType,types.TupleType],\
    67                             'should be a list'
    68 
    69         self.assertEqual(len(result),4)
    70        
    71     def test_search(self):
    72         test_region = (AABB(8,9, 1, 2), 222)
    73         cell = Cell(AABB(0,10, 0,5))
    74         cell.insert([(AABB(1,3, 1, 3), 111), test_region,  \
    75                      (AABB(7, 8, 3, 4), 333), (AABB(1, 10, 0, 1), 444)])
    76 
    77         result =  cell.search(x = 8.5, y = 1.5, get_vertices=True)
    78         assert type(result) in [types.ListType,types.TupleType],\
    79                             'should be a list'
    80         self.assertEqual(result, [test_region], 'only 1 point should intersect')
    81 
    82 
    83     def test_clear_1(self):
    84         cell = Cell(AABB(0,10, 0,5))   
    85         cell.insert([(AABB(1,3, 1, 3), 111), (AABB(8,9, 1, 2), 222),  \
    86                      (AABB(7, 8, 3, 4), 333), (AABB(1, 10, 0, 1), 444)])
    87                      
    88         assert len(cell.retrieve()) == 4
    89         cell.clear()
    90 
    91         assert len(cell.retrieve()) == 0
    9220
    9321    def test_build_quadtree(self):
     
    10937        mesh = Mesh(points, vertices)
    11038   
    111         Q = build_quadtree(mesh)
     39        Q = MeshQuadtree(mesh)
    11240        #Q.show()
    11341        #print Q.count()
     
    13866
    13967        #This was causing round off error
    140         Q = build_quadtree(mesh)
     68        Q = MeshQuadtree(mesh)
    14169       
    14270    def NOtest_interpolate_one_point_many_triangles(self):
     
    184112        mesh = Mesh(vertices, triangles)
    185113        try:
    186             Q = build_quadtree(mesh, max_points_per_cell = 9)
     114            Q = MeshQuadtree(mesh, max_points_per_cell = 9)
    187115        except RuntimeError:
    188116            pass
     
    207135        mesh = Mesh(points, vertices)
    208136
    209         Q = build_quadtree(mesh)
     137        Q = MeshQuadtree(mesh)
    210138        results = Q.search(4.5, 3)
    211139        assert len(results) == 1
     
    214142        self.assertEqual(len(results),1)
    215143        self.assertEqual(results[0], 2)
     144       
     145    def NOtest_get_parent():
     146        """ Get a child's parent.
     147        """
     148        cell = Cell(AABB(0, 6, 0, 6), 'cell')
     149
     150        p0 = [2,1]
     151        p1 = [4,1]
     152        p2 = [4,4]
     153        p3 = [2,4]
     154        p4 = [5,4]
     155
     156        points = [p0,p1,p2, p3, p4]
     157        vertices = [[0,1,2],[0,2,3],[1,4,2]]
     158
     159        mesh = Mesh(points, vertices)
     160
     161        Q = MeshQuadtree(mesh)
     162        results = Q.search(4.5, 3)
     163        assert len(results) == 1
     164        self.assertEqual(results[0], 2)
     165        results = Q.search(5,4.)
     166        self.assertEqual(len(results),1)
     167        self.assertEqual(results[0], 2)     
    216168################################################################################
    217169
  • anuga_core/source/anuga/fit_interpolate/test_search_functions.py

    r7710 r7711  
    66from search_functions import _search_triangles_of_vertices
    77from search_functions import _trilist_from_indices
    8 from search_functions import compute_interpolation_values
     8from search_functions import compute_interpolation_values, MeshQuadtree
    99
    1010from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    1111from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular
    12 from anuga.utilities.polygon import is_inside_polygon
    13 from anuga.utilities.quad import build_quadtree, Cell
     12from anuga.geometry.quad import Cell
     13from anuga.geometry.aabb import AABB
    1414from anuga.utilities.numerical_tools import ensure_numeric
    15 from anuga.utilities.polygon import is_inside_polygon, is_inside_triangle   
     15from anuga.geometry.polygon import is_inside_polygon, is_inside_triangle   
    1616
    1717import numpy as num
     
    5050        mesh.check_integrity()
    5151
    52         root = build_quadtree(mesh)
     52        root = MeshQuadtree(mesh)
    5353        set_last_triangle()
    5454
     
    7070        mesh.check_integrity()
    7171
    72         root = build_quadtree(mesh)
     72        root = MeshQuadtree(mesh)
    7373        set_last_triangle()
    7474
     
    9090        mesh.check_integrity()
    9191
    92         root = build_quadtree(mesh)
     92        root = MeshQuadtree(mesh)
    9393        set_last_triangle()
    9494
     
    122122       
    123123
    124         root = build_quadtree(mesh)
     124        root = MeshQuadtree(mesh)
    125125        set_last_triangle()
    126126        #print m, root.show()
     
    150150        mesh = Mesh(points, vertices, boundary)
    151151
    152         root = build_quadtree(mesh)
     152        root = MeshQuadtree(mesh)
    153153        set_last_triangle()
    154154
  • anuga_core/source/anuga/geometry/polygon.py

    r7709 r7711  
    12011201    """
    12021202
    1203     from anuga.utilities.polygon import polygon_area
    1204 
    12051203    # TO DO check if any of the regions fall inside one another
    12061204
  • anuga_core/source/anuga/geometry/quad.py

    r7710 r7711  
    66"""
    77
    8 from treenode import TreeNode
     8from anuga.utilities.treenode import TreeNode
    99import string, types, sys
    1010import anuga.utilities.log as log
    11 from anuga.utilities.aabb import AABB
     11from aabb import AABB
    1212
    1313           
     
    155155        return intersecting_regions
    156156       
    157 #from anuga.pmesh.mesh import Mesh
    158    
    159 def build_quadtree(mesh):
    160     """Build quad tree for mesh.
    161 
    162     All vertex indices in mesh are stored in a quadtree and a reference
    163     to the root is returned.
    164     """
    165     extents = AABB(*mesh.get_extent(absolute=True))   
    166     extents.grow(1.001) # To avoid round off error
    167     root = Cell(extents)
    168    
    169     N = len(mesh)
    170 
    171     # Get x,y coordinates for all vertices for all triangles
    172     V = mesh.get_vertex_coordinates(absolute=True)
    173    
    174     # Check each triangle
    175     for i in range(N):
    176         x0, y0 = V[3*i, :]
    177         x1, y1 = V[3*i+1, :]
    178         x2, y2 = V[3*i+2, :]
    179 
    180         # insert a tuple with an AABB, and the triangle index as data
    181         root._insert((AABB(min([x0, x1, x2]), max([x0, x1, x2]), \
    182                          min([y0, y1, y2]), max([y0, y1, y2])), \
    183                          i))
    184 
    185     return root
  • anuga_core/source/anuga/geospatial_data/geospatial_data.py

    r7317 r7711  
    322322        """
    323323
    324         from anuga.utilities.polygon import inside_polygon
     324        from anuga.geometry.polygon import inside_polygon
    325325
    326326        if isinstance(polygon, Geospatial_data):
     
    354354        """
    355355
    356         from anuga.utilities.polygon import outside_polygon
     356        from anuga.geometry.polygon import outside_polygon
    357357
    358358        if isinstance(polygon, Geospatial_data):
     
    15601560    from anuga.pmesh.mesh_interface import create_mesh_from_regions
    15611561    from anuga.utilities.numerical_tools import cov
    1562     from anuga.utilities.polygon import is_inside_polygon
     1562    from anuga.geometry.polygon import is_inside_polygon
    15631563    from anuga.fit_interpolate.benchmark_least_squares import mem_usage
    15641564
     
    17701770    from anuga.pmesh.mesh_interface import create_mesh_from_regions
    17711771    from anuga.utilities.numerical_tools import cov
    1772     from anuga.utilities.polygon import is_inside_polygon
     1772    from anuga.geometry.polygon import is_inside_polygon
    17731773    from anuga.fit_interpolate.benchmark_least_squares import mem_usage
    17741774
  • anuga_core/source/anuga/interface.py

    r7519 r7711  
    2828from anuga.shallow_water.data_manager import csv2building_polygons
    2929
    30 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area
    31 from anuga.utilities.polygon import Polygon_function
     30from anuga.geometry.polygon import read_polygon, plot_polygons, polygon_area
     31from anuga.geometry.polygon import Polygon_function
    3232
    3333from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance
  • anuga_core/source/anuga/pmesh/mesh.py

    r7317 r7711  
    718718        # Only import this if necessary.
    719719        # Trying to get pmesh working in an uncompiled environment
    720         from anuga.utilities.polygon import point_in_polygon
     720        from anuga.geometry.polygon import point_in_polygon
    721721       
    722722        #get absolute values
  • anuga_core/source/anuga/pmesh/mesh_interface.py

    r7699 r7711  
    11
    22from anuga.coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE
    3 from anuga.utilities.polygon import  point_in_polygon ,populate_polygon
     3from anuga.geometry.polygon import  point_in_polygon ,populate_polygon
    44from anuga.utilities.numerical_tools import ensure_numeric
    55import numpy as num
    6 from anuga.utilities.polygon import inside_polygon
    7 from anuga.utilities.polygon import polylist2points_verts
     6from anuga.geometry.polygon import inside_polygon
     7from anuga.geometry.polygon import polylist2points_verts
    88import anuga.utilities.log as log
    99
  • anuga_core/source/anuga/pmesh/test_mesh.py

    r7276 r7711  
    1313from anuga.coordinate_transforms.geo_reference import Geo_reference
    1414from anuga.geospatial_data.geospatial_data import Geospatial_data
    15 from anuga.utilities.polygon import  is_inside_polygon ### inside_polygon
     15from anuga.geometry.polygon import  is_inside_polygon ### inside_polygon
    1616
    1717import numpy as num
  • anuga_core/source/anuga/pmesh/test_mesh_interface.py

    r7699 r7711  
    1010
    1111from load_mesh.loadASCII import *
    12 from anuga.utilities.polygon import is_inside_polygon
     12from anuga.geometry.polygon import is_inside_polygon
    1313from anuga.coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE
    1414
  • anuga_core/source/anuga/pmesh/view_tsh.py

    r6156 r7711  
    1010from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance
    1111from anuga.pyvolution.util import file_function
    12 from anuga.utilities.polygon import Polygon_function, read_polygon
     12from anuga.geometry.polygon import Polygon_function, read_polygon
    1313from realtime_visualisation_new import *
    1414
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r7685 r7711  
    8989from anuga.abstract_2d_finite_volumes.neighbour_mesh import segment_midpoints
    9090from anuga.load_mesh.loadASCII import export_mesh_file
    91 from anuga.utilities.polygon import intersection
     91from anuga.geometry.polygon import intersection
    9292
    9393from anuga.utilities.system_tools import get_vars_in_expression
     
    22582258    import types
    22592259
    2260     from anuga.utilities.polygon import inside_polygon, outside_polygon
     2260    from anuga.geometry.polygon import inside_polygon, outside_polygon
    22612261    from anuga.abstract_2d_finite_volumes.util import \
    22622262         apply_expression_to_dictionary
     
    26892689
    26902690    import sys
    2691     from anuga.utilities.polygon import inside_polygon, outside_polygon
     2691    from anuga.geometry.polygon import inside_polygon, outside_polygon
    26922692    from anuga.abstract_2d_finite_volumes.util import \
    26932693             apply_expression_to_dictionary
     
    75087508    # FIXME (Ole): Allow this to be specified as a keyword argument as well
    75097509
    7510     from anuga.utilities.polygon import inside_polygon
     7510    from anuga.geometry.polygon import inside_polygon
    75117511    from anuga.config import minimum_allowed_height
    75127512    from Scientific.IO.NetCDF import NetCDFFile
  • anuga_core/source/anuga/shallow_water/data_manager_joaquims_patch.py

    r7685 r7711  
    18471847    from Numeric import array2string
    18481848
    1849     from anuga.utilities.polygon import inside_polygon, outside_polygon
     1849    from anuga.geometry.polygon import inside_polygon, outside_polygon
    18501850    from anuga.abstract_2d_finite_volumes.util import \
    18511851         apply_expression_to_dictionary
     
    22312231    from Numeric import array2string
    22322232
    2233     from anuga.utilities.polygon import inside_polygon, outside_polygon
     2233    from anuga.geometry.polygon import inside_polygon, outside_polygon
    22342234    from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary
    22352235
     
    55355535    # FIXME (Ole): Allow this to be specified as a keyword argument as well
    55365536
    5537     from anuga.utilities.polygon import inside_polygon   
     5537    from anuga.geometry.polygon import inside_polygon   
    55385538    from anuga.config import minimum_allowed_height
    55395539    from Scientific.IO.NetCDF import NetCDFFile
  • anuga_core/source/anuga/shallow_water/shallow_water_domain.py

    r7573 r7711  
    107107                                              Modeltime_too_early
    108108
    109 from anuga.utilities.polygon import inside_polygon, polygon_area, \
     109from anuga.geometry.polygon import inside_polygon, polygon_area, \
    110110                                    is_inside_polygon
    111111import anuga.utilities.log as log
  • anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py

    r7562 r7711  
    99from anuga.config import netcdf_mode_r, netcdf_mode_w, netcdf_mode_a
    1010from anuga.utilities.numerical_tools import mean
    11 from anuga.utilities.polygon import is_inside_polygon
     11from anuga.geometry.polygon import is_inside_polygon
    1212from anuga.coordinate_transforms.geo_reference import Geo_reference
    1313from anuga.abstract_2d_finite_volumes.quantity import Quantity
  • anuga_core/source/anuga/shallow_water_balanced/test_swb_balance.py

    r7616 r7711  
    99from anuga.config import netcdf_mode_r, netcdf_mode_w, netcdf_mode_a
    1010from anuga.utilities.numerical_tools import mean
    11 from anuga.utilities.polygon import is_inside_polygon
     11from anuga.geometry.polygon import is_inside_polygon
    1212from anuga.coordinate_transforms.geo_reference import Geo_reference
    1313from anuga.abstract_2d_finite_volumes.quantity import Quantity
Note: See TracChangeset for help on using the changeset viewer.