Changeset 9620 for trunk


Ignore:
Timestamp:
Feb 6, 2015, 9:49:14 AM (10 years ago)
Author:
davies
Message:

Bugfix

Location:
trunk/anuga_core/anuga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/anuga/parallel/parallel_structure_operator.py

    r9619 r9620  
    274274            #    Q_star = 0.0
    275275            if old_inflow_depth > 0.0 :
    276                     dt_Q_on_d = timestep*Q/old_inflow_depth
    277             else:
    278                     dt_Q_on_d = 0.0
    279 
    280             factor = 1.0/(1.0 + Q_star*timestep/inflow_area)
     276                dt_Q_on_d = timestep*Q/old_inflow_depth
     277            else:
     278                dt_Q_on_d = 0.0
     279
     280            factor = 1.0/(1.0 + dt_Q_on_d/self.inflow.get_area())
    281281            new_inflow_depth = old_inflow_depth*factor
    282282
  • trunk/anuga_core/anuga/structures/structure_operator.py

    r9606 r9620  
    214214        # the update does not create a negative depth
    215215        if old_inflow_depth > 0.0 :
    216                 dt_Q_on_d = timestep*Q/old_inflow_depth
    217         else:
    218                 dt_Q_on_d = 0.0
     216            dt_Q_on_d = timestep*Q/old_inflow_depth
     217        else:
     218            dt_Q_on_d = 0.0
    219219
    220220        # The depth update is:
Note: See TracChangeset for help on using the changeset viewer.