Changeset 5601


Ignore:
Timestamp:
Aug 4, 2008, 12:08:33 PM (16 years ago)
Author:
ole
Message:

Cleaned up in tests and made directories independent on where the test is run from.

Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/test_data_manager.py

    r5599 r5601  
    2222from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
    2323from anuga.abstract_2d_finite_volumes.util import file_function
     24
     25from anuga.utilities.system_tools import get_pathname_from_package
    2426
    2527# This is needed to run the tests of local functions
     
    65506552            compress,zeros,fabs,take,size
    65516553       
    6552         ordering_filename='thinned_bound_order_test.txt'
    6553         testdir = 'urs_test_data'
     6554        # Get path where this test is run
     6555        path = get_pathname_from_package('anuga.shallow_water')       
     6556       
     6557        testdir = os.path.join(path, 'urs_test_data')
     6558        ordering_filename=os.path.join(testdir, 'thinned_bound_order_test.txt')
     6559       
     6560       
    65546561        sources = ['1-z.grd','2-z.grd','3-z.grd']
    65556562       
     
    67596766        # make sts file for combined sources
    67606767        weights = [1., 2., 3.]
    6761         ordering_filename='thinned_bound_order_test.txt'
    6762         testdir = 'urs_test_data'
     6768       
     6769        path = get_pathname_from_package('anuga.shallow_water')       
     6770               
     6771        testdir = os.path.join(path, 'urs_test_data')       
     6772        ordering_filename=os.path.join(testdir, 'thinned_bound_order_test.txt')
     6773
    67636774        urs_filenames = [os.path.join(testdir,'1-z.grd'),
    67646775                         os.path.join(testdir,'2-z.grd'),
  • anuga_core/source/anuga/shallow_water/test_tsunami_okada.py

    r5421 r5601  
    2424        rectangular sources
    2525        """
    26         #get path where this test is run
     26        # Get path where this test is run
    2727        path = get_pathname_from_package('anuga.shallow_water')
    28         #choose what test to proceed
     28       
     29        # Choose what test to proceed
    2930        T = 1
    3031       
    3132
    32 
    3333        if T==0:
    34             # fotran output file
    35            
     34            # Fortran output file           
    3635            filename = path+sep+'fullokada_SP.txt'
    37         # initial condition of earthquake for multiple source
     36           
     37            # Initial condition of earthquake for multiple source
    3838            x0 = 7000.0
    3939            y0 = 10000.0
     
    4848            NSMAX=1
    4949        elif T==1:
    50         # fotran output file
     50            # Fortran output file       
    5151            filename = path+sep+'fullokada_SS.txt'
    52         # initial condition of earthquake for multiple source
     52           
     53            # Initial condition of earthquake for multiple source
    5354            x0 = 7000.0
    5455            y0 = 10000.0
     
    6566        elif T==2:
    6667
    67         # fotran output file
     68            # Fortran output file
    6869            filename = path+sep+'fullokada_MS.txt'
    69         # initial condition of earthquake for multiple source
     70           
     71            # Initial condition of earthquake for multiple source
    7072            x0 = [7000.0,10000.0]
    7173            y0 = [10000.0,7000.0]
     
    8284
    8385
    84         # get output file from original okada fortran script.
    85         # vertical displacement is listed under tmp.
     86        # Get output file from original okada fortran script.
     87        # Vertical displacement is listed under tmp.
    8688        polyline_file=open(filename,'r')
    8789        lines=polyline_file.readlines()
     
    160162        """
    161163
    162         #get path where this test is run
     164        # Get path where this test is run
    163165        path= get_pathname_from_package('anuga.shallow_water')
    164166       
    165         #choose what test to proceed
     167        # Choose what test to proceed
    166168        T=1
    167169
    168170        if T==0:
    169         # fotran output file
    170            
     171            # Fortran output file
    171172            filename = path+sep+'fullokada_SP.txt'
    172         # initial condition of earthquake for multiple source
     173           
     174            # Initial condition of earthquake for multiple source
    173175            x0 = 7000.0
    174176            y0 = 10000.0
     
    183185            NSMAX=1
    184186        elif T==1:
    185         # fotran output file
     187            # Fortran output file
    186188            filename = path+sep+'fullokada_SS.txt'
    187         # initial condition of earthquake for multiple source
     189           
     190            # Initial condition of earthquake for multiple source
    188191            x0 = 7000.0
    189192            y0 = 10000.0
     
    200203        elif T==2:
    201204
    202         # fotran output file
     205            # Fortran output file
    203206            filename = path+sep+'fullokada_MS.txt'
    204         # initial condition of earthquake for multiple source
     207           
     208            # Initial condition of earthquake for multiple source
    205209            x0 = [7000.0,10000.0]
    206210            y0 = [10000.0,7000.0]
     
    217221
    218222
    219         # get output file from original okada fortran script.
    220         # vertical displacement is listed under tmp.
     223        # Get output file from original okada fortran script.
     224        # Vertical displacement is listed under tmp.
    221225        polyline_file=open(filename,'r')
    222226        lines=polyline_file.readlines()
  • anuga_work/development/boxingday08/run_boxingday_polyline.py

    r5547 r5601  
    136136domain.set_minimum_storable_height(0.01)
    137137
    138 domain.tight_slope_limiters = 1
     138domain.tight_slope_limiters = True
    139139domain.set_default_order(2)
    140140print 'domain.tight_slope_limiters', domain.tight_slope_limiters
Note: See TracChangeset for help on using the changeset viewer.