- Timestamp:
- Mar 31, 2008, 4:39:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py
r5166 r5181 1404 1404 return -x 1405 1405 1406 """Most of this test was copied from test_interpolate test_interpole_sww2csv 1406 """Most of this test was copied from test_interpolate 1407 test_interpole_sww2csv 1407 1408 1408 1409 This is testing the gauge_sww2csv function, by creating a sww file and … … 1410 1411 """ 1411 1412 1412 # create mesh1413 # Create mesh 1413 1414 mesh_file = tempfile.mktemp(".tsh") 1414 1415 points = [[0.0,0.0],[6.0,0.0],[6.0,6.0],[0.0,6.0]] … … 1419 1420 m.export_mesh_file(mesh_file) 1420 1421 1421 # Create shallow water domain1422 # Create shallow water domain 1422 1423 domain = Domain(mesh_file) 1423 1424 os.remove(mesh_file) … … 1425 1426 domain.default_order=2 1426 1427 domain.beta_h = 0 1427 1428 #Set some field values 1428 1429 # This test was made before tight_slope_limiters were introduced 1430 # Since were are testing interpolation values this is OK 1431 domain.tight_slope_limiters = 0 1432 1433 1434 # Set some field values 1429 1435 domain.set_quantity('elevation', elevation_function) 1430 1436 domain.set_quantity('friction', 0.03) … … 1446 1452 domain.smooth = True 1447 1453 domain.reduction = mean 1454 1448 1455 1449 1456 sww = get_dataobject(domain) … … 1468 1475 1469 1476 sww2csv_gauges(sww.filename, 1470 1471 1472 1477 points_file, 1478 verbose=False, 1479 use_cache=False) 1473 1480 1474 1481 # point1_answers_array = [[0.0,1.0,-5.0,3.0,4.0], [2.0,10.0,-5.0,3.0,4.0]] … … 1521 1528 return -x 1522 1529 1523 """Most of this test was copied from test_interpolate test_interpole_sww2csv 1530 """Most of this test was copied from test_interpolate 1531 test_interpole_sww2csv 1524 1532 1525 1533 This is testing the gauge_sww2csv function, by creating a sww file and … … 1530 1538 """ 1531 1539 1532 # create mesh1540 # Create mesh 1533 1541 mesh_file = tempfile.mktemp(".tsh") 1534 1542 points = [[0.0,0.0],[6.0,0.0],[6.0,6.0],[0.0,6.0]] … … 1539 1547 m.export_mesh_file(mesh_file) 1540 1548 1541 # Create shallow water domain1549 # Create shallow water domain 1542 1550 domain = Domain(mesh_file) 1543 1551 os.remove(mesh_file) … … 1546 1554 domain.beta_h = 0 1547 1555 1548 # Set some field values1556 # Set some field values 1549 1557 domain.set_quantity('elevation', elevation_function) 1550 1558 domain.set_quantity('friction', 0.03) … … 1633 1641 return -x 1634 1642 1635 """Most of this test was copied from test_interpolate test_interpole_sww2csv 1643 """Most of this test was copied from test_interpolate 1644 test_interpole_sww2csv 1636 1645 1637 1646 This is testing the gauge_sww2csv function, by creating a sww file and 1638 1647 then exporting the gauges and checking the results. 1639 1648 1640 This is the same as sww2csv_gauges except set domain.set_starttime to 5. Therefore1641 testing the storing of the absolute time in the csv files1649 This is the same as sww2csv_gauges except set domain.set_starttime to 5. 1650 Therefore testing the storing of the absolute time in the csv files 1642 1651 """ 1643 1652 1644 # create mesh1653 # Create mesh 1645 1654 mesh_file = tempfile.mktemp(".tsh") 1646 1655 points = [[0.0,0.0],[6.0,0.0],[6.0,6.0],[0.0,6.0]] … … 1651 1660 m.export_mesh_file(mesh_file) 1652 1661 1653 # Create shallow water domain1662 # Create shallow water domain 1654 1663 domain = Domain(mesh_file) 1655 1664 os.remove(mesh_file) … … 1658 1667 domain.beta_h = 0 1659 1668 1660 #Set some field values 1669 # This test was made before tight_slope_limiters were introduced 1670 # Since were are testing interpolation values this is OK 1671 domain.tight_slope_limiters = 0 1672 1673 # Set some field values 1661 1674 domain.set_quantity('elevation', elevation_function) 1662 1675 domain.set_quantity('friction', 0.03)
Note: See TracChangeset
for help on using the changeset viewer.