Changeset 4424


Ignore:
Timestamp:
Apr 29, 2007, 3:14:21 PM (17 years ago)
Author:
sexton
Message:

incorporating new test for Polygon_function - used in ICs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/test_polygon.py

    r3514 r4424  
    5757        assert allclose(z, [2,1,0,2])
    5858
     59    def test_polygon_function_csvfile(self):
     60        from os import sep, getenv
     61        #home = getenv('ANUGAHOME')
     62        #p1 = read_polygon(home+sep+'anuga_core'+sep+'source'+sep+'anuga'+sep+'utilities'+sep+'mainland_only.csv')
     63        home = getenv('INUNDATIONHOME')
     64        p1 = read_polygon(home+sep+'data'+sep+'western_australia'+sep+'dampier_tsunami_scenario_2006'+sep+'anuga'+sep+'polygons'+sep+'2007polys'+sep+'mainland_only.csv')
     65        #p1 = read_polygon('mainland_only.csv')
     66       
     67        f = Polygon_function( [(p1, 10.0)] )
     68        z = f([430000,480000], [7720000, 7690000]) #first outside, second inside
     69
     70        assert allclose(z, [0,10])
    5971
    6072    def test_polygon_function_georef(self):
Note: See TracChangeset for help on using the changeset viewer.