Changeset 5274


Ignore:
Timestamp:
May 5, 2008, 12:56:24 PM (17 years ago)
Author:
ole
Message:

Work in progress regarding flow through a cross section, ticket:175

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  
    56345634
    56355635    # 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)
    56405642    interpolator, quantities, geo_reference, time = X
    56415643
  • anuga_core/source/anuga/shallow_water/test_data_manager.py

    r5254 r5274  
    74197419
    74207420
     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       
    74217460    def NOtest_get_flow_through_cross_section(self):
    74227461        """test_get_flow_through_cross_section(self):
Note: See TracChangeset for help on using the changeset viewer.