Changeset 20502


Ignore:
Timestamp:
04/13/16 08:26:45 (9 years ago)
Author:
Mathieu Morlighem
Message:

CHG: speedint up flowlines

Location:
issm/trunk-jpl/src/m/exp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/exp/downstreamflowlines.m

    r9734 r20502  
    3838end
    3939
    40 %check seed points
    41 tria=TriaSearch(index,x,y,x0,y0);
     40%Create triangulation once for all and check seed points
     41trep = triangulation(index,x,y);
     42tria = pointLocation(trep,[x0 y0]);
    4243pos=find(isnan(tria));
    4344x0(pos)=[];
     
    7071        %find current triangle
    7172        queue=find(~done);
    72         tria=TriaSearch(index,x,y,X(queue),Y(queue));
     73        tria = pointLocation(trep,[X(queue),Y(queue)]);
    7374
    7475        %check that the point is actually inside a triangle of the mesh
  • issm/trunk-jpl/src/m/exp/flowlines.m

    r14440 r20502  
    3737precision=1; %division of each segment (higer precision increases number of segments)
    3838
    39 %check seed points
    40 tria=TriaSearch(index,x,y,x0,y0);
    41 %tria=tsearch(x,y,index,x0,y0);
     39%Create triangulation once for all and check seed points
     40trep = triangulation(index,x,y);
     41tria = pointLocation(trep,[x0 y0]);
    4242pos=find(isnan(tria));
    4343x0(pos)=[];
     
    7070        %find current triangle
    7171        queue=find(~done);
    72         tria=TriaSearch(index,x,y,X(queue),Y(queue));
    73         %tria=tsearch(x,y,index,X(queue),Y(queue));
     72        tria = pointLocation(trep,[X(queue),Y(queue)]);
    7473
    7574        %check that the point is actually inside a triangle of the mesh
     
    121120        %find current triangle
    122121        queue=find(~done);
    123         tria=TriaSearch(index,x,y,X(queue),Y(queue));
    124         %tria=tsearch(x,y,index,X(queue),Y(queue));
     122        tria = pointLocation(trep,[X(queue),Y(queue)]);
    125123
    126124        %check that the point is actually inside a triangle of the mesh
Note: See TracChangeset for help on using the changeset viewer.