Changeset 9222
- Timestamp:
- Jun 27, 2014, 10:09:30 AM (11 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r9221 r9222 1295 1295 1296 1296 1297 def get_ total_volume(self):1297 def get_water_volume(self): 1298 1298 1299 1299 from anuga import myid, numprocs, send, receive, barrier … … 1309 1309 1310 1310 if myid == 0: 1311 total_volume = volume1311 water_volume = volume 1312 1312 for i in range(1,numprocs): 1313 1313 remote_volume = receive(i) 1314 total_volume = total_volume + remote_volume1314 water_volume = water_volume + remote_volume 1315 1315 else: 1316 1316 send(volume,0) … … 1320 1320 if myid == 0: 1321 1321 for i in range(1,numprocs): 1322 send( total_volume,i)1322 send(water_volume,i) 1323 1323 else: 1324 total_volume = receive(0)1325 1326 return total_volume1324 water_volume = receive(0) 1325 1326 return water_volume 1327 1327 1328 1328 -
trunk/anuga_core/validation_tests/analytical_exact/trapezoidal_channel/numerical_channel_floodplain.py
r9221 r9222 183 183 184 184 # if numpy.allclose(t,0.0): 185 # exact_volume = domain.get_ total_volume()185 # exact_volume = domain.get_water_volume() 186 186 # else: 187 187 # exact_volume = exact_volume + Qin*10.0 188 # 189 # total_volume= domain.get_total_volume()190 191 192 #if myid == 0 and verbose: print anuga.indent,'total volume - exact_volume ', total_volume -exact_volume188 # 189 # water_volume= domain.get_water_volume() 190 # 191 # 192 # if myid == 0 and verbose: print anuga.indent,'relative error water volume exact_volume ', (water_volume - exact_volume)/exact_volume 193 193 194 194 domain.sww_merge(delete_old=True)
Note: See TracChangeset
for help on using the changeset viewer.