Ignore:
Timestamp:
Sep 7, 2009, 4:19:23 PM (16 years ago)
Author:
steve
Message:

Changed the order of update_timestep and compute_forcing_terms.
Can now update the parameter domain.flux_timestep within
the computation of the forcing terms, so as to control stability of
the evolver.

Hopefully this will help in reducing the oscillations seen within the
culvert computation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/culvert_flows/test_culvert_class.py

    r7317 r7492  
    238238           
    239239            msg = 'Total volume has changed'
    240             assert num.allclose(new_volume, ref_volume), msg
     240            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
    241241            pass
    242242   
     
    338338        for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
    339339            new_volume = domain.get_quantity('stage').get_integral()
    340            
    341             msg = ('Total volume has changed: Is %.2f m^3 should have been %.2f m^3'
     340
     341
     342            msg = ('Total volume has changed: Is %.8f m^3 should have been %.8f m^3'
    342343                   % (new_volume, ref_volume))
    343             assert num.allclose(new_volume, ref_volume), msg       
    344        
    345        
    346        
     344            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg       
     345       
     346       
     347        return
    347348        # Now try this for a range of other depths
    348349        for depth in [1.0, 0.5, 0.2, 0.1, 0.05]:
     
    360361                    % (new_volume, ref_volume)
    361362
    362                 assert num.allclose(new_volume, ref_volume), msg
     363                assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
    363364   
    364365   
     
    467468
    468469            msg = 'Total volume has changed'
    469             assert num.allclose(new_volume, ref_volume), msg
     470            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
    470471            pass
    471472   
Note: See TracChangeset for help on using the changeset viewer.