Ignore:
Timestamp:
Mar 31, 2008, 4:39:49 PM (16 years ago)
Author:
ole
Message:

Made tight_slope_limiters = True the default.
Fixed a few tests
Did some cosmetics as per style guide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py

    r5166 r5181  
    14041404            return -x
    14051405       
    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
    14071408       
    14081409        This is testing the gauge_sww2csv function, by creating a sww file and
     
    14101411        """
    14111412       
    1412         # create mesh
     1413        # Create mesh
    14131414        mesh_file = tempfile.mktemp(".tsh")   
    14141415        points = [[0.0,0.0],[6.0,0.0],[6.0,6.0],[0.0,6.0]]
     
    14191420        m.export_mesh_file(mesh_file)
    14201421       
    1421         #Create shallow water domain
     1422        # Create shallow water domain
    14221423        domain = Domain(mesh_file)
    14231424        os.remove(mesh_file)
     
    14251426        domain.default_order=2
    14261427        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
    14291435        domain.set_quantity('elevation', elevation_function)
    14301436        domain.set_quantity('friction', 0.03)
     
    14461452        domain.smooth = True
    14471453        domain.reduction = mean
     1454
    14481455
    14491456        sww = get_dataobject(domain)
     
    14681475       
    14691476        sww2csv_gauges(sww.filename,
    1470                             points_file,
    1471                             verbose=False,
    1472                             use_cache=False)
     1477                       points_file,
     1478                       verbose=False,
     1479                       use_cache=False)
    14731480
    14741481#        point1_answers_array = [[0.0,1.0,-5.0,3.0,4.0], [2.0,10.0,-5.0,3.0,4.0]]
     
    15211528            return -x
    15221529       
    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
    15241532       
    15251533        This is testing the gauge_sww2csv function, by creating a sww file and
     
    15301538        """
    15311539       
    1532         # create mesh
     1540        # Create mesh
    15331541        mesh_file = tempfile.mktemp(".tsh")   
    15341542        points = [[0.0,0.0],[6.0,0.0],[6.0,6.0],[0.0,6.0]]
     
    15391547        m.export_mesh_file(mesh_file)
    15401548       
    1541         #Create shallow water domain
     1549        # Create shallow water domain
    15421550        domain = Domain(mesh_file)
    15431551        os.remove(mesh_file)
     
    15461554        domain.beta_h = 0
    15471555
    1548         #Set some field values
     1556        # Set some field values
    15491557        domain.set_quantity('elevation', elevation_function)
    15501558        domain.set_quantity('friction', 0.03)
     
    16331641            return -x
    16341642       
    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
    16361645       
    16371646        This is testing the gauge_sww2csv function, by creating a sww file and
    16381647        then exporting the gauges and checking the results.
    16391648       
    1640         This is the same as sww2csv_gauges except set domain.set_starttime to 5. Therefore
    1641         testing the storing of the absolute time in the csv files
     1649        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
    16421651        """
    16431652       
    1644         # create mesh
     1653        # Create mesh
    16451654        mesh_file = tempfile.mktemp(".tsh")   
    16461655        points = [[0.0,0.0],[6.0,0.0],[6.0,6.0],[0.0,6.0]]
     
    16511660        m.export_mesh_file(mesh_file)
    16521661       
    1653         #Create shallow water domain
     1662        # Create shallow water domain
    16541663        domain = Domain(mesh_file)
    16551664        os.remove(mesh_file)
     
    16581667        domain.beta_h = 0
    16591668
    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
    16611674        domain.set_quantity('elevation', elevation_function)
    16621675        domain.set_quantity('friction', 0.03)
Note: See TracChangeset for help on using the changeset viewer.