Changeset 9722
- Timestamp:
- Apr 23, 2015, 8:21:24 PM (9 years ago)
- Location:
- trunk/anuga_core/anuga
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/anuga/__init__.py
- Property svn:keywords changed from Revision to Date Revision
r9721 r9722 25 25 __svn_revision__ = filter(str.isdigit, "$Revision$") 26 26 27 __svn_revision_date__ = "$Date$") 27 28 28 29 -
trunk/anuga_core/anuga/geometry/tests/test_polygon.py
r9720 r9722 1174 1174 self.assertFalse(status!=2, 'Expected status 2, got status=%s, value=%s' % 1175 1175 (str(status), str(value))) 1176 1177 1176 #print line0, line1, value 1177 #print type(line0), type(value) 1178 1178 self.assertTrue(num.allclose(value, line0)) 1179 1179 … … 1992 1992 1993 1993 if __name__ == "__main__": 1994 suite = unittest.makeSuite(Test_Polygon,'test _intersection_bug_20081110_TR_BL')1994 suite = unittest.makeSuite(Test_Polygon,'test') #_intersection_bug_20081110_TR_BL') 1995 1995 runner = unittest.TextTestRunner() 1996 1996 runner.run(suite) -
trunk/anuga_core/anuga/utilities/quantity_setting_functions.py
r9719 r9722 342 342 pi_path = su.getRasterExtent(fi,asPolygon=True) 343 343 344 if verbose: 345 print 'Extracting extent from raster: ', fi 346 print 'Extent: ', pi_path 347 344 348 elif( (type(pi) == str) and os.path.isfile(pi) ): 345 349 # pi is a file … … 504 508 ' nan_interpolation_region_polygon' 505 509 510 if len(points_to_reinterpolate) > 0: 511 msg = 'WARNING: nan interpolation is being applied. This ',\ 512 'should be done in serial prior to distributing the ',\ 513 'domain, as there is no parallel communication ',\ 514 'implemented yet [so parallel results might depend on ',\ 515 'the number of processes]' 516 if verbose: 517 print msg 518 519 506 520 # Find the interpolation points = points not needing reinterpolation 507 521 ip = x*0 + 1 … … 514 528 515 529 if len(nan_ip) > 0: 516 print len(nan_ip), ' points outside the nan_interpolation_region_polygon have nan values' 517 print 'This should not happen' 530 print 'There are ', len(nan_ip), ' points outside the ',\ 531 'nan_interpolation_region_polygon have nan values.' 532 print 'The user should ensure this does not happen.' 518 533 print 'The points have the following coordinates:' 519 print xy_array_trans[ip,:] 520 msg = "There are nan points outside of nan_interpolation_region_polygon, even after all fall-through's" 534 print xy_array_trans[ip[nan_ip],:] 535 msg = "There are nan points outside of " +\ 536 "nan_interpolation_region_polygon, even after all " +\ 537 "fall-through's" 521 538 raise Exception(msg) 522 539 -
trunk/anuga_core/anuga/utilities/tests/test_quantity_setting_functions.py
r9679 r9722 192 192 F=qs.composite_quantity_setting_function( 193 193 [[trenchPoly, -1000.], ['Extent', 'PointData_ElevTest.tif']], 194 domain) 194 domain, 195 verbose=False) 195 196 196 197 # Points where we test the function … … 216 217 [[trenchPoly, -1000.], ['Extent', 'PointData_ElevTest.tif']], 217 218 domain, 218 clip_range = [[-500., 1.0e+100], [-1.0e+100, 1.0e+100]]) 219 clip_range = [[-500., 1.0e+100], [-1.0e+100, 1.0e+100]], 220 verbose=False) 219 221 220 222 # Points where we test the function … … 241 243 F = qs.composite_quantity_setting_function( 242 244 [[trenchPoly, f0], ['Extent', 'PointData_ElevTest.tif']], 243 domain) 245 domain, 246 verbose=False) 244 247 fitted = F(testPts_X,testPts_Y) 245 248 # Now the fitted value in the trench should be determined by f0 … … 256 259 F = qs.composite_quantity_setting_function( 257 260 [['All', f0 ], [None, 'PointData_ElevTest.tif']], 258 domain) 261 domain, 262 verbose=False) 259 263 fitted=F(testPts_X,testPts_Y) 260 264 # Now the fitted value in the trench should be determined by f0 … … 267 271 F=qs.composite_quantity_setting_function( 268 272 [['All', f0], ['All', 'PointData_ElevTest.tif']], 269 domain) 273 domain, 274 verbose=False) 270 275 # Need to call it to get the error 271 276 F(numpy.array([3.]), numpy.array([3.])) … … 279 284 [[trenchPoly, f0], ['All', 'PointData_ElevTest.tif']], 280 285 domain, 281 clip_range = [[ -500., -1000.], [-1.0e+100, 1.0e+100]]) 286 clip_range = [[ -500., -1000.], [-1.0e+100, 1.0e+100]], 287 verbose=False) 282 288 return 283 289 self.assertRaises(Exception, lambda: should_fail_1())
Note: See TracChangeset
for help on using the changeset viewer.