Changeset 4311 for anuga_work/production/dampier_2006/run_dampier_simple.py
- Timestamp:
- Mar 22, 2007, 8:49:47 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/run_dampier_simple.py
r4307 r4311 36 36 from anuga.caching import myhash 37 37 # Application specific imports 38 #import project # Definition of file names and polygons38 import project # Definition of file names and polygons 39 39 40 40 #------------------------------------------------------------------------------ … … 43 43 #------------------------------------------------------------------------------ 44 44 45 #start_screen_catcher(project.output_run_time_dir, myid, numprocs)45 start_screen_catcher(project.output_run_time_dir, myid, numprocs) 46 46 print "Processor Name:",get_processor_name() 47 47 … … 52 52 #boundaries_dir_name = project.boundaries_dir_name 53 53 54 #tide = project.tide54 tide = project.tide 55 55 56 56 # creates copy of code in output dir 57 '''58 57 if myid == 0: 59 58 copy_code_files(project.output_run_time_dir,__file__, 60 59 dirname(project.__file__)+sep+ project.__name__+'.py' ) 61 60 barrier() 62 ''' 63 #print 'USER: ', project.user64 #print 'min triangles', project.trigs_min,61 62 print 'USER: ', project.user 63 print 'min triangles', project.trigs_min, 65 64 print 'Note: This is generally about 20% less than the final amount' 66 65 … … 117 116 verbose=True) 118 117 ''' 119 all = [[469000,7760000],[470000,7758000],[468000,7758000]]120 #all = [[470000,7760000],[469000,7758000],[468000,7760000]]118 #all = [[469000,7760000],[470000,7758000],[468000,7758000]] 119 all = [[470000,7760000],[469000,7758000],[468000,7760000]] 121 120 create_mesh_from_regions(all, 122 # boundary_tags={'ocean': [0,1,2]}, 123 boundary_tags={'ocean': [ 2],'side': [0, 1]}, 124 # boundary_tags={'ocean': [ 2],'ref_side': [0, 1]}, 125 maximum_triangle_area=100000, 126 filename=meshes_dir_name, 127 use_cache=True, 128 verbose=True) 129 import sys 130 sys.exit() 121 boundary_tags={'ocean': [0,1,2]}, 122 # boundary_tags={'ocean': [ 2],'side': [0, 1]}, 123 maximum_triangle_area=50000, 124 filename=meshes_dir_name, 125 use_cache=False, 126 verbose=True) 127 131 128 #------------------------------------------------------------------------- 132 129 # Setup computational domain … … 134 131 print 'Setup computational domain' 135 132 domain = Domain( meshes_dir_name, verbose=True) 136 137 133 ''' 138 134 from caching import cache … … 199 195 print 'Start Set quantity' 200 196 201 domain.set_quantity('elevation',197 #domain.set_quantity('elevation', 202 198 # filename = project.combined_dir_name + '.pts', 203 199 # MUST USE TXT FILES FOR CACHING TO WORK! 204 filename = project.combined_smallest_dir_name + '.txt', 205 use_cache = True, 206 verbose = True, 207 alpha = 0.1) 200 # filename = project.combined_smallest_dir_name + '.txt', 201 # use_cache = True, 202 # verbose = True, 203 # alpha = 0.1) 204 domain.set_quantity('elevation', -42.3) 205 208 206 print 'Finished Set quantity' 209 207 … … 252 250 Bd = Dirichlet_boundary([tide,0,0]) 253 251 254 Bo = Dirichlet_boundary([tide+4.0,0,0])255 256 252 print'set_boundary' 257 253 ##domain.set_boundary({'back': Br, … … 259 255 ## 'ocean': Bf}) 260 256 domain.set_boundary({#'back': Br, 261 'side': Br, 262 'ref_side': Br, 263 'ocean': Bd 257 'side': Bd, 258 'ocean': Bf 264 259 }) 265 260 print'finish set boundary' … … 271 266 t0 = time.time() 272 267 273 for t in domain.evolve(yieldstep = 10, finaltime = 3400):268 for t in domain.evolve(yieldstep = 60, finaltime = 3400): 274 269 domain.write_time() 275 270 domain.write_boundary_statistics(tags = 'ocean') 276 277 if allclose(t, 120):278 domain.set_boundary({'side': Br, 'ocean': Bo})279 280 if allclose(t, 1020):281 domain.set_boundary({'side': Br, 'ocean': Bd})282 271 283 272 #for t in domain.evolve(yieldstep = 120, finaltime = 9000): … … 305 294 306 295 307 308 309 310 311 312 313 314 315
Note: See TracChangeset
for help on using the changeset viewer.