Changeset 6469
- Timestamp:
- Mar 5, 2009, 2:17:07 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/test_data_manager.py
r6224 r6469 10586 10586 ymomentum = fid.variables['ymomentum'][:] 10587 10587 10588 h = stage-z 10589 for i in range(len(stage)): 10590 if h[i] == 0.0: 10591 assert xmomentum[i] == 0.0 10592 assert ymomentum[i] == 0.0 10593 else: 10594 assert h[i] >= domain.minimum_storable_height 10588 10589 10590 for i in range(stage.shape[0]): 10591 h = stage[i]-z # depth vector at time step i 10592 10593 # Check every node location 10594 for j in range(stage.shape[1]): 10595 # Depth being either exactly zero implies 10596 # momentum being zero. 10597 # Or else depth must be greater than or equal to 10598 # the minimal storable height 10599 if h[j] == 0.0: 10600 assert xmomentum[i,j] == 0.0 10601 assert ymomentum[i,j] == 0.0 10602 else: 10603 assert h[j] >= domain.minimum_storable_height 10595 10604 10596 10605 fid.close()
Note: See TracChangeset
for help on using the changeset viewer.