Changeset 4396 for anuga_core/source/anuga
- Timestamp:
- Apr 18, 2007, 11:48:41 AM (18 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/test_domain.py
r4393 r4396 491 491 'set region failed') 492 492 493 494 def test_track_speeds(self):495 """496 get values based on triangle lists.497 """498 from mesh_factory import rectangular499 from shallow_water import Domain500 from Numeric import zeros, Float501 502 #Create basic mesh503 points, vertices, boundary = rectangular(1, 3)504 505 #Create shallow water domain506 domain = Domain(points, vertices, boundary)507 domain.write_time(track_speeds=True)508 493 509 494 … … 607 592 #------------------------------------------------------------- 608 593 if __name__ == "__main__": 609 # suite = unittest.makeSuite(Test_Domain,'test') 610 suite = unittest.makeSuite(Test_Domain,'test_track_speeds') 594 suite = unittest.makeSuite(Test_Domain,'test') 611 595 runner = unittest.TextTestRunner() 612 596 runner.run(suite) -
anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
r4392 r4396 329 329 # each timestep for each quantity 330 330 quantities = {} 331 if verbose:332 print 'before interpolation function1'333 331 for i, name in enumerate(quantity_names): 334 332 quantities[name] = fid.variables[name][:] 335 333 fid.close() 336 334 337 if verbose: 338 print 'before interpolation function2' 339 335 340 336 #from least_squares import Interpolation_function 341 337 from anuga.fit_interpolate.interpolate import Interpolation_function … … 344 340 vertex_coordinates = triangles = interpolation_points = None 345 341 346 if verbose:347 print 'before interpolation function3'348 342 349 343 # Return Interpolation_function instance as well as -
anuga_core/source/anuga/fit_interpolate/interpolate.py
r4394 r4396 433 433 import types 434 434 435 if verbose: 436 print 'started Interpolation function' 437 435 438 436 # Check temporal info 439 437 time = ensure_numeric(time) … … 456 454 quantity_names = quantities.keys() 457 455 458 if verbose:459 print 'started Interpolation function1'460 456 461 457 # Check spatial info … … 475 471 if len(quantities[name].shape) == 2: 476 472 quantities[name] = array(quantities[name][::time_thinning,:]) 477 478 if verbose:479 print 'started Interpolation function2'480 473 481 474 # Save for use with statistics … … 493 486 self.precomputed_values = {} 494 487 495 if verbose: 496 print 'started Interpolation function3' 497 498 488 499 489 # Precomputed spatial interpolation if requested 500 490 if interpolation_points is not None: … … 514 504 m = len(self.interpolation_points) 515 505 p = len(self.time) 516 517 if verbose: 518 print 'started Interpolation function4' 519 506 520 507 for name in quantity_names: 521 508 self.precomputed_values[name] = zeros((p, m), Float)
Note: See TracChangeset
for help on using the changeset viewer.