Ignore:
Timestamp:
Aug 5, 2010, 8:20:47 PM (14 years ago)
Author:
mungkasi
Message:

Modifying codes so that arrays are compatible with numpy instead of Numeric.

File:
1 edited

Legend:

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

    r7914 r7922  
    668668    import sys
    669669    from Numeric import Float
    670     from numpy import zeros
     670    from numpy import array, zeros
    671671    from config import epsilon, h0
    672672
     
    719719
    720720    for i in range(N):                                         
    721         if h_V[i] <= 0.0:
    722             h_V[i] = 0.0
     721        if min(h_V[i]) <= 0.0:
     722            h_V[i] = array([0.0, 0.0])
    723723            stage_V[i] = bed_V[i]
    724             xmom_V[i] = 0.0
     724            xmom_V[i] = array([0.0, 0.0])
    725725   
    726726    u_V[:]  = xmom_V/(h_V + h0/h_V)   
Note: See TracChangeset for help on using the changeset viewer.