Changeset 3572
- Timestamp:
- Sep 12, 2006, 6:33:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r3563 r3572 1045 1045 class Transmissive_Momentum_Set_Stage_boundary(Boundary): 1046 1046 """Returns same momentum conserved quantities as 1047 those present in its neighbour volume. Sets stage 1047 those present in its neighbour volume. 1048 Sets stage by specifying a function f of time which may either be a 1049 vector function or a scalar function 1050 1051 Example: 1052 1053 def waveform(t): 1054 return sea_level + normalized_amplitude/cosh(t-25)**2 1055 1056 Bts = Transmissive_Momentum_Set_Stage_boundary(domain, waveform) 1057 1048 1058 1049 1059 Underlying domain must be specified when boundary is instantiated … … 1074 1084 q = self.domain.get_conserved_quantities(vol_id, edge = edge_id) 1075 1085 value = self.function(self.domain.time) 1076 q[0] = value[0] 1086 1087 try: 1088 x = float(value) 1089 except: 1090 x = float(value[0]) 1091 1092 q[0] = x 1077 1093 return q 1078 1094
Note: See TracChangeset
for help on using the changeset viewer.