Changeset 6133
- Timestamp:
- Jan 9, 2009, 4:35:04 PM (16 years ago)
- Location:
- anuga_work/production/patong
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/patong/project.py
r6028 r6133 48 48 finaltime=15000 # final time for simulation 15000 49 49 50 setup=' final' # Final can be replaced with trial or basic.50 setup='trial' # Final can be replaced with trial or basic. 51 51 # Either will result in a coarser mesh that will allow a 52 52 # faster, but less accurate, simulation. … … 191 191 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 192 192 print 'min estimated number of triangles', trigs_min 193 193 194 #------------------------------------------------------------------------------ 195 # Building polygons 196 #------------------------------------------------------------------------------ 197 198 building_polygon_file = polygons_dir+'buildings.csv' 199 194 200 #------------------------------------------------------------------------------ 195 201 # Clipping regions for export to asc and regions for clipping data -
anuga_work/production/patong/run_patong.py
r6028 r6133 36 36 from anuga.shallow_water import Field_boundary 37 37 from Numeric import allclose 38 from anuga.shallow_water.data_manager import export_grid, create_sts_boundary 38 from anuga.shallow_water.data_manager import export_grid, create_sts_boundary, csv2building_polygons 39 39 from anuga.pmesh.mesh_interface import create_mesh_from_regions 40 40 from anuga.shallow_water.data_manager import start_screen_catcher, copy_code_files,store_parameters 41 from anuga_parallel.parallel_abstraction import get_processor_name42 41 from anuga.caching import myhash 43 42 from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage … … 58 57 # output to file 59 58 #------------------------------------------------------------------------------ 60 print "Processor Name:",get_processor_name()61 59 62 60 #copy script must be before screen_catcher … … 71 69 start_screen_catcher(kwargs['output_dir'], myid, numprocs) 72 70 73 print "Processor Name:",get_processor_name()74 71 75 72 #----------------------------------------------------------------------- … … 105 102 106 103 create_mesh_from_regions(bounding_polygon, 107 boundary_tags=boundary_tags,108 maximum_triangle_area=project.res_poly_all,109 interior_regions=project.interior_regions,110 filename=project.meshes_dir_name,111 use_cache=True,112 verbose=True)104 boundary_tags=boundary_tags, 105 maximum_triangle_area=project.res_poly_all, 106 interior_regions=project.interior_regions, 107 filename=project.meshes_dir_name, 108 use_cache=True, 109 verbose=True) 113 110 114 111 #------------------------------------------------------------------------- … … 145 142 verbose = True, 146 143 alpha = kwargs['alpha']) 144 145 # Add buildings from file 146 building_polygons, building_heights = csv2building_polygons(project.building_polygon_file) 147 148 L = [] 149 for key in building_polygons: 150 poly = building_polygons[key] 151 elev = building_heights[key] 152 L.append((poly, elev)) 153 154 #Q1 = domain.get_quantity('elevation') 155 #Q2 = Quantity(domain) # Temporary quantity for buildings 156 #Q2.set_values(Polygon_function(L, default=0.0)) 157 domain.add_quantity('elevation', Polygon_function(L, default=0.0)) 158 147 159 print 'Finished Set quantity' 148 160 … … 217 229 store_parameters(**kwargs) 218 230 219 print 'memory usage before del domain1',mem_usage()220 231 221 232
Note: See TracChangeset
for help on using the changeset viewer.