- Timestamp:
- Mar 4, 2009, 8:26:22 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/shallow_water/shallow_water_domain.py
r6410 r6441 1613 1613 1614 1614 # Is this really what we want? 1615 msg = 'Function %s must return vector' % str(f) 1615 # info is "(func name, filename, defining line)" 1616 func_info = (f.func_name, f.func_code.co_filename, 1617 f.func_code.co_firstlineno) 1618 msg = ('Function %s() must return vector (defined in %s, line %d)' 1619 % func_info) 1616 1620 assert hasattr(q, 'len'), msg 1617 1621 1618 msg = ('Return vector from function %s must have same '1619 'length as input vectors ' % f)1622 msg = ('Return vector from function %s() must have same ' 1623 'length as input vectors\nq=%s' % (f.func_name, str(q))) 1620 1624 assert len(q) == N, msg 1621 1625 else: … … 1623 1627 f = float(f) 1624 1628 except: 1625 msg = ('Force field %s must be either a vector function or a'1626 'scalar value (coercible to float).'% str(f))1629 msg = ('Force field %s must be a scalar value coercible to float.' 1630 % str(f)) 1627 1631 raise Exception, msg 1628 1632 … … 1926 1930 if self.polygon is not None: 1927 1931 # Inlet is polygon 1928 inlet_region = 'polygon=%s, area=%f m^2' % (self.polygon,1929 self.exchange_area)1932 inlet_region = ('polygon=\n%s, area=%f m^2' % 1933 (self.polygon, self.exchange_area)) 1930 1934 1931 1935 self.exchange_indices = inside_polygon(points, self.polygon)
Note: See TracChangeset
for help on using the changeset viewer.