Changeset 2730
- Timestamp:
- Apr 19, 2006, 6:34:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/test_shallow_water.py
r2709 r2730 437 437 438 438 #Flux across right edge of volume 1 439 normal = domain.get_normal(1,0) 439 normal = domain.get_normal(1,0) #Get normal 0 of triangle 1 440 assert allclose(normal, [1, 0]) 441 440 442 ql = domain.get_conserved_quantities(vol_id=1, edge=0) 443 assert allclose(ql, [val1, 0, 0]) 444 441 445 qr = domain.get_conserved_quantities(vol_id=2, edge=2) 446 assert allclose(qr, [val2, 0, 0]) 447 442 448 flux0, max_speed = flux_function(normal, ql, qr, zl, zr) 449 450 #Flux across edge in the east direction (as per normal vector) 443 451 assert allclose(flux0, [-15.3598804, 253.71111111, 0.]) 444 452 assert allclose(max_speed, 9.21592824046) 445 453 454 455 #Flux across edge in the west direction (opposite sign for xmomentum) 456 normal_opposite = domain.get_normal(2,2) #Get normal 2 of triangle 2 457 assert allclose(normal_opposite, [-1, 0]) 458 flux_opposite, max_speed = flux_function([-1, 0], ql, qr, zl, zr) 459 assert allclose(flux_opposite, [-15.3598804, -253.71111111, 0.]) 460 446 461 447 462 #Flux across upper edge of volume 1
Note: See TracChangeset
for help on using the changeset viewer.