File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1616% - 'precision': division of each segment (higer precision increases number of segments, default: 1)
1717% - 'downstream':flow line upstream of the seed points (default: 1)
1818% - 'upstream': flow line upstream of the seed points (default: 1)
19+ % - 'cutoff': velocity threshold to stop propagating flowlines (default: 0)
1920
2021% check input
2122if (length(x )~=length(y ) | length(x )~=length(u ) | length(x )~=length(v )),
3435precision = getfieldvalue(options ,' precision' ,1 );
3536downstream = getfieldvalue(options ,' downstream' ,1 );
3637upstream = getfieldvalue(options ,' upstream' ,1 );
38+ cutoff = getfieldvalue(options ,' cutoff' , 0.0 );
39+ cutoff = max(cutoff , 0.0 );
3740
3841% Create triangulation once for all and check seed points
3942trep = triangulation(index ,x ,y );
98101 counter= counter + 1 ;
99102
100103 % remove stagnant point
101- done(queue(find(ut == 0 & vt == 0 )))=1 ;
104+ done(queue(find(( ut == 0 & vt == 0 ) | ( normv <= cutoff ) )))=1 ;
102105
103106 % build next point
104107 for i= 1 : length(queue )
150153 counter= counter + 1 ;
151154
152155 % remove stagnant point
153- done(queue(find(ut == 0 & vt == 0 )))=1 ;
156+ done(queue(find(( ut == 0 & vt == 0 ) | ( normv <= cutoff ) )))=1 ;
154157
155158 % build next point
156159 for i= 1 : length(queue )
You can’t perform that action at this time.
0 commit comments