Changeset 5931 for anuga_work/debug/will_power_example
- Timestamp:
- Nov 10, 2008, 4:44:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/debug/will_power_example/make_mesh.py
r5764 r5931 1 """ This Script shows how a bad mesh can be generated causing 2 excessive values for stage and momentum. 1 """ This Script shows how exta points and segments can be added to a msh file. 3 2 3 # WARNING # 4 * this doesn't have tests assosiated with it. For example that the 5 resolutions stay as described in create_mesh_from_regions is not tested 6 * Also, this code causes the mesh to be generated twice, so it is not 7 an efficient way of doing this. 8 9 If this is used a lot you may want to wrap the functionality into a function. 4 10 """ 5 11 … … 36 42 file.write("x,y\n\ 37 43 304200.0, 6185300.0\n\ 38 304 250.0, 6185350.0\n\39 304 300.0, 6185400.0\n")44 304300.0, 6185400.0\n\ 45 304400.0, 6185500.0\n") 40 46 file.close() 41 47 … … 67 73 m = importMeshFromFile(meshname) 68 74 69 m.add_vertices([(W +500,S +500),(W +1000,S +1000) ])75 #m.add_vertices([(W +500,S +500),(W +1000,S +1000) ]) 70 76 71 77 # load points from a points file 72 m.add_vertices(Geospatial_data(ptfile))78 #m.add_vertices(Geospatial_data(ptfile)) 73 79 74 80 p1 = (W +500,N - 500) 75 81 p2 = (W +1000,N - 1000) 76 82 p3 = (W +1000,N - 1500) 77 m.add_points_and_segments([p1,p2,p3], [[0,1],[1,2]])83 #m.add_points_and_segments([p1,p2,p3], [[0,1],[1,2]]) 78 84 79 85 # add points and segments, where the segments are automatically added. … … 83 89 p2 = (E -1000,N - 1500) 84 90 #m.add_points_and_segments([p1,p2]) 91 92 # load points from a points file 93 m.add_points_and_segments(Geospatial_data(ptfile)) 85 94 86 95 m.generate_mesh()
Note: See TracChangeset
for help on using the changeset viewer.