git push -u origin main
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
SUBROUTINE locate(xx,n,x,j,nxdim)
|
||||
c =================================
|
||||
c
|
||||
IMPLICIT REAL*8(A-H,O-Z)
|
||||
dimension xx(nxdim)
|
||||
c
|
||||
jl=0
|
||||
ju=n+1
|
||||
10 if(ju-jl.gt.1)then
|
||||
jm=(ju+jl)/2
|
||||
if((xx(n).ge.xx(1)).eqv.(x.ge.xx(jm)))then
|
||||
jl=jm
|
||||
else
|
||||
ju=jm
|
||||
endif
|
||||
goto 10
|
||||
endif
|
||||
if(x.eq.xx(1)) then
|
||||
j=1
|
||||
else if(x.eq.xx(n)) then
|
||||
j=n-1
|
||||
else
|
||||
j=jl
|
||||
endif
|
||||
return
|
||||
END
|
||||
Reference in New Issue
Block a user