Changeset 6006
- Timestamp:
- Nov 26, 2008, 6:15:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r6002 r6006 1691 1691 # previous timestep in order to obtain rate 1692 1692 1693 bounding_polygon = domain.get_boundary_polygon() # Returns absolute coordinates 1693 # Get boundary (in absolute coordinates) 1694 bounding_polygon = domain.get_boundary_polygon() 1694 1695 1695 1696 … … 1728 1729 1729 1730 if polygon is not None: 1730 self.exchange_area = polygon_area(self.polygon)1731 1731 1732 1732 # Check that polygon lies within the mesh. 1733 1733 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) 1735 1735 msg += ' did not fall within the domain boundary.' 1736 1736 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 1738 1747 1739 1748 # Pointer to update vector … … 1762 1771 # Inlet is polygon 1763 1772 1764 inlet_region = 'polygon=%s' %(self.polygon) 1773 inlet_region = 'polygon=%s, area=%f m^2' %(self.polygon, 1774 self.exchange_area) 1765 1775 1766 1776 self.exchange_indices = inside_polygon(points, self.polygon) 1777 1767 1778 1768 1779
Note: See TracChangeset
for help on using the changeset viewer.