Changeset 5392


Ignore:
Timestamp:
08/19/10 08:22:11 (15 years ago)
Author:
Eric.Larour
Message:

Replaced tsearch by TriaSearch in flowlines.
New clicktoflowline routine, to create exp file directly by clicking.

Location:
issm/trunk/src/m/utils/Exp
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/utils/Exp/flowlines.m

    r5357 r5392  
    3939%check seed points
    4040tria=TriaSearch(index,x,y,x0,y0);
    41 if isnan(tria),
    42         error('flowlines error message: seed point is not inside mesh!');
    43 end
     41pos=find(isnan(tria));
     42x0(pos)=[];
     43y0(pos)=[];
    4444
    4545%initialize other variables
     
    6969        %find current triangle
    7070        queue=find(~done);
    71         tria=tsearch(x,y,index,X(queue),Y(queue));
     71        tria=TriaSearch(index,x,y,X(queue),Y(queue));
    7272
    7373        %check that the point is actually inside a triangle of the mesh
     
    8181        tria(listnan)=[];
    8282        queue(listnan)=[];
     83
     84        if isempty(tria),
     85                break;
     86        end
    8387
    8488        %velocity of the current triangle and norm it
     
    114118        %find current triangle
    115119        queue=find(~done);
    116         tria=tsearch(x,y,index,X(queue),Y(queue));
     120        tria=TriaSearch(index,x,y,X(queue),Y(queue));
    117121
    118122        %check that the point is actually inside a triangle of the mesh
     
    126130        tria(listnan)=[];
    127131        queue(listnan)=[];
     132
     133        if isempty(tria),
     134                break;
     135        end
    128136
    129137        %velocity of the current triangle and norm it
Note: See TracChangeset for help on using the changeset viewer.