Changeset 3019


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

interpolate: adding warnings

Location:
inundation/fit_interpolate
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/fit_interpolate/interpolate.py

    r3018 r3019  
    237237        if verbose and len(self.outside_poly_indices) >0:
    238238            print '\n WARNING: Points outside mesh boundary. \n'
     239        # Since you can block, throw a warning, not an error.
     240        if verbose and 0 == len(self.inside_poly_indices):
     241            print '\n WARNING: No points within the mesh! \n'
     242           
    239243        m = self.mesh.coordinates.shape[0] #Nbr of basis functions (1/vertex)
    240244        n = point_coordinates.shape[0]     #Nbr of data points
  • inundation/fit_interpolate/test_interpolate.py

    r3018 r3019  
    157157
    158158    def test_datapoints_at_vertices(self):
    159         """Test that data points coinciding with vertices yield a diagonal matrix
    160         """
     159        #Test that data points coinciding with vertices yield a diagonal matrix
     160       
    161161
    162162        a = [0.0, 0.0]
     
    177177
    178178    def test_datapoints_on_edge_midpoints(self):
    179         """Try datapoints midway on edges -
    180         each point should affect two matrix entries equally
    181         """
     179        #Try datapoints midway on edges -
     180        #each point should affect two matrix entries equally
     181       
    182182
    183183        a = [0.0, 0.0]
     
    197197
    198198    def test_datapoints_on_edges(self):
    199         """Try datapoints on edges -
    200         each point should affect two matrix entries in proportion
    201         """
     199        #Try datapoints on edges -
     200        #each point should affect two matrix entries in proportion
     201       
    202202
    203203        a = [0.0, 0.0]
     
    219219
    220220    def test_arbitrary_datapoints(self):
    221         """Try arbitrary datapoints
    222         """
     221        #Try arbitrary datapoints
     222       
    223223
    224224        from Numeric import sum
     
    238238
    239239    def test_arbitrary_datapoints_some_outside(self):
    240         """Try arbitrary datapoints one outside the triangle.
    241         That one should be ignored
    242         """
     240        #Try arbitrary datapoints one outside the triangle.
     241        #That one should be ignored
     242       
    243243
    244244        from Numeric import sum
     
    435435       
    436436    def test_interpolate_attributes_to_pointsIII(self):
    437         """Test linear interpolation of known values at vertices to
    438         new points inside a triangle
    439         """
     437        #Test linear interpolation of known values at vertices to
     438        #new points inside a triangle
     439       
    440440        a = [0.0, 0.0]
    441441        b = [0.0, 5.0]
     
    496496       
    497497    def test_interpolate_point_outside_of_mesh(self):
    498         """Test linear interpolation of known values at vertices to
    499         new points inside a triangle
    500         """
     498        #Test linear interpolation of known values at vertices to
     499        #new points inside a triangle
     500       
    501501        a = [0.0, 0.0]
    502502        b = [0.0, 5.0]
     
    11451145
    11461146    def test_interpolation_function_time(self):
    1147         """Test a long time series with an error in it (this did cause an
    1148         error once)
    1149         """
     1147        #Test a long time series with an error in it (this did cause an
     1148        #error once)
     1149       
    11501150
    11511151        time = array(\
Note: See TracChangeset for help on using the changeset viewer.