Changeset 6133 for anuga_work/production/patong/run_patong.py
- Timestamp:
- Jan 9, 2009, 4:35:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.