Ignore:
Timestamp:
Jun 18, 2010, 6:05:23 PM (12 years ago)
Author:
hudson
Message:

Fixed AABB parameter passing bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/shallow_water/boundaries.py

    r7765 r7861  
    182182        return sea_level + normalized_amplitude/cosh(t-25)**2
    183183
    184     Bts = Transmissive_n_momentum_zero_t_momentum_set_stage_boundary(domain, waveform)
     184    Bts = Transmissive_n_momentum_zero_t_momentum_set_stage_boundary\
     185                            (domain, waveform)
    185186
    186187    Underlying domain must be specified when boundary is instantiated
     
    243244            x = float(value[0])
    244245
    245         ## import math
    246         ## if vol_id == 9433:
    247         ##     print 'vol_id = ',vol_id, ' edge_id = ',edge_id, 'q = ', q, ' x = ',x
    248         ##     print 'normal = ', normal
    249         ##     print 'n . p = ', (normal[0]*q[1] + normal[1]*q[2])
    250         ##     print 't . p = ', (normal[1]*q[1] - normal[0]*q[2])
    251 
    252 
    253246        q[0] = x
    254247        ndotq = (normal[0]*q[1] + normal[1]*q[2])
     
    398391        # Where v is velocity, n is manning's coefficient, h is depth
    399392        # and S is the slope into the domain.
    400         # Let mu be the momentum (vh), then this equation becomes: mu = 1/n h^{5/3} sqrt(S)
     393        # Let mu be the momentum (vh), then this equation becomes:
     394        #            mu = 1/n h^{5/3} sqrt(S)
    401395        # from which we can isolate depth to get
    402         # h = (mu n/sqrt(S) )^{3/5}
     396        #             h = (mu n/sqrt(S) )^{3/5}
    403397       
    404398        slope = 0 # get gradient for this triangle dot normal
    405399       
    406400        # get manning coef from this triangle
    407         friction = self.domain.get_quantity('friction').get_values(location='edges',
    408                                                                   indices=[vol_id])[0]
     401        friction = self.domain.get_quantity('friction').get_values(\
     402                    location='edges', indices=[vol_id])[0]
    409403        mannings_n = friction[edge_id]
    410404
    411405        if slope > epsilon and mannings_n > epsilon:
    412             depth = pow(self.average_momentum * mannings_n/math.sqrt(slope), 3.0/5)
     406            depth = pow(self.average_momentum * mannings_n/math.sqrt(slope), \
     407                        3.0/5)
    413408        else:
    414409            depth = 1.0
     
    416411        # Elevation on this edge   
    417412       
    418         z = self.domain.get_quantity('elevation').get_values(location='edges',
    419                                                             indices=[vol_id])[0]
     413        z = self.domain.get_quantity('elevation').get_values(\
     414                    location='edges', indices=[vol_id])[0]
    420415        elevation = z[edge_id]
    421416           
Note: See TracChangeset for help on using the changeset viewer.