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/periodic_waves/cg/domain_cg.py

    r7837 r7922  
    218218    """
    219219
    220     from Numeric import zeros, Float
     220    from Numeric import Float
     221    from numpy import zeros
    221222
    222223    assert len(q) == 3,\
     
    266267    from config import g, epsilon, h0
    267268    from math import sqrt
    268     from Numeric import array
     269    from numpy import array
    269270
    270271    #Align momentums with x-axis
     
    336337def compute_timestep(domain):
    337338    import sys
    338     from Numeric import zeros, Float
     339    from Numeric import Float
     340    from numpy import zeros
    339341
    340342    N = domain.number_of_elements
     
    398400def compute_fluxes_C_wellbalanced(domain):
    399401    import sys
    400     from Numeric import zeros, Float
     402    from Numeric import Float
     403    from numpy import zeros
    401404   
    402405    N = domain.number_of_elements
     
    506509
    507510    import sys
    508     from Numeric import zeros, Float
     511    from Numeric import Float
     512    from numpy import zeros
    509513    from config import epsilon, h0, h_min
    510514
     
    600604    """
    601605
    602     from Numeric import zeros, Float
     606    from Numeric import Float
     607    from numpy import zeros
    603608
    604609    N = domain.number_of_elements
     
    767772
    768773    from util import gradient
    769     from Numeric import zeros, Float, array, sum
     774    from Numeric import Float
     775    from numpy import zeros, array, sum
    770776
    771777    xmom = domain.quantities['xmomentum'].explicit_update
     
    865871    """
    866872
    867     from Numeric import ones, Float, array
     873    from Numeric import Float
     874    from numpy import ones, array   
    868875
    869876
     
    947954
    948955        from config import rho_a, rho_w, eta_w
    949         from Numeric import array, Float
     956        from Numeric import Float
     957        from numpy import array
    950958
    951959        if len(args) == 2:
     
    978986
    979987        from math import pi, cos, sin, sqrt
    980         from Numeric import Float, ones, ArrayType
     988        from Numeric import Float
     989        from numpy import ones, ArrayType       
    981990
    982991        xmom_update = domain.quantities['xmomentum'].explicit_update
Note: See TracChangeset for help on using the changeset viewer.