Changeset 8136
- Timestamp:
- Mar 10, 2011, 3:48:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/geometry/polygon.py
r8073 r8136 1014 1014 # TO DO check if any of the regions fall inside one another 1015 1015 1016 log. critical('-' * 80)1017 log. critical('Polygon Max triangle area (m^2) Total area (km^2)'1018 1019 log. critical('-' * 80)1016 log.info('-' * 80) 1017 log.info('Polygon Max triangle area (m^2) Total area (km^2) ' 1018 'Estimated #triangles') 1019 log.info('-' * 80) 1020 1020 1021 1021 no_triangles = 0.0 … … 1028 1028 area -= this_area 1029 1029 1030 log.critical('Interior %s%s%d' 1031 % (('%.0f' % resolution).ljust(25), 1032 ('%.2f' % (this_area/1000000)).ljust(19), 1033 this_triangles)) 1034 #print 'Interior ', 1035 #print ('%.0f' % resolution).ljust(25), 1036 #print ('%.2f' % (this_area/1000000)).ljust(19), 1037 #print '%d' % (this_triangles) 1030 log.info('Interior %s%s%d' 1031 % (('%.0f' % resolution).ljust(25), 1032 ('%.2f' % (this_area/1000000)).ljust(19), 1033 this_triangles)) 1038 1034 1039 1035 bound_triangles = area/remainder_res 1040 1036 no_triangles += bound_triangles 1041 1037 1042 log.critical('Bounding %s%s%d' 1043 % (('%.0f' % remainder_res).ljust(25), 1044 ('%.2f' % (area/1000000)).ljust(19), 1045 bound_triangles)) 1046 #print 'Bounding ', 1047 #print ('%.0f' % remainder_res).ljust(25), 1048 #print ('%.2f' % (area/1000000)).ljust(19), 1049 #print '%d' % (bound_triangles) 1038 log.info('Bounding %s%s%d' 1039 % (('%.0f' % remainder_res).ljust(25), 1040 ('%.2f' % (area/1000000)).ljust(19), 1041 bound_triangles)) 1050 1042 1051 1043 total_number_of_triangles = no_triangles/0.7 1052 1044 1053 log. critical('Estimated total number of triangles: %d'1045 log.info('Estimated total number of triangles: %d' 1054 1046 % total_number_of_triangles) 1055 log.critical('Note: This is generally about 20%% ' 1056 'less than the final amount') 1047 log.info('Note: This is generally about 20% less than the final amount') 1057 1048 1058 1049 return int(total_number_of_triangles)
Note: See TracChangeset
for help on using the changeset viewer.