Changeset 3705
- Timestamp:
- Oct 9, 2006, 11:08:10 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/okushiri_2005/lwru2.py
r3657 r3705 33 33 domain = Domain(project.mesh_filename, use_cache=True, verbose=True) 34 34 else: 35 print 'Creating regular mesh'35 print 'Creating regular from regular mesh' 36 36 N = 150 37 37 points, vertices, boundary = rectangular_cross(N, N/5*3, 38 38 len1=5.448, len2=3.402) 39 print 'Creating domain' 40 41 #domain = Domain(points, vertices, boundary) 42 domain = cache(Domain, (points, vertices, boundary)) 43 39 domain = Domain(points, vertices, boundary) 44 40 45 41 domain.set_name('lwru2') 46 42 domain.set_default_order(2) 47 43 domain.set_minimum_storable_height(0.001) 48 49 #domain.check_integrity() 50 print 'Number of triangles = ', len(domain) 51 print 'The extent is ', domain.get_extent() 44 domain.check_integrity() 52 45 print domain.statistics() 53 46 … … 59 52 domain.set_quantity('stage', 0.0) 60 53 domain.set_quantity('elevation', 61 filename =project.bathymetry_filename[:-4] + '.pts',62 alpha =0.02,63 verbose =True,64 use_cache =True)54 filename=project.bathymetry_filename[:-4] + '.pts', 55 alpha=0.02, 56 verbose=True, 57 use_cache=True) 65 58 66 59 #------------------------- … … 71 64 function = file_function(project.boundary_filename[:-4] + '.tms', 72 65 domain, 73 verbose =True)66 verbose=True) 74 67 75 68 Bts = Transmissive_Momentum_Set_Stage_boundary(domain, function) 76 69 77 #Set boundary conditions78 70 if use_variable_mesh is True: 79 71 domain.set_boundary({'wave': Bts, 'wall': Br}) … … 88 80 t0 = time.time() 89 81 82 w_max = 0 90 83 for t in domain.evolve(yieldstep = 0.05, finaltime = 22.5): 91 84 domain.write_time() 92 85 86 w = domain.get_maximum_inundation_elevation() 87 x, y = domain.get_maximum_inundation_location() 88 print ' Coastline elevation = %.2f at (x,y)=(%.2f, %.2f)' %(w, x, y) 89 print 90 91 if w > w_max: 92 w_max = w 93 x_max = x 94 y_max = y 95 96 97 print '**********************************************' 98 print 'Max coastline elevation = %.2f at (%.2f, %.2f)' %(w_max, x_max, y_max) 99 print '**********************************************' 100 101 102 93 103 print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset
for help on using the changeset viewer.