Changeset 4496 for anuga_core/source/anuga/load_mesh
- Timestamp:
- May 28, 2007, 10:10:21 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/load_mesh/loadASCII.py
r4165 r4496 486 486 487 487 #<vertex #> <x> <y> [attributes] 488 index = 0 488 index = 0 489 489 for vert in vertices: 490 490 attlist = "" 491 for att in vertices_attributes[index]: 492 attlist = attlist + str(att)+" " 491 492 if vertices_attributes == []: 493 attlist = "" 494 else: 495 for att in vertices_attributes[index]: 496 attlist = attlist + str(att)+" " 493 497 attlist.strip() 494 498 fd.write(str(index) + " " … … 511 515 neighbors = "" 512 516 tri = triangles[index] 513 for neighbor in triangle_neighbors[index]:514 if neighbor:515 neighbors += str(neighbor) + " "516 else:517 if neighbor == 0:518 neighbors += "0"517 if triangle_neighbors == []: 518 neighbors = "-1 -1 -1 " 519 else: 520 for neighbor in triangle_neighbors[index]: 521 if neighbor: 522 neighbors += str(neighbor) + " " 519 523 else: 520 neighbors += "-1 " 524 if neighbor == 0: 525 neighbors += "0 " 526 else: 527 neighbors += "-1 " 521 528 #Warning even though a list is past, only the first value 522 529 #is written. There's an assumption that the list only … … 525 532 # with triangle, and it seems to have the option of returning 526 533 # more than one value for triangle attributex 527 if triangles_attributes [index] == ['']:534 if triangles_attributes == [] or triangles_attributes[index] == ['']: 528 535 att = "" 529 536 else:
Note: See TracChangeset
for help on using the changeset viewer.