Ignore:
Timestamp:
Sep 7, 2009, 4:19:23 PM (15 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/shallow_water/test_shallow_water_domain.py

    r7452 r7492  
    40974097
    40984098        # Data from earlier version of abstract_2d_finite_volumes
    4099         assert num.allclose(domain.min_timestep, 0.0396825396825)
    4100         assert num.allclose(domain.max_timestep, 0.0396825396825)
     4099        assert num.allclose(domain.recorded_min_timestep, 0.0396825396825)
     4100        assert num.allclose(domain.recorded_max_timestep, 0.0396825396825)
    41014101
    41024102        msg = ("domain.quantities['stage'].centroid_values[:12]=%s"
     
    41634163
    41644164        # Data from earlier version of abstract_2d_finite_volumes
    4165         #assert allclose(domain.min_timestep, 0.0396825396825)
    4166         #assert allclose(domain.max_timestep, 0.0396825396825)
     4165        #assert allclose(domain.recorded_min_timestep, 0.0396825396825)
     4166        #assert allclose(domain.recorded_max_timestep, 0.0396825396825)
    41674167        #print domain.quantities['stage'].centroid_values
    41684168
     
    41944194
    41954195        # FIXME: These numbers were from version before 25/10
    4196         #assert allclose(domain.min_timestep, 0.0140413643926)
    4197         #assert allclose(domain.max_timestep, 0.0140947355753)
     4196        #assert allclose(domain.recorded_min_timestep, 0.0140413643926)
     4197        #assert allclose(domain.recorded_max_timestep, 0.0140947355753)
    41984198
    41994199        for i in range(3):
     
    42414241            pass
    42424242
    4243         msg = 'min step was %f instead of %f' % (domain.min_timestep,
     4243        msg = 'min step was %f instead of %f' % (domain.recorded_min_timestep,
    42444244                                                 0.0210448446782)
    42454245
    4246         assert num.allclose(domain.min_timestep, 0.0210448446782), msg
    4247         assert num.allclose(domain.max_timestep, 0.0210448446782)
     4246        assert num.allclose(domain.recorded_min_timestep, 0.0210448446782), msg
     4247        assert num.allclose(domain.recorded_max_timestep, 0.0210448446782)
    42484248
    42494249        #FIXME: These numbers were from version before 25/10
     
    42954295            pass
    42964296
    4297         assert num.allclose(domain.min_timestep, 0.0210448446782)
    4298         assert num.allclose(domain.max_timestep, 0.0210448446782)
     4297        assert num.allclose(domain.recorded_min_timestep, 0.0210448446782)
     4298        assert num.allclose(domain.recorded_max_timestep, 0.0210448446782)
    42994299
    43004300        #FIXME: These numbers were from version before 21/3/6 -
     
    43904390                for t in domain.evolve(yieldstep=0.01, finaltime=0.03):
    43914391                    pass
    4392                 assert num.allclose(domain.min_timestep, 0.0210448446782)
    4393                 assert num.allclose(domain.max_timestep, 0.0210448446782)
     4392                assert num.allclose(domain.recorded_min_timestep, 0.0210448446782)
     4393                assert num.allclose(domain.recorded_max_timestep, 0.0210448446782)
    43944394
    43954395            #print domain.quantities['stage'].centroid_values[:4]
     
    44704470        # FIXME (Ole): Need some other assertion here!
    44714471        #print domain.min_timestep, domain.max_timestep
    4472         #assert allclose(domain.min_timestep, 0.050010003001)
    4473         #assert allclose(domain.max_timestep, 0.050010003001)
     4472        #assert allclose(domain.recorded_min_timestep, 0.050010003001)
     4473        #assert allclose(domain.recorded_max_timestep, 0.050010003001)
    44744474
    44754475        os.remove(domain.get_name() + '.sww')
     
    46934693
    46944694        # Data from earlier version of abstract_2d_finite_volumes ft=0.1
    4695         assert num.allclose(domain.min_timestep, 0.0376895634803)
    4696         assert num.allclose(domain.max_timestep, 0.0415635655309)
     4695        assert num.allclose(domain.recorded_min_timestep, 0.0376895634803)
     4696        assert num.allclose(domain.recorded_max_timestep, 0.0415635655309)
    46974697
    46984698        assert num.allclose(domain.quantities['stage'].centroid_values,
Note: See TracChangeset for help on using the changeset viewer.