Changeset 5274
- Timestamp:
- May 5, 2008, 12:56:24 PM (17 years ago)
- Location:
- anuga_core/source/anuga/shallow_water
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r5254 r5274 5634 5634 5635 5635 # Get mesh and quantities from sww file 5636 X = get_mesh_and_quantities_from_sww_file(filename, ['elevation', 5637 'stage', 5638 'xmomentum', 5639 'ymomentum'], verbose=verbose) 5636 X = get_mesh_and_quantities_from_sww_file(filename, 5637 ['elevation', 5638 'stage', 5639 'xmomentum', 5640 'ymomentum'], 5641 verbose=verbose) 5640 5642 interpolator, quantities, geo_reference, time = X 5641 5643 -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r5254 r5274 7419 7419 7420 7420 7421 def test_get_mesh_and_quantities_from_sww_file(self): 7422 """test_get_mesh_and_quantities_from_sww_file(self): 7423 """ 7424 7425 # Generate a test sww file 7426 7427 import time, os 7428 from Numeric import array, zeros, allclose, Float, concatenate 7429 from Scientific.IO.NetCDF import NetCDFFile 7430 7431 # Setup 7432 from mesh_factory import rectangular 7433 7434 # Create basic mesh (100m x 5m) 7435 width = 5 7436 len = 100 7437 points, vertices, boundary = rectangular(len, width, 100, 5) 7438 7439 # Create shallow water domain 7440 domain = Domain(points, vertices, boundary) 7441 7442 domain.set_name('flowtest') 7443 swwfile = domain.get_name() + '.sww' 7444 domain.set_datadir('.') 7445 7446 Br = Reflective_boundary(domain) # Side walls 7447 Bd = Dirichlet_boundary([1, 0, 0]) # inflow 7448 7449 domain.set_boundary( {'left': Bd, 'right': Bd, 'top': Br, 'bottom': Br}) 7450 7451 for t in domain.evolve(yieldstep=1, finaltime = 50): 7452 pass 7453 7454 7455 # Read it 7456 7457 # FIXME (Ole): TODO 7458 7459 7421 7460 def NOtest_get_flow_through_cross_section(self): 7422 7461 """test_get_flow_through_cross_section(self):
Note: See TracChangeset
for help on using the changeset viewer.