Ignore:
Timestamp:
Apr 12, 2006, 2:28:05 PM (19 years ago)
Author:
ole
Message:

Added algorithm for boundary_polygon in the presence of
multiple vertex coordinates. Also tested that new fit_interpolate
can use this new version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/utilities/test_numerical_tools.py

    r2704 r2709  
    4747       
    4848        assert allclose(angle([1.0, -1.0], [1.0, 1.0])/pi*180, 270.0)   
    49         assert allclose(angle([1.0, 0.0], [0.0, 1.0])/pi*180, 270.0)   
     49        assert allclose(angle([1.0, 0.0], [0.0, 1.0])/pi*180, 270.0)
     50
     51        #From test_get_boundary_polygon_V
     52        v_prev = [-0.5, -0.5]
     53        vc = [ 0.0,  -0.5]
     54        assert allclose(angle(vc, v_prev)/pi*180, 45.0)
     55
     56        vc = [ 0.5,  0.0]
     57        assert allclose(angle(vc, v_prev)/pi*180, 135.0)
     58
     59        vc = [ -0.5,  0.5]
     60        assert allclose(angle(vc, v_prev)/pi*180, 270.0)               
     61
     62
    5063               
    5164       
Note: See TracChangeset for help on using the changeset viewer.