Index: /issm/trunk-jpl/src/m/exp/downstreamflowlines.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/downstreamflowlines.m	(revision 20501)
+++ /issm/trunk-jpl/src/m/exp/downstreamflowlines.m	(revision 20502)
@@ -38,6 +38,7 @@
 end
 
-%check seed points
-tria=TriaSearch(index,x,y,x0,y0);
+%Create triangulation once for all and check seed points
+trep = triangulation(index,x,y);
+tria = pointLocation(trep,[x0 y0]);
 pos=find(isnan(tria));
 x0(pos)=[];
@@ -70,5 +71,5 @@
 	%find current triangle
 	queue=find(~done);
-	tria=TriaSearch(index,x,y,X(queue),Y(queue));
+	tria = pointLocation(trep,[X(queue),Y(queue)]);
 
 	%check that the point is actually inside a triangle of the mesh
Index: /issm/trunk-jpl/src/m/exp/flowlines.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/flowlines.m	(revision 20501)
+++ /issm/trunk-jpl/src/m/exp/flowlines.m	(revision 20502)
@@ -37,7 +37,7 @@
 precision=1; %division of each segment (higer precision increases number of segments)
 
-%check seed points
-tria=TriaSearch(index,x,y,x0,y0);
-%tria=tsearch(x,y,index,x0,y0);
+%Create triangulation once for all and check seed points
+trep = triangulation(index,x,y);
+tria = pointLocation(trep,[x0 y0]);
 pos=find(isnan(tria));
 x0(pos)=[];
@@ -70,6 +70,5 @@
 	%find current triangle
 	queue=find(~done);
-	tria=TriaSearch(index,x,y,X(queue),Y(queue));
-	%tria=tsearch(x,y,index,X(queue),Y(queue));
+	tria = pointLocation(trep,[X(queue),Y(queue)]);
 
 	%check that the point is actually inside a triangle of the mesh
@@ -121,6 +120,5 @@
 	%find current triangle
 	queue=find(~done);
-	tria=TriaSearch(index,x,y,X(queue),Y(queue));
-	%tria=tsearch(x,y,index,X(queue),Y(queue));
+	tria = pointLocation(trep,[X(queue),Y(queue)]);
 
 	%check that the point is actually inside a triangle of the mesh
