- Timestamp:
- Feb 5, 2010, 5:24:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water_balanced/test_swb_balance.py
r7573 r7616 63 63 64 64 # Limit 65 domain.tight_slope_limiters = 066 65 domain.distribute_to_vertices_and_edges() 67 66 … … 72 71 73 72 # Now try with a non-flat bed - closely hugging initial stage in places 74 # This will create alphas in the range [0, 0.478260, 1]75 73 domain.set_quantity('stage', [[3,0,3], [2,2,6], [5,3,8], [8,3,5]]) 76 74 domain.set_quantity('elevation', [[0,0,0], … … 79 77 [0,2,4]]) 80 78 stage = domain.quantities['stage'] 79 elevation = domain.quantities['elevation'] 80 height = domain.quantities['height'] 81 81 82 82 ref_centroid_values = copy.copy(stage.centroid_values[:]) # Copy … … 84 84 85 85 # Limit 86 domain.tight_slope_limiters = 087 86 domain.distribute_to_vertices_and_edges() 88 87 … … 98 97 # Check actual results 99 98 assert num.allclose(stage.vertex_values, 100 [[ 2., 2., 2. ], 101 [ 1.93333333, 2.03333333, 6.03333333], 102 [ 8.4, 3.8, 3.8 ], 103 [ 3.33333333, 5.33333333, 7.33333333]]) or \ 104 num.allclose(stage.vertex_values, 105 [[ 1.06666667, 3.86666667, 1.06666667], 106 [ 1.93333333, 2.03333333, 6.03333333], 107 [ 5.46666667, 3.06666667, 7.46666667], 108 [ 6.53333333, 4.69333333, 4.77333333]]) 99 [[ 2.66666667, 0.66666667, 2.66666667], 100 [ 3.33333333, 3.33333333, 3.33333333], 101 [ 3.73333333, 4.93333333, 7.33333333], 102 [ 7.33333333, 4.93333333, 3.73333333]]) 109 103 110 104
Note: See TracChangeset
for help on using the changeset viewer.