source: anuga_core/source/anuga/pmesh/scripts/create_gong.py @ 3514

Last change on this file since 3514 was 3514, checked in by duncan, 18 years ago

Hi all,
I'm doing a change in the anuga structure, moving the code to

\anuga_core\source\anuga

After you have done an svn update, the PYTHONPATH has to be changed to;
PYTHONPATH = anuga_core/source/

This is part of changes required to make installation of anuga quicker and reducing the size of our sandpits.

If any imports are broken, try fixing them. With adding anuga. to them for example. If this seems to have really broken things, email/phone me.

Cheers
Duncan

File size: 2.4 KB
Line 
1
2import os, sys
3sys.path.append('..')
4
5#problem, it's loading pyvolution mesh 1st!
6from mesh import *
7from anuga.coordinate_transforms.geo_reference import Geo_reference
8
9#-------------------------------------------------------------
10if __name__ == "__main__":
11
12    # from 100m dem
13    geo = Geo_reference(xllcorner = 241191.35087962,
14                        yllcorner = 6111741.8729311,
15                        zone = 56)
16    m = Mesh(geo_reference=geo)
17    bellambi_northing = 6195000
18    north_beach_northing = 6183000
19    border = 12000
20    west = 301000 # From the map
21    inner_east = 310000 # From the map
22    inner_west_south = 303000 # From the map
23    inner_west_north = 307000  # From the map
24    east = 328421
25    center = (east+inner_east)/2
26   
27    dict = {}
28    dict['pointlist'] = [[west, north_beach_northing - border],  #sw
29                         [west, bellambi_northing + border],  #nw
30                         [center,
31                          bellambi_northing + border],  #n_center
32                         [east, bellambi_northing + border], #ne
33                         [east, north_beach_northing - border],    #se
34                         [center,
35                          north_beach_northing - border]    #s_center
36                         ]
37    dict['segmentlist'] = [[0,1],[1,2],[2,3],
38                           [3,4],[4,5],[5,0], # the outer boarder
39                           [2,5]   # the center line
40                           ]
41   
42    m.addVertsSegs(dict)
43
44    dict = {}
45    dict['pointlist'] = [
46                         [inner_west_south,north_beach_northing], #sw
47                         [inner_west_north,bellambi_northing],   #nw
48                         [inner_east,bellambi_northing], #ne
49                         [inner_east,north_beach_northing] #se
50                         ]
51    dict['segmentlist'] = [[0,1],[1,2],[2,3],[3,0]] # the inner boarder
52    m.addVertsSegs(dict)
53
54    factor = 10000 #low res 10000, high res 1000
55    low = m.addRegionEN(east-0.5, bellambi_northing + border-0.5)
56    low.setMaxArea(100*factor)
57   
58    medium = m.addRegionEN(center-0.5, bellambi_northing + border-0.5)
59    medium.setMaxArea(10*factor)
60   
61    high = m.addRegionEN(inner_east-0.5,bellambi_northing-0.5)
62    high.setMaxArea(1*factor)
63    m.generateMesh()
64   
65    m.export_triangulation_file("wollongong_outline.msh")
66   
Note: See TracBrowser for help on using the repository browser.