Changeset 5569 for anuga_work/production/perth/run_perth.py
- Timestamp:
- Jul 25, 2008, 8:53:51 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth/run_perth.py
r5557 r5569 30 30 from anuga.shallow_water import Field_boundary 31 31 from Numeric import allclose 32 from anuga.shallow_water.data_manager import export_grid 32 from anuga.shallow_water.data_manager import export_grid, create_sts_boundary 33 33 34 34 from anuga.pmesh.mesh_interface import create_mesh_from_regions … … 39 39 from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage 40 40 from anuga.fit_interpolate.benchmark_least_squares import mem_usage 41 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 41 42 42 43 # Application specific imports … … 70 71 print "Processor Name:",get_processor_name() 71 72 72 # filenames 73 # meshes_dir_name = project.meshes_dir_name+'.msh' 74 75 # creates copy of code in output dir 76 print 'min triangles', project.trigs_min, 77 print 'Note: This is generally about 20% less than the final amount' 78 73 74 #----------------------------------------------------------------------- 75 # Domain definitions 76 #----------------------------------------------------------------------- 77 78 # Read in boundary from ordered sts file 79 urs_bounding_polygon=create_sts_boundary(project.scenario_name) 80 81 # Reading the landward defined points, this incorporates the original clipping 82 # polygon minus the 100m contour 83 landward_bounding_polygon = read_polygon(project.polygons_dir+'landward_bounding_polygon.txt') 84 85 # Combine sts polyline with landward points 86 bounding_polygon = urs_bounding_polygon + landward_bounding_polygon 87 88 # counting segments 89 N = len(urs_bounding_polygon)-1 90 boundary_tags={'back': [N+1,N+2,N+3], 'side': [N,N+4],'ocean': range(N)} 91 92 79 93 #-------------------------------------------------------------------------- 80 94 # Create the triangular mesh based on overall clipping polygon with a … … 90 104 print 'start create mesh from regions' 91 105 92 create_mesh_from_regions( project.poly_all,93 boundary_tags= project.boundary_tags,106 create_mesh_from_regions(bounding_polygon, 107 boundary_tags=boundary_tags, 94 108 maximum_triangle_area=project.res_poly_all, 95 109 interior_regions=project.interior_regions, … … 168 182 print 'domain id', id(domain) 169 183 170 184 boundary_urs_out=project.boundaries_dir_name 185 171 186 print 'Available boundary tags', domain.get_boundary_tags() 172 187 Bf = File_boundary(boundary_urs_out+'.sts', … … 174 189 use_cache=True, 175 190 verbose = True, 176 boundary_polygon= project.bounding_polygon)191 boundary_polygon=bounding_polygon) 177 192 178 193 Br = Reflective_boundary(domain)
Note: See TracChangeset
for help on using the changeset viewer.