- Timestamp:
- Dec 5, 2008, 11:35:49 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r6006 r6045 1108 1108 1109 1109 1110 class Transmissive_Momentum_Set_Stage_boundary(Boundary): 1110 1111 class Transmissive_momentum_set_stage_boundary(Boundary): 1111 1112 """Returns same momentum conserved quantities as 1112 1113 those present in its neighbour volume. … … 1119 1120 return sea_level + normalized_amplitude/cosh(t-25)**2 1120 1121 1121 Bts = Transmissive_ Momentum_Set_Stage_boundary(domain, waveform)1122 Bts = Transmissive_momentum_set_stage_boundary(domain, waveform) 1122 1123 1123 1124 … … 1140 1141 1141 1142 def __repr__(self): 1142 return 'Transmissive_ Momentum_Set_Stage_boundary(%s)' %self.domain1143 return 'Transmissive_momentum_set_stage_boundary(%s)' %self.domain 1143 1144 1144 1145 def evaluate(self, vol_id, edge_id): 1145 """Transmissive Momentum Set Stage boundaries return the edge momentum1146 """Transmissive momentum set stage boundaries return the edge momentum 1146 1147 values of the volume they serve. 1147 1148 """ … … 1182 1183 1183 1184 1184 1185 class Dirichlet_Discharge_boundary(Boundary): 1185 # Backward compatibility 1186 # FIXME(Ole): Deprecate 1187 class Transmissive_Momentum_Set_Stage_boundary(Transmissive_momentum_set_stage_boundary): 1188 pass 1189 1190 1191 1192 class Transmissive_stage_zero_momentum_boundary(Boundary): 1193 """Return same stage as those present in its neighbour volume. Set momentum to zero. 1194 1195 Underlying domain must be specified when boundary is instantiated 1196 """ 1197 1198 def __init__(self, domain=None): 1199 Boundary.__init__(self) 1200 1201 if domain is None: 1202 msg = 'Domain must be specified for ' 1203 msg += 'Transmissive_stage_zero_momentum boundary' 1204 raise Exception, msg 1205 1206 self.domain = domain 1207 1208 def __repr__(self): 1209 return 'Transmissive_stage_zero_momentum_boundary(%s)' %self.domain 1210 1211 def evaluate(self, vol_id, edge_id): 1212 """Transmissive boundaries return the edge values 1213 of the volume they serve. 1214 """ 1215 1216 q = self.domain.get_conserved_quantities(vol_id, edge=edge_id) 1217 1218 q[1] = q[2] = 0.0 1219 return q 1220 1221 1222 1223 class Dirichlet_discharge_boundary(Boundary): 1186 1224 """ 1187 1225 Sets stage (stage0) … … 1191 1229 """ 1192 1230 1193 def __init__(self, domain =None, stage0=None, wh0=None):1231 def __init__(self, domain=None, stage0=None, wh0=None): 1194 1232 Boundary.__init__(self) 1195 1233 … … 1229 1267 1230 1268 1269 1270 # Backward compatibility 1271 # FIXME(Ole): Deprecate 1272 class Dirichlet_Discharge_boundary(Dirichlet_discharge_boundary): 1273 pass 1274 1275 1276 1277 1278 1231 1279 class Field_boundary(Boundary): 1232 1280 """Set boundary from given field represented in an sww file containing values
Note: See TracChangeset
for help on using the changeset viewer.