Changeset 8169


Ignore:
Timestamp:
Mar 27, 2011, 11:55:41 AM (14 years ago)
Author:
steve
Message:

Fixed up update_centroids_of_velocities_and_height so that it doesn't change the conserved quantities

File:
1 edited

Legend:

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

    r8168 r8169  
    591591        # might not have been setup
    592592
    593         pass
    594 
    595593        self.update_centroids_of_velocities_and_height()
    596594
     
    630628        # Make sure boundary values of conserved quantites
    631629        # are consistent with value of functions at centroids
    632         self.distribute_to_vertices_and_edges()
     630        #self.distribute_to_vertices_and_edges()
    633631        Z.set_boundary_values_from_edges()
    634         W.set_boundary_values_from_edges()
    635         UH.set_boundary_values_from_edges()
    636         VH.set_boundary_values_from_edges()
     632
     633        #W.set_boundary_values_from_edges()
     634        #UH.set_boundary_values_from_edges()
     635        #VH.set_boundary_values_from_edges()
    637636
    638637        # Update height values
    639638        H.set_values(W.centroid_values-Z.centroid_values, location='centroids')
    640         H.set_boundary_values(W.boundary_values-Z.boundary_values)
     639        H.set_boundary_values( num.where(W.boundary_values-Z.boundary_values>=0,
     640                                         W.boundary_values-Z.boundary_values, 0.0))
    641641
    642642        assert num.min(H.centroid_values) >= 0
Note: See TracChangeset for help on using the changeset viewer.