Changeset 1762 for inundation/pyvolution/mesh_factory.py
- Timestamp:
- Aug 25, 2005, 2:46:38 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/mesh_factory.py
r1761 r1762 116 116 i4 = index(i+1,j) 117 117 118 x = (points[v1][0]+points[v2][0]+points[v3][0]+points[v4][0])*0.25119 y = (points[v1][1]+points[v2][1]+points[v3][1]+points[v4][1])*0.25120 v5 = len(points)121 points.append([x, y])122 123 #Create left triangle124 if i == 0:125 boundary[(len(elements), 1)] = 'left'126 elements.append([v2,v5,v1])127 128 #Create bottom triangle129 if j == 0:130 boundary[(len(elements), 1)] = 'bottom'131 elements.append([v4,v5,v2])132 133 #Create right triangle134 if i == m-1:135 boundary[(len(elements), 1)] = 'right'136 elements.append([v3,v5,v4])137 138 #Create top triangle139 if j == n-1:140 boundary[(len(elements), 1)] = 'top'141 elements.append([v1,v5,v3])142 118 143 119 #Update boundary dictionary and create elements
Note: See TracChangeset
for help on using the changeset viewer.