Changeset 6006


Ignore:
Timestamp:
Nov 26, 2008, 6:15:27 PM (16 years ago)
Author:
ole
Message:

More error messages

File:
1 edited

Legend:

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

    r6002 r6006  
    16911691                         # previous timestep in order to obtain rate
    16921692
    1693         bounding_polygon = domain.get_boundary_polygon() # Returns absolute coordinates
     1693        # Get boundary (in absolute coordinates)
     1694        bounding_polygon = domain.get_boundary_polygon()
    16941695
    16951696
     
    17281729       
    17291730        if polygon is not None:
    1730             self.exchange_area = polygon_area(self.polygon)
    17311731
    17321732            # Check that polygon lies within the mesh.
    17331733            for point in self.polygon:
    1734                 msg = 'Point %s in polygon for forcing term' %(str(point))
     1734                msg = 'Point %s in polygon for forcing term' %(point)
    17351735                msg += ' did not fall within the domain boundary.'
    17361736                assert is_inside_polygon(point, bounding_polygon), msg
    1737 
     1737               
     1738            # Compute area and check that it is greater than 0   
     1739            self.exchange_area = polygon_area(self.polygon)
     1740           
     1741            msg = 'Polygon %s in forcing term' %(self.polygon)
     1742            msg += ' has area = %f' %self.exchange_area
     1743            assert self.exchange_area > 0.0           
     1744           
     1745               
     1746               
    17381747
    17391748        # Pointer to update vector
     
    17621771            # Inlet is polygon
    17631772           
    1764             inlet_region = 'polygon=%s' %(self.polygon)
     1773            inlet_region = 'polygon=%s, area=%f m^2' %(self.polygon,
     1774                                                       self.exchange_area)
    17651775                       
    17661776            self.exchange_indices = inside_polygon(points, self.polygon)
     1777           
    17671778           
    17681779           
Note: See TracChangeset for help on using the changeset viewer.