Changeset 5660


Ignore:
Timestamp:
Aug 15, 2008, 1:08:05 PM (16 years ago)
Author:
ole
Message:

Better error catching in sww2dem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r5656 r5660  
    20252025        q = q_reduced
    20262026
    2027     #Post condition: Now q has dimension: number_of_points
     2027    #Post condition: Now q has dimension: http://www.sagemath.org/number_of_points
    20282028    assert len(q.shape) == 1
    20292029    assert q.shape[0] == number_of_points
     
    20552055    else:
    20562056        ymax = northing_max - yllcorner
    2057 
    2058 
    2059 
     2057   
     2058
     2059    msg = 'xmax must be greater than or equal to xmin.\n'
     2060    msg += 'I got xmin = %f, xmax = %f' %(xmin, xmax)
     2061    assert xmax >= xmin, msg
     2062
     2063    msg = 'yax must be greater than or equal to xmin.\n'
     2064    msg += 'I got ymin = %f, ymax = %f' %(ymin, ymax)
     2065    assert ymax >= ymin, msg   
     2066   
    20602067    if verbose: print 'Creating grid'
    20612068    ncols = int((xmax-xmin)/cellsize)+1
Note: See TracChangeset for help on using the changeset viewer.