Changeset 3018


Ignore:
Timestamp:
May 30, 2006, 2:48:18 PM (18 years ago)
Author:
duncan
Message:

interpolate: Warning message if points are outside the mesh

Location:
inundation/fit_interpolate
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/fit_interpolate/interpolate.py

    r2884 r3018  
    235235        #print "self.outside_poly_indices",self.outside_poly_indices
    236236        #Build n x m interpolation matrix
     237        if verbose and len(self.outside_poly_indices) >0:
     238            print '\n WARNING: Points outside mesh boundary. \n'
    237239        m = self.mesh.coordinates.shape[0] #Nbr of basis functions (1/vertex)
    238240        n = point_coordinates.shape[0]     #Nbr of data points
  • inundation/fit_interpolate/test_interpolate.py

    r2995 r3018  
    486486        #print "***********"
    487487
    488         #Should an error message be returned if points are outside
    489         # of the mesh? Not currently. 
    490 
    491488        assert allclose(z, answer)
    492489
     
    523520              [10., 15., 15., -5.]]     # (5,5)
    524521
    525         z = interp.interpolate(f, point_coords)
     522        z = interp.interpolate(f, point_coords) #, verbose=True)
    526523        answer = array([ [INF, INF, INF, INF]]) # (-1,-1)
    527524
     
    532529
    533530        #Should an error message be returned if points are outside
    534         # of the mesh? Not currently. 
     531        # of the mesh?
     532        # A warning message is printed, if verbose is on.
    535533
    536534        for i in range(4):
Note: See TracChangeset for help on using the changeset viewer.