Changeset 1734
- Timestamp:
- Aug 19, 2005, 5:45:54 PM (20 years ago)
- Location:
- inundation
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/validation/LWRU2/create_mesh.py
r1709 r1734 14 14 15 15 #Basic geometry 16 16 17 17 xleft = 0 18 18 xright = 5.448 … … 20 20 ytop = 3.402 21 21 22 #Outline 22 #Outline 23 23 point_sw = [xleft, ybottom] 24 24 point_se = [xright, ybottom] 25 point_nw = [xleft, ytop] 25 point_nw = [xleft, ytop] 26 26 point_ne = [xright, ytop] 27 27 … … 29 29 point_ml1 = [xleft + (xright-xleft)/3+1, ytop] 30 30 point_ml2 = [xleft + (xright-xleft)/3+1, ybottom] 31 31 32 32 #Midway points (right) 33 33 point_mr1 = [xleft + 2*(xright-xleft)/3+0.5, ytop] … … 37 37 geo = Geo_reference(xllcorner = xleft, 38 38 yllcorner = ybottom) 39 40 39 40 41 41 print "***********************" 42 42 print "geo ref", geo 43 43 print "***********************" 44 44 45 45 m = Mesh(geo_reference=geo) 46 46 … … 50 50 point_ne, 51 51 point_mr1, 52 point_ml1, 52 point_ml1, 53 53 point_nw, 54 54 point_sw, 55 point_ml2, 55 point_ml2, 56 56 point_mr2] 57 57 58 58 59 59 dict['segments'] = [[0,1], [1,2], [2,3], [3,4], 60 60 [4,5], [5,6], [6,7], [7,0], #The outer border 61 61 [2,7], [3,6]] #Separators 62 62 63 63 dict['segment_tags'] = ['wall', 64 64 'wall', … … 68 68 'wall', 69 69 'wall', 70 'wall', 71 '', #Interior 70 'wall', 71 '', #Interior 72 72 ''] #Interior 73 73 74 74 75 75 m.addVertsSegs(dict) 76 76 … … 87 87 p2 = [xr, yt] 88 88 p3 = [xl, yt] 89 89 90 90 dict['points'] = [p0, p1, p2, p3] 91 91 92 92 93 93 dict['segments'] = [[0,1], [1,2], [2,3], [3,0]] 94 94 dict['segment_tags'] = ['', '', '', ''] 95 m.addVertsSegs(dict) 95 m.addVertsSegs(dict) 96 96 97 98 base_resolution = 100 97 98 base_resolution = 100 99 99 100 100 ocean = m.addRegionEN(xleft+1, ybottom+1) … … 103 103 mid = m.addRegionEN(point_ml2[0]+1, ybottom+1) 104 104 mid.setMaxArea(0.001*base_resolution) 105 105 106 106 107 107 inner = m.addRegionEN(point_mr2[0]+1, ybottom+1) … … 110 110 111 111 gulleys = m.addRegionEN(p0[0]+0.1, p0[1]+0.1) 112 gulleys.setMaxArea(0.00001*base_resolution) 113 114 112 gulleys.setMaxArea(0.00001*base_resolution) 113 114 115 115 m.generateMesh('pzq28.0za1000000a') 116 116 117 117 import filenames 118 118 m.export_mesh_file(filenames.mesh_filename) 119 -
inundation/validation/LWRU2/lwru2.py
r1708 r1734 71 71 File_boundary, Transmissive_Momentum_Set_Stage_boundary 72 72 from pyvolution.mesh_factory import rectangular 73 from pyvolution.pmesh2domain import pmesh_to_domain_instance 73 from pyvolution.pmesh2domain import pmesh_to_domain_instance 74 74 from Numeric import array, zeros, Float, allclose 75 75 import filenames … … 81 81 82 82 try: 83 raise Exception83 #raise Exception 84 84 fid = open(picklefile) 85 85 print 'Read pickled domain' -
inundation/zeus/anuga-workspace.zwi
r1629 r1734 7 7 <project name="pyvolution">pyvolution.zpi</project> 8 8 <project name="steve">steve.zpi</project> 9 <project name="Validation">Validation.zpi</project> 9 10 </workspace>
Note: See TracChangeset
for help on using the changeset viewer.