Changeset 9493
- Timestamp:
- Jan 24, 2015, 8:14:14 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/examples/anuga/operators/run_bed_shear_erosion.py
r9445 r9493 70 70 len1=length, len2=width) 71 71 domain = Domain(points, vertices, boundary) 72 domain.set_flow_algorithm(' 2_0')73 domain.set_name( 'bed_shear_erosion') # Output name72 domain.set_flow_algorithm('DE0') 73 domain.set_name() # Output name 74 74 domain.set_store_vertices_uniquely(True) 75 75 … … 101 101 print 'Set up Erosion Area to test...' 102 102 103 from rudy_erosionimport Bed_shear_erosion_operator103 from anuga import Bed_shear_erosion_operator 104 104 polygon1 = [ [10.6, 1.0], [13.7, 1.0], [13.7, 4.0], [10.6, 4.0] ] 105 105 -
trunk/anuga_core/examples/anuga/operators/run_flat_slice_erosion.py
r9445 r9493 71 71 domain = Domain(points, vertices, boundary) 72 72 domain.set_flow_algorithm('DE1') 73 domain.set_name( 'flat_slice_erosion') # Output name73 domain.set_name() # Output name 74 74 print domain.statistics() 75 75 … … 99 99 print 'Set up Erosion Area to test...' 100 100 101 from rudy_erosionimport Flat_slice_erosion_operator101 from anuga import Flat_slice_erosion_operator 102 102 polygon1 = [ [10.6, 1.0], [13.7, 1.0], [13.7, 4.0], [10.6, 4.0] ] 103 103 -
trunk/anuga_core/examples/anuga/operators/run_polygon_erosion.py
r9445 r9493 82 82 83 83 else: 84 ind = self.indices 85 m = num.sqrt(self.xmom_c[ind]**2 + self.ymom_c[ind]**2) 86 87 if self.domain.get_using_discontinuous_elevation(): 88 height = self.stage_c[ind] - self.elev_c[ind] 89 90 m = num.where(m>self.threshold, m, 0.0) 91 self.elev_c[ind] = num.maximum(self.elev_c[ind] - m*dt, self.base) 84 92 93 self.stage_c[ind] = self.elev_c[ind] + height 94 else: 85 95 #-------------------------------------- 86 96 # Update all three vertices for each cell 87 97 #-------------------------------------- 88 ind = self.indices89 m = num.sqrt(self.xmom_c[ind]**2 + self.ymom_c[ind]**2)90 m = num.vstack((m,m,m)).T91 m = num.where(m>self.threshold, m, 0.0)92 self.elev_v[ind] = num.maximum(self.elev_v[ind] - m*dt, self.base)93 #num.maximum(self.elev_v[ind] - momentum*dt, Z)98 99 100 m = num.vstack((m,m,m)).T 101 m = num.where(m>self.threshold, m, 0.0) 102 self.elev_v[ind] = num.maximum(self.elev_v[ind] - m*dt, self.base) 103 #num.maximum(self.elev_v[ind] - momentum*dt, Z) 94 104 95 105 … … 114 124 domain = Domain(points, vertices, boundary) 115 125 domain.set_name() # Output name based on script 126 domain.set_flow_algorithm('DE1') 116 127 print domain.statistics() 128 domain.set_store_vertices_uniquely(True) 129 117 130 domain.set_quantities_to_be_stored({'elevation': 2, 118 131 'stage': 2, -
trunk/anuga_core/source/anuga/operators/erosion_operators.py
r9125 r9493 606 606 607 607 608 if self.domain.get_ discontinuous_elavation():608 if self.domain.get_using_discontinuous_elevation(): 609 609 height = self.stage_c[ind] - self.elev_c[ind] 610 610
Note: See TracChangeset
for help on using the changeset viewer.