Changeset 1753 for inundation/pyvolution/test_shallow_water.py
- Timestamp:
- Aug 24, 2005, 1:49:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/test_shallow_water.py
r1671 r1753 1238 1238 val3 = 2. 1239 1239 1240 domain.set_quantity('stage', [val0, val1, val2, val3], 'centroids') 1240 domain.set_quantity('stage', [val0, val1, val2, val3], 1241 location='centroids') 1241 1242 L = domain.quantities['stage'].vertex_values 1242 1243 … … 1274 1275 return x**2 1275 1276 1276 domain.set_quantity('stage', stage, 'centroids')1277 domain.set_quantity('stage', stage, location='centroids') 1277 1278 1278 1279 a, b = domain.quantities['stage'].compute_gradients() … … 1311 1312 return x**4+y**2 1312 1313 1313 domain.set_quantity('stage', stage, 'centroids')1314 domain.set_quantity('stage', stage, location='centroids') 1314 1315 #print domain.quantities['stage'].centroid_values 1315 1316 … … 1355 1356 1356 1357 domain.set_quantity('elevation', slope) 1357 domain.set_quantity('stage', stage, 'centroids')1358 domain.set_quantity('stage', stage, location='centroids') 1358 1359 1359 1360 #print domain.quantities['elevation'].centroid_values … … 1443 1444 domain.set_quantity('elevation', slope) 1444 1445 domain.set_quantity('stage', 1445 [0.01298164, 0.00365611, 0.01440365, -0.0381856437096], 1446 'centroids') 1446 [0.01298164, 0.00365611, 1447 0.01440365, -0.0381856437096], 1448 location='centroids') 1447 1449 domain.set_quantity('xmomentum', 1448 [0.00670439, 0.01263789, 0.00647805, 0.0178180740668], 1449 'centroids') 1450 [0.00670439, 0.01263789, 1451 0.00647805, 0.0178180740668], 1452 location='centroids') 1450 1453 domain.set_quantity('ymomentum', 1451 [-7.23510980e-004, -6.30413883e-005, 6.30413883e-005, 0.000200907255866], 1452 'centroids') 1454 [-7.23510980e-004, -6.30413883e-005, 1455 6.30413883e-005, 0.000200907255866], 1456 location='centroids') 1453 1457 1454 1458 E = domain.quantities['elevation'].vertex_values … … 1466 1470 #print Y[1,:] 1467 1471 1468 assert allclose(L[1,:], [-0.00825735775384, -0.00801881482869, 0.0272445025825]) 1469 assert allclose(X[1,:], [0.0143507718962, 0.0142502147066, 0.00931268339717]) 1470 assert allclose(Y[1,:], [-0.000117062180693, 7.94434448109e-005, -0.000151505429018]) 1472 assert allclose(L[1,:], [-0.00825735775384, 1473 -0.00801881482869, 1474 0.0272445025825]) 1475 assert allclose(X[1,:], [0.0143507718962, 1476 0.0142502147066, 1477 0.00931268339717]) 1478 assert allclose(Y[1,:], [-0.000117062180693, 1479 7.94434448109e-005, 1480 -0.000151505429018]) 1471 1481 1472 1482 … … 2211 2221 2212 2222 2213 domain.set_quantity('stage', L, 'centroids')2214 domain.set_quantity('xmomentum', X, 'centroids')2215 domain.set_quantity('ymomentum', Y, 'centroids')2223 domain.set_quantity('stage', L, location='centroids') 2224 domain.set_quantity('xmomentum', X, location='centroids') 2225 domain.set_quantity('ymomentum', Y, location='centroids') 2216 2226 2217 2227 domain.check_integrity()
Note: See TracChangeset
for help on using the changeset viewer.