Changeset 4833
- Timestamp:
- Nov 20, 2007, 2:15:58 PM (17 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/interpolate.py
r4820 r4833 512 512 513 513 try: 514 self.interpolation_points = ensure_numeric(interpolation_points)514 self.interpolation_points = interpolation_points = ensure_numeric(interpolation_points) 515 515 except: 516 516 msg = 'Interpolation points must be an N x 2 Numeric array '+\ … … 525 525 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 526 526 from anuga.utilities.polygon import outside_polygon 527 527 528 # Create temporary mesh object from mesh info passed 529 # into this function. 528 530 mesh = Mesh(vertex_coordinates, triangles) 531 mesh_boundary_polygon = mesh.get_boundary_polygon() 532 529 533 530 534 indices = outside_polygon(interpolation_points, 531 mesh.get_boundary_polygon()) 532 535 mesh_boundary_polygon) 533 536 534 537 # Record result 538 #self.mesh_boundary_polygon = mesh_boundary_polygon 535 539 self.indices_outside_mesh = indices 536 540 … … 551 555 #raise Exception(msg) 552 556 553 557 # Plot boundary and interpolation points 558 # FIXME (Jane): Here's a beginning towards plotting 559 #if verbose is True: 560 # from anuga.utilities.polygon import plot_polygons 561 # from pylab import ion, hold, plot, axis, figure, legend, savefig, xlabel, ylabel, title, close 562 # plot_polygons([mesh_boundary_polygon], 563 # verbose=verbose) 564 565 # Add cloud of interpolation points to polygon plot 566 # x = interpolation_points[:,0] 567 # y = interpolation_points[:,1] 568 # plot(x, y, 'b.') 569 # title('Interpolation function: Polygon and interpolation points') 554 570 555 571 -
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r4828 r4833 4747 4747 # domain2) 4748 4748 Bf = Field_boundary(domain1.get_name() + '.' + domain1.format, 4749 domain2 )4749 domain2, verbose=False) 4750 4750 domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf}) 4751 4751 domain2.check_integrity()
Note: See TracChangeset
for help on using the changeset viewer.