Changeset 6163


Ignore:
Timestamp:
Jan 14, 2009, 3:24:38 PM (16 years ago)
Author:
kristy
Message:

Better error message for boundary tag out of bounds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/pmesh/mesh_interface.py

    r6156 r6163  
    136136    # check the segment indexes - throw an error if they are out of bounds
    137137    if boundary_tags is not None:
    138         max_segs = len(bounding_polygon)
     138        max_points = len(bounding_polygon)
    139139        for key in boundary_tags.keys():
    140             if len([x for x in boundary_tags[key] if x > max_segs-1]) >= 1:
    141                 msg = 'Boundary tag %s has segment out of bounds.'\
     140            if len([x for x in boundary_tags[key] if x > max_points-1]) >= 1:
     141                msg = 'Boundary tag %s has segment out of bounds. '\
    142142                      %(str(key))
     143                msg += 'Number of points in bounding polygon = %d' % max_points
    143144                raise SegmentError, msg
    144145
Note: See TracChangeset for help on using the changeset viewer.