Changeset 1504 for inundation/ga/storm_surge/pyvolution/test_quantity.py
- Timestamp:
- Jun 8, 2005, 12:58:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/test_quantity.py
r1486 r1504 285 285 #The central triangle (1) 286 286 #(using standard gradient based on neigbours controid values) 287 assert a [1] == 2.0288 assert b[1] == 0.0287 assert allclose(a[1], 2.0) 288 assert allclose(b[1], 0.0) 289 289 290 290 … … 292 292 #q0 = q1 + a*(x0-x1) + b*(y0-y1) <=> 293 293 #2 = 4 + a*(-2/3) + b*(-2/3) 294 assert a [0] + b[0] == 3294 assert allclose(a[0] + b[0], 3) 295 295 #From orthogonality (a*(y0-y1) + b*(x0-x1) == 0) 296 assert a [0] - b[0] == 0296 assert allclose(a[0] - b[0], 0) 297 297 298 298 … … 300 300 #q2 = q1 + a*(x2-x1) + b*(y2-y1) <=> 301 301 #6 = 4 + a*(4/3) + b*(-2/3) 302 assert 2*a[2] - b[2] == 3302 assert allclose(2*a[2] - b[2], 3) 303 303 #From orthogonality (a*(y1-y2) + b*(x2-x1) == 0) 304 assert a [2] + 2*b[2] == 0304 assert allclose(a[2] + 2*b[2], 0) 305 305 306 306 … … 308 308 #q3 = q1 + a*(x3-x1) + b*(y3-y1) <=> 309 309 #2 = 4 + a*(-2/3) + b*(4/3) 310 assert a [3] - 2*b[3] == 3310 assert allclose(a[3] - 2*b[3], 3) 311 311 #From orthogonality (a*(y1-y3) + b*(x3-x1) == 0) 312 assert 2*a[3] + b[3] == 0312 assert allclose(2*a[3] + b[3], 0) 313 313 314 314 … … 339 339 #print a, b 340 340 341 assert a [1] == 3.0342 assert b[1] == 1.0341 assert allclose(a[1], 3.0) 342 assert allclose(b[1], 1.0) 343 343 344 344 #Work out the others
Note: See TracChangeset
for help on using the changeset viewer.