Ignore:
Timestamp:
Jul 15, 2008, 5:00:20 PM (17 years ago)
Author:
duncan
Message:

Current Hinwood scenario - added plotting of froude number, stage slope and time vs location for each wave

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/Hinwood_2008/test_slope.py

    r5494 r5503  
    3838        actual = array([0,0.01,0.02,0.03])
    3939        self.assert_ (allclose(dtimes, actual, 0.001))
    40         actual = array([0.5, 0.501, 0.502])
     40        actual = array([0.5, 0.5005, 0.5015])
    4141        self.assert_ (allclose(depths, actual, 0.001))
    4242
     
    111111        self.assert_ (allclose(ensure_numeric(bands), actual, 0.001))
    112112       
    113     def test_get_time_band(self):
     113    def not_used_test_get_time_band(self):
    114114        time = array([0,1,2,3,4,5])
    115115        slopes = array([[10,12],
     
    158158                        [10,20,30,40]])
    159159        self.assert_ (allclose(band_quantity, actual, 0.001))     
     160
     161    def test_find_froude(self):
     162        times_froude = array([0,1])
     163        locations_froude = array([0,1,2,3,4,5])
     164        froudes = array([[0,1,2,3,4,5],
     165                        [0,10,20,30,40,50]])
     166        times = array([0,0,1,1])
     167        locations = array([0.5, 1.5, 2.5, 3.5])
     168        froudes = find_froude(times_froude, locations_froude,
     169                             froudes, times, locations)
     170        actual = array([0.5, 1.5, 25, 35])
     171        self.assert_ (allclose(ensure_numeric(froudes), actual, 0.001))
     172       
     173       
    160174       
    161175if __name__ == "__main__":
    162176
    163177    suite = unittest.makeSuite(slopeTestCase,'test')
    164     suite = unittest.makeSuite(slopeTestCase,'test_get_band')
     178    #suite = unittest.makeSuite(slopeTestCase,'test_find_froude')
    165179
    166180    runner = unittest.TextTestRunner()  #verbosity=2)
Note: See TracChangeset for help on using the changeset viewer.