CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   help for special function (http://www.cfd-online.com/Forums/main/6408-help-special-function.html)

YANG August 3, 2003 05:21

help for special function
 
hello every one,

I got a code developed originally for Cray computer, and a special function routine named as isrcheq(n,w,1,xmin) is inclued in the code. I'd like to know the logical meaning of this funtion routine, if some one here has the whole description of it, please let me share it.

thanks in advance

YANG

andy August 3, 2003 06:35

Re: help for special function
 
Try google - it looks like the first hit.

Answer Man. August 3, 2003 07:36

Re: help for special function
 
Hi,

Try this page:

http://decwww.epfl.ch/docs/CXML400/i....3sciport.html

The meaning is given as follows along with some programming information.

Searches a vector for the first element matching a target

Is it right? August 4, 2003 10:12

Re: help for special function
 
Is it right ?

CODE:

function isrcheq(n, x, incx, a)

integer n, incx

dimension x(n)

if(n.le.0) then

isrcheq = 0

else

isrcheq = n+1

endif

do i=1,n

if( abs( x(i)-a ) .le. 1.e-20) then

isrcheq = min(isrcheq,i)

endif

enddo

end


All times are GMT -4. The time now is 05:58.