Changeset 2478
- Timestamp:
- Mar 3, 2006, 11:54:32 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
production/sydney_example/run_sydney.py
r2464 r2478 12 12 13 13 14 #-------------------------------------------------------------------------------# Import necessary modules 14 #------------------------------------------------------------------------------- 15 # Import necessary modules 15 16 #------------------------------------------------------------------------------- 16 17 … … 27 28 28 29 # Application specific imports 29 import project # Definition of file names and polygons30 from pyvolution.smf import slump_tsunami 30 import project # Definition of file names and polygons 31 from pyvolution.smf import slump_tsunami # Function for submarine mudslide 31 32 32 33 34 35 #------------------------------------------------------------------------------- 36 # Prepare bathymetric data 37 #------------------------------------------------------------------------------- 33 38 34 39 # filenames … … 45 50 46 51 47 # original 52 53 #------------------------------------------------------------------------------- 54 # Setup computational domain 55 #------------------------------------------------------------------------------- 56 57 # Interior regions and mesh resolutions 48 58 interior_res = 5000 49 59 interior_regions = [[project.harbour_polygon_2, interior_res], 50 60 [project.botanybay_polygon_2, interior_res]] 51 61 52 #FIXME: Fix caching of this one once the mesh_interface is ready53 from caching import cache54 62 55 _ = cache(create_mesh_from_regions, 56 project.diffpolygonall, 57 {'boundary_tags': {'bottom': [0], 58 'right1': [1], 'right0': [2], 59 'right2': [3], 'top': [4], 'left1': [5], 60 'left2': [6], 'left3': [7]}, 61 'maximum_triangle_area': 1000000000000000, #100000, 62 'filename': meshname, 63 'interior_regions': interior_regions}, 64 verbose = True) 63 create_mesh_from_regions(project.diffpolygonall, 64 boundary_tags= {'bottom': [0], 65 'right1': [1], 66 'right0': [2], 67 'right2': [3], 68 'top': [4], 69 'left1': [5], 70 'left2': [6], 71 'left3': [7]}, 72 maximum_triangle_area=100000, 73 filename=meshname, 74 interior_regions=interior_regions) 65 75 66 76 67 #-------------------------------------------------------------------------------68 # Setup computational domain69 #-------------------------------------------------------------------------------70 77 71 78 domain = pmesh_to_domain_instance(meshname, Domain, … … 97 104 98 105 99 #------------------------------------------------------------------------------- 106 #------------------------------------------------------------------------------- 100 107 # Setup initial conditions 101 108 #------------------------------------------------------------------------------- … … 109 116 110 117 111 #------------------------------------------------------------------------------- 118 #------------------------------------------------------------------------------- 112 119 # Setup boundary conditions (all reflective) 113 120 #------------------------------------------------------------------------------- … … 121 128 122 129 123 #------------------------------------------------------------------------------- 130 #------------------------------------------------------------------------------- 124 131 # Evolve system through time 125 132 #-------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.