Changeset 6252


Ignore:
Timestamp:
Jan 31, 2009, 4:02:38 AM (15 years ago)
Author:
ole
Message:

Cleanup and comments in regard to ticket:314

Location:
anuga_core/source/anuga
Files:
3 edited

Legend:

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

    r6244 r6252  
    878878        # a crash in fittng, so disabled it until I can investigate further
    879879        # Sorry. 23 Jan 2009. Logged as ticket:314
    880         if False:
     880        #if True: # Test will fail (31 Jan 2009)
     881        if False: # Test will pass (31 Jan 2009)
    881882            # Use mesh as defined by domain
    882883            # This used to cause problems for caching due to quantities
  • anuga_core/source/anuga/fit_interpolate/fit.py

    r6244 r6252  
    267267                                        self.mesh_boundary_polygon,
    268268                                        closed=True,
    269                                         verbose=False) # Too much output if True
    270 
     269                                        verbose=False) # Suppress output
    271270       
    272271        n = len(inside_indices)
     
    301300                        AtA[j,k] += sigmas[j]*sigmas[k]
    302301            else:
    303                 # FIXME(Ole): This is the message referred to in ticket:314
    304                
    305302                flag = is_inside_polygon(x,
    306303                                         self.mesh_boundary_polygon,
    307304                                         closed=True,
    308                                          verbose=False) # Too much output if True               
     305                                         verbose=False) # Suppress output
    309306                msg = 'Point (%f, %f) is not inside mesh boundary' % tuple(x)
    310307                assert flag is True, msg               
    311308               
     309                # FIXME(Ole): This is the message referred to in ticket:314
    312310                minx = min(self.mesh_boundary_polygon[:,0])
    313311                maxx = max(self.mesh_boundary_polygon[:,0])               
     
    317315                msg += 'Mesh boundary extent is (%.f, %.f), (%.f, %.f)'\
    318316                    % (minx, maxx, miny, maxy)
     317                raise RuntimeError, msg
    319318               
    320 
    321                 raise Exception(msg)
    322319            self.AtA = AtA
    323320
  • anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py

    r6244 r6252  
    65446544
    65456545
    6546         #------------------------------------------------------------------------------
     6546        #----------------------------------------------------------------------
    65476547        # Create domain
    6548         #------------------------------------------------------------------------------
     6548        #----------------------------------------------------------------------
    65496549
    65506550        W=303400
     
    66006600
    66016601
    6602         #------------------------------------------------------------------------------
     6602        #----------------------------------------------------------------------
    66036603        # Fit data point to mesh
    6604         #------------------------------------------------------------------------------
     6604        #----------------------------------------------------------------------
    66056605
    66066606        points_file = 'offending_point.pts'
    66076607
    6608         G=Geospatial_data(data_points=[[306953.344, 6194461.5]], # Offending point
     6608        # Offending point
     6609        G=Geospatial_data(data_points=[[306953.344, 6194461.5]],
    66096610                          attributes=[1])
    66106611        G.export_points_file(points_file)
    66116612
    6612         domain.set_quantity('elevation',
    6613                             filename=points_file,
    6614                             use_cache=False,
    6615                             verbose=verbose,
    6616                             alpha=0.01)
    6617 
    6618        
     6613       
     6614        try:
     6615            domain.set_quantity('elevation',
     6616                                filename=points_file,
     6617                                use_cache=False,
     6618                                verbose=verbose,
     6619                                alpha=0.01)
     6620        except RuntimeError, e:
     6621            msg = 'Test failed: %s' % str(e)
     6622            raise Exception, msg
     6623        finally:
     6624            # Cleanup regardless
     6625            os.remove(meshname)
     6626            os.remove(points_file)
    66196627
    66206628       
    66216629if __name__ == "__main__":
    66226630
    6623     suite = unittest.makeSuite(Test_Shallow_Water, 'test')
     6631    #suite = unittest.makeSuite(Test_Shallow_Water, 'test')
    66246632    #suite = unittest.makeSuite(Test_Shallow_Water, 'test_rainfall_forcing_with_evolve')
    66256633    #suite = unittest.makeSuite(Test_Shallow_Water,'test_get_energy_through_cross_section_with_g')   
    6626     #suite = unittest.makeSuite(Test_Shallow_Water,'test_fitting_using_shallow_water_domain')   
     6634    suite = unittest.makeSuite(Test_Shallow_Water,'test_fitting_example_that_crashed')   
    66276635    #suite = unittest.makeSuite(Test_Shallow_Water,'test_tight_slope_limiters')
    66286636    #suite = unittest.makeSuite(Test_Shallow_Water,'test_inflow_outflow_conservation')
Note: See TracChangeset for help on using the changeset viewer.