Index: /anuga_core/source/anuga/fit_interpolate/interpolate.py
===================================================================
--- /anuga_core/source/anuga/fit_interpolate/interpolate.py	(revision 4521)
+++ /anuga_core/source/anuga/fit_interpolate/interpolate.py	(revision 4522)
@@ -245,6 +245,6 @@
 	#boundary = self.mesh.get_boundary_polygon()
         #geo = Geospatial_data(boundary)
-        #geo.export_points_file('monkey-boundary.xya')
-        #geo.export_points_file('monkey-boundary.txt')
+        #geo.export_points_file('serial-boundary.xya')
+        #geo.export_points_file('serial-boundary.txt')
         if verbose: print 'Getting indices inside mesh boundary'
         self.inside_poly_indices, self.outside_poly_indices  = \
Index: /anuga_core/source/anuga/fit_interpolate/search_functions.py
===================================================================
--- /anuga_core/source/anuga/fit_interpolate/search_functions.py	(revision 4521)
+++ /anuga_core/source/anuga/fit_interpolate/search_functions.py	(revision 4522)
@@ -100,9 +100,9 @@
             # Sigmas are allowed to get negative within
             # machine precision on some machines (e.g nautilus)
-            epsilon = get_machine_precision()            
-            if sigma0 >= -epsilon and sigma1 >= -epsilon and sigma2 >= -epsilon:
+            epsilon = get_machine_precision() * 2
+            if sigma0 >= -epsilon and sigma1 >= -epsilon and sigma2>= -epsilon:
                 element_found = True
                 break
-
+            
         if element_found is True:
             #Don't look for any other triangle
Index: /anuga_core/source/anuga/fit_interpolate/test_interpolate.py
===================================================================
--- /anuga_core/source/anuga/fit_interpolate/test_interpolate.py	(revision 4521)
+++ /anuga_core/source/anuga/fit_interpolate/test_interpolate.py	(revision 4522)
@@ -387,4 +387,39 @@
         assert allclose(z, answer)
         
+     
+    def test_sigma_epsilon(self):
+        """
+        def test_sigma_epsilon(self):
+            Testing ticket 168. I could not reduce the bug to this small
+            test though.
+        
+        """
+        v0 = [22031.25, 59687.5]
+        v1 = [22500., 60000.]
+        v2 = [22350.31640625, 59716.71484375]
+
+        vertices = [v0, v1, v2]
+        triangles = [ [1,0,2] ]   #bac
+
+        
+        point_coords = [[22050., 59700.]]
+
+        interp = Interpolate(vertices, triangles)
+        f = linear_function(vertices)
+        z = interp.interpolate(f, point_coords)
+        answer = linear_function(point_coords)
+
+        #print "z",z 
+        #print "answer",answer 
+        assert allclose(z, answer)
+
+        
+        z = interp.interpolate(f, point_coords, start_blocking_len = 2)
+        answer = linear_function(point_coords)
+
+        #print "z",z 
+        #print "answer",answer 
+        assert allclose(z, answer)
+
         
     def test_Geospatial_verts(self):
@@ -1643,6 +1678,6 @@
 if __name__ == "__main__":
 
+    #suite = unittest.makeSuite(Test_Interpolate,'test_sigma_epsilon')
     suite = unittest.makeSuite(Test_Interpolate,'test')
-    #suite = unittest.makeSuite(Test_Interpolate,'test_interpolation_function_outside_point')
     runner = unittest.TextTestRunner(verbosity=1)
     runner.run(suite)
Index: /anuga_core/source/anuga/shallow_water/data_manager.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 4521)
+++ /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 4522)
@@ -1939,4 +1939,5 @@
     vertex_points, volumes = remove_lone_verts(vertex_points, volumes)
     #export_mesh_file('monkey.tsh',{'vertices':vertex_points, 'triangles':volumes})
+    #import sys; sys.exit()
     interp = Interpolate(vertex_points, volumes, verbose = verbose)
 
@@ -4560,5 +4561,6 @@
     mesh_dic = mesh.Mesh2MeshList()
 
-    #mesh.export_mesh_file(basename_in + '.tsh')
+    #mesh.export_mesh_file(basename_in + '_168.tsh')
+    #import sys; sys.exit() 
     # These are the times of the mux file
     mux_times = []
