Changeset 4721
- Timestamp:
- Sep 10, 2007, 7:11:46 PM (17 years ago)
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
r4713 r4721 1165 1165 1166 1166 def evolve_one_euler_step(self, yieldstep, finaltime): 1167 """One Euler Time Step""" 1167 """ 1168 One Euler Time Step 1169 Q^{n+1} = E(h) Q^n 1170 """ 1168 1171 1169 1172 #Compute fluxes across each element edge … … 1192 1195 1193 1196 def evolve_one_rk2_step(self, yieldstep, finaltime): 1194 """One 2nd order RK timestep""" 1197 """ 1198 One 2nd order RK timestep 1199 Q^{n+1} = 0.5 Q^n + 0.5 E(h)^2 Q^n 1200 """ 1195 1201 1196 1202 #Save initial initial conserved quantities values … … 1251 1257 1252 1258 def evolve_one_rk3_step(self, yieldstep, finaltime): 1253 """One 2nd order RK timestep""" 1254 1255 1259 """ 1260 One 3rd order RK timestep 1261 Q^(1) = 3/4 Q^n + 1/4 E(h)^2 Q^n (at time t^n + h/2) 1262 Q^{n+1} = 1/3 Q^n + 2/3 E(h) Q^(1) (at time t^{n+1}) 1263 """ 1256 1264 1257 1265 #Save initial initial conserved quantities values … … 1296 1304 1297 1305 #------------------------------------ 1298 #Combine final and initial values1299 # of conserved quantities and cleanup1306 #Combine steps to obtain intermediate 1307 #solution at time t^n + 0.5 h 1300 1308 #------------------------------------ 1309 1301 1310 #combine steps 1302 1311 self.saxpy_conserved_quantities(0.25, 0.75) … … 1326 1335 #------------------------------------ 1327 1336 #Combine final and initial values 1328 # of conserved quantitiesand cleanup1337 #and cleanup 1329 1338 #------------------------------------ 1330 1339 #combine steps … … 1340 1349 self.update_boundary() 1341 1350 1342 #set substeptime1351 #set new time 1343 1352 self.time = initial_time + self.timestep 1344 1353 1345 1346 1347 1354 1348 1355 def evolve_to_end(self, finaltime = 1.0):
Note: See TracChangeset
for help on using the changeset viewer.