Changeset 6252
- Timestamp:
- Jan 31, 2009, 4:02:38 AM (16 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
r6244 r6252 878 878 # a crash in fittng, so disabled it until I can investigate further 879 879 # 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) 881 882 # Use mesh as defined by domain 882 883 # This used to cause problems for caching due to quantities -
anuga_core/source/anuga/fit_interpolate/fit.py
r6244 r6252 267 267 self.mesh_boundary_polygon, 268 268 closed=True, 269 verbose=False) # Too much output if True 270 269 verbose=False) # Suppress output 271 270 272 271 n = len(inside_indices) … … 301 300 AtA[j,k] += sigmas[j]*sigmas[k] 302 301 else: 303 # FIXME(Ole): This is the message referred to in ticket:314304 305 302 flag = is_inside_polygon(x, 306 303 self.mesh_boundary_polygon, 307 304 closed=True, 308 verbose=False) # Too much output if True305 verbose=False) # Suppress output 309 306 msg = 'Point (%f, %f) is not inside mesh boundary' % tuple(x) 310 307 assert flag is True, msg 311 308 309 # FIXME(Ole): This is the message referred to in ticket:314 312 310 minx = min(self.mesh_boundary_polygon[:,0]) 313 311 maxx = max(self.mesh_boundary_polygon[:,0]) … … 317 315 msg += 'Mesh boundary extent is (%.f, %.f), (%.f, %.f)'\ 318 316 % (minx, maxx, miny, maxy) 317 raise RuntimeError, msg 319 318 320 321 raise Exception(msg)322 319 self.AtA = AtA 323 320 -
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r6244 r6252 6544 6544 6545 6545 6546 #---------------------------------------------------------------------- --------6546 #---------------------------------------------------------------------- 6547 6547 # Create domain 6548 #---------------------------------------------------------------------- --------6548 #---------------------------------------------------------------------- 6549 6549 6550 6550 W=303400 … … 6600 6600 6601 6601 6602 #---------------------------------------------------------------------- --------6602 #---------------------------------------------------------------------- 6603 6603 # Fit data point to mesh 6604 #---------------------------------------------------------------------- --------6604 #---------------------------------------------------------------------- 6605 6605 6606 6606 points_file = 'offending_point.pts' 6607 6607 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]], 6609 6610 attributes=[1]) 6610 6611 G.export_points_file(points_file) 6611 6612 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) 6619 6627 6620 6628 6621 6629 if __name__ == "__main__": 6622 6630 6623 suite = unittest.makeSuite(Test_Shallow_Water, 'test')6631 #suite = unittest.makeSuite(Test_Shallow_Water, 'test') 6624 6632 #suite = unittest.makeSuite(Test_Shallow_Water, 'test_rainfall_forcing_with_evolve') 6625 6633 #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') 6627 6635 #suite = unittest.makeSuite(Test_Shallow_Water,'test_tight_slope_limiters') 6628 6636 #suite = unittest.makeSuite(Test_Shallow_Water,'test_inflow_outflow_conservation')
Note: See TracChangeset
for help on using the changeset viewer.