Changeset 4282 for anuga_work/production/dampier_2006/run_dampier.py
- Timestamp:
- Feb 27, 2007, 9:39:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/run_dampier.py
r4246 r4282 34 34 from anuga_parallel.parallel_api import distribute, numprocs, myid, barrier 35 35 from anuga_parallel.parallel_abstraction import get_processor_name 36 from anuga.caching import myhash 36 37 # Application specific imports 37 38 import project # Definition of file names and polygons … … 81 82 82 83 sys.exit() 83 ''' 84 84 85 if myid == 0: 85 86 86 87 print 'start create mesh from regions' 88 # print 'project.res_poly_all',project.res_poly_all 89 # print 'project.interior_regions_test',project.interior_regions_test 90 # print 'meshes_dir_name',meshes_dir_name 87 91 create_mesh_from_regions(project.poly_all, 88 92 boundary_tags={'back': [2,3], 'side': [0, 1, 4], 89 93 'ocean': [5]}, 90 94 maximum_triangle_area=project.res_poly_all, 91 interior_regions=project.interior_regions ,95 interior_regions=project.interior_regions_test, 92 96 filename=meshes_dir_name, 93 97 use_cache=True, … … 96 100 # to sync all processors are ready 97 101 barrier() 102 ''' 103 create_mesh_from_regions(project.poly_all, 104 boundary_tags={'back': [2,3], 'side': [0, 1, 4], 105 'ocean': [5]}, 106 maximum_triangle_area=project.res_poly_all, 107 interior_regions=project.interior_regions_test, 108 filename=meshes_dir_name, 109 use_cache=True, 110 verbose=True) 98 111 99 112 #------------------------------------------------------------------------- … … 101 114 #------------------------------------------------------------------------- 102 115 print 'Setup computational domain' 103 domain = Domain(meshes_dir_name, use_cache=True, verbose=True) 116 from caching import cache 117 domain = cache(Domain, (meshes_dir_name), {'use_cache':True, 'verbose':True}, verbose=True) 118 print 'domain id', id(domain) 119 print 'myhash', myhash(domain) 120 104 121 print domain.statistics() 122 105 123 boundaries_dir_name=project.boundaries_dir_name 106 124 … … 108 126 109 127 from anuga.shallow_water.data_manager import urs2sww 110 128 ''' 111 129 # put above distribute 112 130 print 'boundary file is: ',project.boundaries_dir_name … … 129 147 ) 130 148 barrier() 131 149 ''' 132 150 133 151 #------------------------------------------------------------------------- … … 148 166 # filename = project.combined_dir_name + '.pts', 149 167 # MUST USE TXT FILES FOR CACHING TO WORK! 150 filename = project.combined_ dir_name + '.txt',151 use_cache = False,168 filename = project.combined_smaller_dir_name + '.txt', 169 use_cache = True, 152 170 verbose = True, 153 171 alpha = 0.1) … … 166 184 # Set domain parameters 167 185 #------------------------------------------------------ 168 186 print 'domain id', id(domain) 169 187 domain.set_name(project.scenario_name) 170 188 domain.set_datadir(project.output_run_time_dir) … … 174 192 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) 175 193 domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK) 194 print 'domain id', id(domain) 195 domain.beta_h = 0 196 domain.limit2007 = 1 176 197 177 198 #------------------------------------------------------------------------- … … 180 201 print 'Available boundary tags', domain.get_boundary_tags() 181 202 print 'domain id', id(domain) 182 print 'Reading Boundary file' 183 Bf = File_boundary(boundaries_dir_name + '.sww', 203 print 'Reading Boundary file',project.boundaries_dir_name4 + '.sww' 204 #Bf = File_boundary(boundaries_dir_name + '.sww', 205 Bf = File_boundary(project.boundaries_dir_name4 + '.sww', 184 206 domain, time_thinning=4, use_cache=True, verbose=True) 185 207 … … 204 226 t0 = time.time() 205 227 206 for t in domain.evolve(yieldstep = 120, finaltime = 9000):228 for t in domain.evolve(yieldstep = 60, finaltime = 9000): 207 229 domain.write_time() 208 230 domain.write_boundary_statistics(tags = 'ocean')
Note: See TracChangeset
for help on using the changeset viewer.