Changeset 6488


Ignore:
Timestamp:
Mar 11, 2009, 1:52:20 PM (16 years ago)
Author:
ole
Message:

Added new test that revealed another fitting problem where
matrix AtA isn't being built. This test was derived from
the JJKelly example by Petar Milevsky.

The test has been disabled with a preciding X

See ticket:314 for more info

Location:
anuga_core/source/anuga
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/fit_interpolate/fit.py

    r6405 r6488  
    372372                self.build_fit_subset(points, z, verbose=verbose)
    373373
    374                 msg = 'Matrix AtA was not built'
    375                 assert self.AtA is not None, msg
     374                # FIXME(Ole): I thought this test would make sense here
     375                # See test_fitting_example_that_crashed_2 in test_shallow_water_domain.py
     376                # Committed 11 March 2009
     377                #msg = 'Matrix AtA was not built'
     378                #assert self.AtA is not None, msg
    376379               
    377380                #print 'Matrix was built OK'
  • anuga_core/source/anuga/geospatial_data/test_geospatial_data.py

    r6153 r6488  
    14581458        #print "data_points",data_points     
    14591459        new_points = ensure_absolute(data_points,
    1460                                              geo_reference=mesh_origin)
     1460                                     geo_reference=mesh_origin)
    14611461        #print "new_points",new_points
    14621462        #print "ab_points",ab_points
     
    14681468        data_points = geo.change_points_geo_ref(ab_points)   
    14691469        new_points = ensure_absolute(data_points,
    1470                                              geo_reference=geo)
     1470                                     geo_reference=geo)
    14711471        #print "new_points",new_points
    14721472        #print "ab_points",ab_points
  • anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py

    r6258 r6488  
    65276527        os.remove(ptsfile)
    65286528
    6529     def test_fitting_example_that_crashed(self):
    6530         """test_fitting_example_that_crashed
     6529    def test_fitting_example_that_crashed_1(self):
     6530        """test_fitting_example_that_crashed_1
    65316531       
    65326532        This unit test has been derived from a real world example (the Towradgi '98 rainstorm simulation).
     
    66406640        #    os.remove(meshname)
    66416641        #    os.remove(points_file)
     6642       
     6643       
     6644    def Xtest_fitting_example_that_crashed_2(self):
     6645        """test_fitting_example_that_crashed_2
     6646       
     6647        This unit test has been derived from a real world example
     6648        (the JJKelly study, by Petar Milevski).
     6649       
     6650        It shows a condition where set_quantity crashes due to AtA
     6651        not being built properly
     6652       
     6653        See ticket:314
     6654        """
     6655
     6656        verbose = False       
     6657
     6658        from os.path import join
     6659        from anuga.shallow_water import Domain
     6660        from anuga.pmesh.mesh_interface import create_mesh_from_regions
     6661        from anuga.geospatial_data import Geospatial_data
     6662
     6663        meshname = 'test_mesh.msh'
     6664        W=304180
     6665        S=6185270
     6666        E=307650
     6667        N=6189040
     6668        maximum_triangle_area = 1000000
     6669
     6670
     6671        bounding_polygon = [[W, S], [E, S], [E, N], [W, N]]
     6672
     6673        create_mesh_from_regions(bounding_polygon,
     6674                                 boundary_tags={'south': [0],
     6675                                                'east': [1],
     6676                                                'north': [2],
     6677                                                'west': [3]},
     6678                                 maximum_triangle_area=maximum_triangle_area,
     6679                                 filename=meshname,
     6680                                 use_cache=False,
     6681                                 verbose=True)
     6682
     6683        domain = Domain(meshname, use_cache=True, verbose=True)
     6684       
     6685        # Large test set revealed one problem
     6686        domain.set_quantity('elevation',
     6687                            filename='test_points_large.csv', 
     6688                            use_cache=False,
     6689                            verbose=True)
     6690                           
     6691                           
     6692        # Small test set revealed another problem
     6693        domain.set_quantity('elevation',
     6694                            filename='test_points_small.csv',
     6695                            use_cache=False,
     6696                            verbose=True)                           
     6697                   
     6698       
    66426699
    66436700       
     
    66476704    #suite = unittest.makeSuite(Test_Shallow_Water, 'test_rainfall_forcing_with_evolve')
    66486705    #suite = unittest.makeSuite(Test_Shallow_Water,'test_get_energy_through_cross_section_with_g')   
    6649     suite = unittest.makeSuite(Test_Shallow_Water,'test_fitting_example_that_crashed')   
     6706    suite = unittest.makeSuite(Test_Shallow_Water,'test_fitting_example_that_crashed_2')   
    66506707    #suite = unittest.makeSuite(Test_Shallow_Water,'test_tight_slope_limiters')
    66516708    #suite = unittest.makeSuite(Test_Shallow_Water,'test_inflow_outflow_conservation')
Note: See TracChangeset for help on using the changeset viewer.