Index: inundation/fit_interpolate/interpolate.py
===================================================================
--- inundation/fit_interpolate/interpolate.py	(revision 2192)
+++ inundation/fit_interpolate/interpolate.py	(revision 2201)
@@ -15,4 +15,5 @@
 * remove points outside the mesh ?(in interpolate_block)?
 * geo-ref (in interpolate_block)
+* add functional interpolate interface - in mesh and points, out interp data 
 """
 
@@ -37,8 +38,7 @@
                  vertex_coordinates,
                  triangles,
-                 #point_coordinates = None,
                  mesh_origin = None,
                  verbose=False,
-                 max_points_per_cell=30):
+                 max_vertices_per_cell=30):
 
 
@@ -49,30 +49,24 @@
 
           vertex_coordinates: List of coordinate pairs [xi, eta] of
-	  points constituting mesh (or a an m x 2 Numeric array)
-          Points may appear multiple times
-          (e.g. if vertices have discontinuities)
+	      points constituting a mesh (or an m x 2 Numeric array)
+              Points may appear multiple times
+              (e.g. if vertices have discontinuities)
 
           triangles: List of 3-tuples (or a Numeric array) of
-          integers representing indices of all vertices in the mesh.
-
-          point_coordinates: List of coordinate pairs [x, y] of
-	  data points (or an nx2 Numeric array)
-	  If point_coordinates is absent, only smoothing matrix will
-	  be built
-
-          alpha: Smoothing parameter
-
-          data_origin and mesh_origin are 3-tuples consisting of
-          UTM zone, easting and northing. If specified
-          point coordinates and vertex coordinates are assumed to be
-          relative to their respective origins.
-
-        """
-        
-        from pyvolution.util import ensure_numeric
-
+              integers representing indices of all vertices in the mesh.
+
+          mesh_origin: 3-tuples consisting of
+              UTM zone, easting and northing.
+              If specified vertex coordinates are assumed to be
+              relative to their respective origins.
+
+          max_vertices_per_cell: Number of vertices in a quad tree cell
+          at which the cell is split into 4.
+
+        """
+        
         # Initialise variabels
-        self.A_can_be_reused = False
-        self.point_coordinates = None
+        self._A_can_be_reused = False
+        self._point_coordinates = None
         
         #Convert input to Numeric arrays
@@ -102,5 +96,5 @@
 
         self.root = build_quadtree(self.mesh,
-                              max_points_per_cell = max_points_per_cell)
+                              max_points_per_cell = max_vertices_per_cell)
         
         
@@ -148,7 +142,5 @@
             #For each data_coordinate point
             if verbose and i%((n+10)/10)==0: print 'Doing %d of %d' %(i, n)
-
             x = point_coordinates[i]
-            
             element_found, sigma0, sigma1, sigma2, k = \
                            search_tree_of_vertices(self.root, self.mesh, x)
@@ -168,5 +160,4 @@
             else:
                 print 'Could not find triangle for point', x 
-                
         return A
 
@@ -281,4 +272,8 @@
               per underlying matrix-matrix multiplication
           point_coordinates: Interpolate mesh data to these positions.
+              List of coordinate pairs [x, y] of
+	      data points (or an nx2 Numeric array)
+	      If point_coordinates is absent, the points inputted last time
+              this method was called are used, if possible.
           start_blocking_len: If the # of points is more or greater than this,
               start blocking 
@@ -290,13 +285,13 @@
         # Can I interpolate, based on previous point_coordinates? 
         if point_coordinates is None:
-            if self.A_can_be_reused is True and \
-            len(self.point_coordinates) < start_blocking_len: 
+            if self._A_can_be_reused is True and \
+            len(self._point_coordinates) < start_blocking_len: 
                 z = self._get_point_data_z(f,
                                            verbose=verbose)
-            elif self.point_coordinates is not None:
+            elif self._point_coordinates is not None:
                 #     if verbose, give warning
                 if verbose:
                     print 'WARNING: Recalculating A matrix, due to blocking.'
-                point_coordinates = self.point_coordinates
+                point_coordinates = self._point_coordinates
             else:
                 #There are no good point_coordinates. import sys; sys.exit()
@@ -305,13 +300,13 @@
             
         if point_coordinates is not None:
-            self.point_coordinates = point_coordinates
+            self._point_coordinates = point_coordinates
             if len(point_coordinates) < start_blocking_len or \
                    start_blocking_len == 0:
-                self.A_can_be_reused = True
+                self._A_can_be_reused = True
                 z = self.interpolate_block(f, point_coordinates,
                                            verbose=verbose)
             else:
                 #Handle blocking
-                self.A_can_be_reused = False
+                self._A_can_be_reused = False
                 start=0
                 z = self.interpolate_block(f, point_coordinates[0:0])
@@ -337,10 +332,10 @@
         """
         if point_coordinates is not None:
-            self.A =self._build_interpolation_matrix_A(point_coordinates,
+            self._A =self._build_interpolation_matrix_A(point_coordinates,
                                                        verbose=verbose)
         return self._get_point_data_z(f)
 
     def _get_point_data_z(self, f, verbose=False):
-        return self.A * f
+        return self._A * f
         
 #-------------------------------------------------------------
Index: inundation/fit_interpolate/search_functions.py
===================================================================
--- inundation/fit_interpolate/search_functions.py	(revision 2192)
+++ inundation/fit_interpolate/search_functions.py	(revision 2201)
@@ -7,19 +7,4 @@
 """
 from Numeric import dot
-
-
-
-import time
-
-from Numeric import zeros, array, Float, Int, dot, transpose, concatenate, \
-     ArrayType, allclose, take
-
-from pyvolution.mesh import Mesh
-from pyvolution.sparse import Sparse, Sparse_CSR
-from pyvolution.cg_solve import conjugate_gradient, VectorShapeError
-from coordinate_transforms.geo_reference import Geo_reference
-from pyvolution.quad import build_quadtree
-from utilities.numerical_tools import ensure_numeric
-from utilities.polygon import inside_polygon
 
 
Index: inundation/fit_interpolate/test_interpolate.py
===================================================================
--- inundation/fit_interpolate/test_interpolate.py	(revision 2192)
+++ inundation/fit_interpolate/test_interpolate.py	(revision 2201)
@@ -67,5 +67,5 @@
         data = [ [4,4] ]
         interp = Interpolate(points, triangles,
-                               max_points_per_cell = 4)
+                               max_vertices_per_cell = 4)
         #print "PDSG - interp.get_A()", interp.get_A()
         answer =  [ [ 0.06666667,  0.46666667,  0.46666667,  0.,
@@ -507,5 +507,5 @@
         #print "answer",answer
         assert allclose(z, answer)
-        assert allclose(interp.A_can_be_reused, True)
+        assert allclose(interp._A_can_be_reused, True)
 
         z = interp.interpolate(f)
@@ -515,11 +515,11 @@
         z = interp.interpolate(f, start_blocking_len=10)
         assert allclose(z, answer)
-        assert allclose(interp.A_can_be_reused, False)
+        assert allclose(interp._A_can_be_reused, False)
 
         #A is recalculated
         z = interp.interpolate(f)
         assert allclose(z, answer)
-        assert allclose(interp.A_can_be_reused, True)
-
+        assert allclose(interp._A_can_be_reused, True)
+        
         interp = Interpolate(vertices, triangles)
         #Must raise an exception, no points specified
