- Timestamp:
- Apr 23, 2010, 4:46:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
r7690 r7693 14 14 from shutil import copy 15 15 16 from anuga.utilities.numerical_tools import ensure_numeric 16 from anuga.utilities.numerical_tools import ensure_numeric, angle 17 17 18 18 from math import sqrt, atan, degrees … … 300 300 # * moving the reference direction from [1,0] to North 301 301 # * changing from counter clockwise to clocwise. 302 303 angle = degrees(atan(vh/(uh+1.e-15))) 304 305 if (0 < angle < 90.0): 306 if vh > 0: 307 bearing = 90.0 - abs(angle) 308 if vh < 0: 309 bearing = 270.0 - abs(angle) 310 311 if (-90 < angle < 0): 312 if vh < 0: 313 bearing = 90.0 - (angle) 314 if vh > 0: 315 bearing = 270.0 - (angle) 316 if angle == 0: bearing = 0.0 317 318 return bearing 302 303 return degrees(angle([uh, vh], [0, -1])) 319 304 320 305
Note: See TracChangeset
for help on using the changeset viewer.