Changeset 7921


Ignore:
Timestamp:
Aug 5, 2010, 7:16:33 PM (9 years ago)
Author:
mungkasi
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/sudi/sw_1d/avalanche/B_momentum/shallow_water_domain_avalanche.py

    r7915 r7921  
    673673    import sys
    674674    from Numeric import Float
    675     from numpy import zeros
     675    from numpy import array, zeros
    676676    from config import epsilon, h0
    677677
     
    691691    h_C   = Height.centroid_values
    692692    u_C   = Velocity.centroid_values
    693 
    694     #for i in range(N):
    695     #   h_C[i] = w_C[i] - z_C[i]                                               
    696     #    if h_C[i] <= epsilon :
    697     #       uh_C[i] = 0.0
    698     #       u_C[i] = 0.0
    699     #       w_C[i] = z_C[i]
    700     #u_C[:] = uh_C/(h_C + h0/h_C)
    701693   
    702694    for i in range(N):
     
    727719
    728720    for i in range(N):                                         
    729         if h_V[i] <= 0.0:
    730             h_V[i] = 0.0
     721        if min(h_V[i]) <= 0.0:
     722            h_V[i] = array([0.0, 0.0])
    731723            stage_V[i] = bed_V[i]
    732             xmom_V[i] = 0.0
     724            xmom_V[i] = array([0.0, 0.0])
    733725   
    734726    u_V[:]  = xmom_V/(h_V + h0/h_V)   
Note: See TracChangeset for help on using the changeset viewer.