Changeset 4133


Ignore:
Timestamp:
Jan 5, 2007, 2:33:15 PM (18 years ago)
Author:
nick
Message:

updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/perth_2006/project.py

    r4091 r4133  
    77import sys
    88from time import localtime, strftime, gmtime
    9 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
     9from anuga.utilities.polygon import read_polygon, plot_polygons, is_inside_polygon, number_mesh_triangles
    1010#from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
    1111from anuga.utilities.system_tools import get_user_name
     
    118118from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
    119119
    120 bounding_polygon = read_polygon(polygons_dir+'bounding_poly.csv')
    121 res_bounding = 1000000
     120poly_all = read_polygon(polygons_dir+'bounding_poly.csv')
     121res_poly_all = 100000
    122122
    123123refzone = 50
     
    128128###############################
    129129
    130 poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20pts.csv')
    131 res_pos20_neg20 = 500000
     130#poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20pts.csv')
     131poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20_new_pts.csv')
     132res_pos20_neg20 = 20000
    132133
    133 poly_cbd = read_polygon(polygons_dir+'cbd_pts.csv')
    134 res_cbd = 50000
     134#poly_cbd = read_polygon(polygons_dir+'cbd_pts.csv')
     135poly_cbd = read_polygon(polygons_dir+'cbd_new_pts.csv')
     136res_cbd = 1000
    135137
    136138poly_penguin = read_polygon(polygons_dir+'penguin_pts.csv')
    137 res_penguin = 50000
     139res_penguin = 1000
    138140#assert zone == refzone
    139141
    140 trigs_bound = polygon_area(bounding_polygon)/res_bounding
    141 trigs_pos = polygon_area(poly_pos20_neg20)/res_pos20_neg20
    142 trigs_cbd = polygon_area(poly_cbd)/res_cbd
    143 trigs_penguin = polygon_area(poly_penguin)/res_penguin
    144 trigs_min = trigs_bound + trigs_pos + trigs_cbd + trigs_penguin
     142interior_regions = [[poly_pos20_neg20,res_pos20_neg20],[poly_cbd,res_cbd]
     143                     ,[poly_penguin,res_penguin]]
    145144
    146 print 'Area of bounding poly', trigs_bound
    147 print 'Area of pos20_neg20pts', trigs_pos
    148 print 'Area of poly_cbd', trigs_cbd
    149 print 'Area of poly_penguin', trigs_penguin
     145trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
     146
    150147print 'min number triangles', trigs_min
    151 
    152148
    153149###################################################################
Note: See TracChangeset for help on using the changeset viewer.