Changeset 8033


Ignore:
Timestamp:
Oct 10, 2010, 5:15:16 PM (14 years ago)
Author:
habili
Message:

Uses polygon_overlap method to find triangles that overlap the inlet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/structures/inlet.py

    r8003 r8033  
    1 from anuga.geometry.polygon import inside_polygon, is_inside_polygon
     1from anuga.geometry.polygon import inside_polygon, is_inside_polygon, polygon_overlap
    22from anuga.config import velocity_protection, g
    33import math
     
    2727        bounding_polygon = self.domain_bounding_polygon
    2828        domain_centroids = self.domain.get_centroid_coordinates(absolute=True)
    29 
     29        vertex_coordinates = self.domain.get_vertex_coordinates()
    3030
    3131        # Check that polygon lies within the mesh.
     
    4040        assert is_inside_polygon(point, bounding_polygon), msg
    4141
    42 
    43         self.triangle_indices = inside_polygon(domain_centroids, self.polygon, verbose=self.verbose)
     42        self.triangle_indices = polygon_overlap(vertex_coordinates, self.polygon)
     43        #self.triangle_indices_cen = inside_polygon(domain_centroids, self.polygon, verbose=self.verbose)
    4444
    4545        if len(self.triangle_indices) == 0:
     
    4949
    5050        self.enquiry_index = self.domain.get_triangle_containing_point(self.enquiry_pt)
    51 
    5251
    5352
Note: See TracChangeset for help on using the changeset viewer.