Changeset 6150 for anuga_core/source/anuga/culvert_flows/culvert_class.py
- Timestamp:
- Jan 13, 2009, 1:42:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/culvert_flows/culvert_class.py
r6143 r6150 1 import sys 2 1 3 from anuga.shallow_water.shallow_water_domain import Inflow, General_forcing 2 4 from anuga.culvert_flows.culvert_polygons import create_culvert_polygons … … 10 12 11 13 from anuga.config import g, epsilon 12 from Numeric import take, sqrt13 14 from anuga.config import minimum_allowed_height, velocity_protection 14 15 15 16 17 18 from Numeric import allclose 19 from Numeric import sqrt, sum 20 21 22 23 import sys 16 import Numeric as num 17 24 18 25 19 class Below_interval(Exception): pass … … 284 278 self.length = P['length']; assert self.length > 0.0 285 279 if culvert_description_filename is not None: 286 if not allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2):280 if not num.allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2): 287 281 msg = 'WARNING: barrel length specified in "%s" (%.2f m)'\ 288 282 % (culvert_description_filename, … … 770 764 self.vector = P['vector'] 771 765 self.length = P['length']; assert self.length > 0.0 772 if not allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2):766 if not num.allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2): 773 767 msg = 'WARNING: barrel length specified in "%s" (%.2f m)' %(culvert_description_filename, length) 774 768 msg += ' does not match distance between specified' … … 1002 996 verbose=False): 1003 997 1004 from Numeric import sqrt, sum1005 1006 998 # Input check 1007 999 if diameter is not None:
Note: See TracChangeset
for help on using the changeset viewer.