Ignore:
Timestamp:
Jun 14, 2010, 8:56:00 PM (14 years ago)
Author:
steve
Message:

Moving channel code to numpy

Location:
anuga_work/development/flow_1d
Files:
15 added
7 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/flow_1d/generic_1d/quantity.py

    r7827 r7830  
    11261126if __name__ == "__main__":
    11271127    #from domain import Domain
    1128     from sww_domain import Domain
     1128    from generic_domain import Generic_domain as Domain
    11291129   
    11301130    points1 = [0.0, 1.0, 2.0, 3.0]
  • anuga_work/development/flow_1d/generic_1d/test_quantity.py

    r7827 r7830  
    473473
    474474        #Assert that quantities are conserved
    475         from Numeric import sum
    476475        for k in range(quantity.centroid_values.shape[0]):
    477476            assert allclose (quantity.centroid_values[k],
    478                              sum(quantity.vertex_values[k,:])/2.0)
     477                             numpy.sum(quantity.vertex_values[k,:])/2.0)
    479478
    480479
  • anuga_work/development/flow_1d/sww_flow

    • Property svn:ignore set to
      .python_cache
  • anuga_work/development/flow_1d/sww_flow/sww_boundary_conditions.py

    r7827 r7830  
    77__date__ ="$05/06/2010 5:44:05 PM$"
    88
    9 from generic_domain import *
     9from flow_1d.generic_1d.generic_domain import *
    1010
    1111class Dirichlet_boundary(Boundary):
  • anuga_work/development/flow_1d/sww_flow/sww_domain.py

    r7827 r7830  
    4545import numpy
    4646
    47 from generic_domain import *
     47from flow_1d.generic_1d.generic_domain import Generic_domain
    4848from sww_boundary_conditions import *
    4949from sww_forcing_terms import *
     
    6565                                tagged_elements      = tagged_elements)
    6666       
    67         from config import minimum_allowed_height, g, h0
     67        from flow_1d.config import minimum_allowed_height, g, h0
    6868        self.minimum_allowed_height = minimum_allowed_height
    6969        self.g = g
     
    8484       
    8585        #Reduction operation for get_vertex_values
    86         from util import mean
     86        from flow_1d.utilities.util import mean
    8787        self.reduction = mean
    8888        #self.reduction = min  #Looks better near steep slopes
  • anuga_work/development/flow_1d/sww_flow/sww_forcing_terms.py

    r7827 r7830  
    1414    """
    1515
    16     from util import gradient
     16    from flow_1d.utilities.util import gradient
    1717
    1818    xmom  = domain.quantities['xmomentum'].explicit_update
     
    158158    else:
    159159        try:
    160             f = numpy.float(f)
     160            f = float(f)
    161161        except:
    162162            msg = 'Force field %s must be either a scalar' %f
     
    166166
    167167
    168 if __name__ == "__main__":
    169     print "Hello World";
Note: See TracChangeset for help on using the changeset viewer.