Changeset 6097


Ignore:
Timestamp:
Dec 22, 2008, 5:22:25 PM (15 years ago)
Author:
ole
Message:

Work on River2D integration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/river2d_integration/River2Dcdg_ANUGAMesh.py

    r6085 r6097  
    7777        x=float(fields[x_index])
    7878        y=float(fields[x_index + 1])
    79         #z=float(fields[x_index + 2]) # TODO: Get elevation data a separate list
     79        z=float(fields[x_index + 2]) # Elevation
     80        n=float(fields[x_index + 3]) # Mannings roughness
    8081        outfid1.write('%.3f, %.3f\n' % (x, y))
    8182
    82     elif reading_vertices is True:    # Read Vertices
     83    elif reading_vertices is True:    # Read Elements
    8384        fields = line.split()
    8485
    8586        # Create indices and make them start from 0
    86         pt1=int(fields[3]) - 1
    87         pt2=int(fields[4]) - 1
    88         pt3=int(fields[5]) - 1
     87        pt1 = int(fields[3]) - 1
     88        pt2 = int(fields[4]) - 1
     89        pt3 = int(fields[5]) - 1
    8990        outfid2.write('%d, %d, %d\n' % (pt1, pt2,pt3))
    9091
     
    9293outfid1.close()
    9394outfid2.close()
    94 print "\nConversion complete.\n"
    95 print 'ALL DONE'
    96 raw_input("Press ENTER to exit.\n")
     95print '\nConversion complete.'
     96raw_input('Press ENTER to exit.')
Note: See TracChangeset for help on using the changeset viewer.