Changeset 719
- Timestamp:
- Dec 23, 2004, 10:26:09 AM (20 years ago)
- Location:
- inundation/ga/storm_surge/pmesh
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py
r698 r719 372 372 else: 373 373 neighbors += "-1 " 374 if triangles_attributes[index] == ['']: 374 #Warning even though a list is past, only the first value 375 #is written. There's an assumption that the list only 376 # contains one item. This assumption is made since the 377 #dict that's being passed around is also be used to communicate 378 # with triangle, and it seems to have the option of returning 379 # more than one value for triangle attributex 380 if triangles_attributes[index][0] == ['']: 375 381 att = "" 376 382 else: 377 att = str(triangles_attributes[index] )383 att = str(triangles_attributes[index][0]) 378 384 fd.write(str(index) + " " 379 385 + str(tri[0]) + " " -
inundation/ga/storm_surge/pmesh/load_mesh/loadASCIIHarness.py
r578 r719 152 152 meshDict['generatedsegmentlist'] = [(0, 1), (1, 4), (2, 0), 153 153 (0, 3), (4, 2)] 154 meshDict['generatedtriangleattributelist'] = [ '1.3', '1.3',155 '1.3', '1.3']154 meshDict['generatedtriangleattributelist'] = [['1.3'], ['1.3'], 155 ['1.3'], ['1.3']] 156 156 meshDict['generatedpointattributelist'] = [[1.2,2.], [1.2,2.], [1.2,2.], [1.2,2.], [1.2,3.]] 157 157 meshDict['generatedtriangleneighborlist'] = [[-1, 2, 3], [3, 2, -1], -
inundation/ga/storm_surge/pmesh/mesh.py
r714 r719 461 461 if not re.match('A',self.mode): 462 462 self.mode += 'A' # A - output region attribute list for triangles 463 if not re.match('V',self.mode) :463 if not re.match('V',self.mode) and not re.match('Q',self.mode): 464 464 self.mode += 'V' # V - output info about what Triangle is doing 465 465 … … 819 819 for tri in self.meshTriangles: 820 820 trianglelist.append((tri.vertices[0].index,tri.vertices[1].index,tri.vertices[2].index)) 821 triangleattributelist.append( tri.attribute)821 triangleattributelist.append([tri.attribute]) 822 822 neighborlist = [-1,-1,-1] 823 823 for neighbor,index in map(None,tri.neighbors, … … 831 831 meshDict['generatedtriangleneighborlist'] = triangleneighborlist 832 832 833 #print "* (*("833 #print "*)*)" 834 834 #print meshDict 835 #print "* (*("835 #print "*)*)" 836 836 837 837 return meshDict … … 1701 1701 newmesh = None 1702 1702 if ofile[-4:]== ".xya": 1703 print "loading " + ofile1703 #print "loading " + ofile 1704 1704 try: 1705 1705 dict = load_mesh.loadASCII.load_xya_file(ofile, delimiter = ',') -
inundation/ga/storm_surge/pmesh/meshHarness.py
r714 r719 1012 1012 if __name__ == "__main__": 1013 1013 suite = unittest.makeSuite(meshTestCase,'test') 1014 #suite = unittest.makeSuite(meshTestCase,'test autoSegment')1014 #suite = unittest.makeSuite(meshTestCase,'test_import_mesh') 1015 1015 runner = unittest.TextTestRunner() #verbosity=2) 1016 1016 runner.run(suite)
Note: See TracChangeset
for help on using the changeset viewer.