Changeset 24213 for issm/trunk-jpl/src/m/mesh/roundmesh.py
- Timestamp:
- 10/11/19 00:25:20 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mesh/roundmesh.py
r24115 r24213 5 5 from triangle import triangle 6 6 7 7 8 def roundmesh(md, radius, resolution): 8 9 """ … … 10 11 11 12 This script will generate a structured round mesh 12 13 13 - radius : specifies the radius of the circle in meters 14 - resolution : specifies the resolution in meters 14 15 15 16 Usage: 16 md =roundmesh(md,radius,resolution)17 md = roundmesh(md, radius, resolution) 17 18 """ 18 19 … … 20 21 21 22 #Get number of points on the circle 22 pointsonedge = np.floor((2. * np.pi * radius) / resolution) + 1 # +1 to close the outline23 pointsonedge = np.floor((2. * np.pi * radius) / resolution) + 1 # + 1 to close the outline 23 24 24 25 #Calculate the cartesians coordinates of the points … … 30 31 A['y'] = [y_list] 31 32 A['density'] = 1. 32 print('now writing mesh')33 33 expwrite(A, 'RoundDomainOutline.exp') 34 34 35 35 #Call Bamg 36 print('now meshing')37 36 md = triangle(md, 'RoundDomainOutline.exp', resolution) 38 #md = bamg(md, 'domain','RoundDomainOutline.exp','hmin',resolution)37 #md = bamg(md, 'domain', 'RoundDomainOutline.exp', 'hmin', resolution) 39 38 40 39 #move the closest node to the center
Note:
See TracChangeset
for help on using the changeset viewer.