Changeset 4951


Ignore:
Timestamp:
Jan 17, 2008, 4:15:17 PM (17 years ago)
Author:
steve
Message:

Ran into a problem with the inundation_damage when reading a file with two '.'

Location:
anuga_core/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/damage_modelling/inundation_damage.py

    r4855 r4951  
    9595            exposure_file_out = exposure_file_in
    9696        else:
    97             name, extension = exposure_file_in.split('.')
    98             exposure_file_out = name + exposure_file_out_marker + \
    99                                 '.' + extension
     97            # split off extension, in such a way to deal with more than one '.' in the name of file
     98            split_name = exposure_file_in.split('.')
     99            exposure_file_out =  '.'.join(split_name[:-1]) + exposure_file_out_marker + \
     100                                '.' + split_name[-1]
    100101        csv.save(exposure_file_out)
    101102        if verbose: print '\n Augmented building file written to %s \n' %exposure_file_out
  • anuga_core/source/anuga_parallel/run_sw_lost_mass.py

    r3846 r4951  
    8484
    8585
    86 domain.default_order = 1
     86domain.default_order = 2
    8787
    8888#Boundaries
     
    9999t0 = time.time()
    100100
    101 print 'No of elements %d'%(domain.number_of_elements)
     101print 'No of triangles %d'%(domain.number_of_triangles)
    102102
    103103
Note: See TracChangeset for help on using the changeset viewer.