Changeset 824
- Timestamp:
- Feb 1, 2005, 2:12:49 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pmesh/mesh.py
r822 r824 790 790 pointlist=[] 791 791 pointattributelist=[] 792 793 792 index = 0 794 793 for vertex in self.userVertices: … … 843 842 pointattributelist=[] 844 843 845 index = 0 844 845 self.maxVertexIndex=0 846 846 for vertex in self.meshVertices: 847 vertex.index = index847 vertex.index = self.maxVertexIndex 848 848 pointlist.append((vertex.x,vertex.y)) 849 849 pointattributelist.append((vertex.attributes)) 850 index += 1850 self.maxVertexIndex += 1 851 851 852 852 meshDict['generatedpointlist'] = pointlist … … 925 925 #print genDict 926 926 #print "@#@#@#" 927 928 index = 0927 928 self.maxVertexIndex = 0 929 929 for point in genDict['generatedpointlist']: 930 930 v=Vertex(point[0], point[1]) 931 v.index = index932 index +=1931 v.index = self.maxVertexIndex 932 self.maxVertexIndex +=1 933 933 self.meshVertices.append(v) 934 934 … … 2182 2182 """ 2183 2183 2184 new_triangle1 = Triangle(new_point,triangle.vertices[0],triangle.vertices[1],attribute = None, neighbors = None)2185 new_triangle2 = Triangle(new_point,triangle.vertices[2],triangle.vertices[0],attribute = None, neighbors = None)2184 new_triangle1 = Triangle(new_point,triangle.vertices[0],triangle.vertices[1],attribute = triangle.attribute, neighbors = None) 2185 new_triangle2 = Triangle(new_point,triangle.vertices[2],triangle.vertices[0],attribute = triangle.attribute, neighbors = None) 2186 2186 2187 2187 new_triangle1.setNeighbors(triangle.neighbors[2],None,new_triangle2) … … 2260 2260 new_coordinate = [((a[0]-b[0])/2+b[0]),((a[1]-b[1])/2+b[1])] 2261 2261 newVertex = Vertex(new_coordinate[0],new_coordinate[1], attributes = attributes) 2262 mesh.maxVertexIndex+=1 2263 newVertex.index = mesh.maxVertexIndex 2264 mesh.meshVertices.append(newVertex) 2262 2265 return newVertex 2263 2266
Note: See TracChangeset
for help on using the changeset viewer.