Ignore:
Timestamp:
Jul 25, 2005, 4:48:54 PM (20 years ago)
Author:
ole
Message:

Fixed 'lost mass' conservation problem and added unit test, that reveals it.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/shallow_water.py

    r1635 r1636  
    615615        if hc[k] < domain.minimum_allowed_height:
    616616            #Control stage
    617             wc[k] = zc[k]
     617            if hc[k] < domain.epsilon:
     618                wc[k] = zc[k] # Contain 'lost mass' error
    618619
    619620            #Control momentum
     
    635636    from shallow_water_ext import protect
    636637
    637     protect(domain.minimum_allowed_height, wc, zc, xmomc, ymomc)
     638    protect(domain.minimum_allowed_height, domain.epsilon,
     639            wc, zc, xmomc, ymomc)
    638640
    639641
Note: See TracChangeset for help on using the changeset viewer.