Changeset 4833


Ignore:
Timestamp:
Nov 20, 2007, 2:15:58 PM (16 years ago)
Author:
ole
Message:

Suggestion towards ticket:217

Location:
anuga_core/source/anuga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/fit_interpolate/interpolate.py

    r4820 r4833  
    512512           
    513513            try:
    514                 self.interpolation_points = ensure_numeric(interpolation_points)
     514                self.interpolation_points = interpolation_points = ensure_numeric(interpolation_points)
    515515            except:
    516516                msg = 'Interpolation points must be an N x 2 Numeric array '+\
     
    525525            from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    526526            from anuga.utilities.polygon import outside_polygon           
    527            
     527
     528            # Create temporary mesh object from mesh info passed
     529            # into this function.
    528530            mesh = Mesh(vertex_coordinates, triangles)
     531            mesh_boundary_polygon = mesh.get_boundary_polygon()
     532
    529533           
    530534            indices = outside_polygon(interpolation_points,
    531                                       mesh.get_boundary_polygon())
    532 
     535                                      mesh_boundary_polygon)
    533536
    534537            # Record result
     538            #self.mesh_boundary_polygon = mesh_boundary_polygon
    535539            self.indices_outside_mesh = indices
    536540
     
    551555                #raise Exception(msg)
    552556
    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')
    554570           
    555571
  • anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py

    r4828 r4833  
    47474747        #                              domain2)
    47484748        Bf = Field_boundary(domain1.get_name() + '.' + domain1.format,
    4749                             domain2)       
     4749                            domain2, verbose=False)       
    47504750        domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf})
    47514751        domain2.check_integrity()
Note: See TracChangeset for help on using the changeset viewer.