|
|
@ -31,13 +31,13 @@
|
|
|
|
! File: imsrx.f90
|
|
|
|
! File: imsrx.f90
|
|
|
|
! Subroutine:
|
|
|
|
! Subroutine:
|
|
|
|
! Parameters:
|
|
|
|
! Parameters:
|
|
|
|
subroutine imsrx(n,x,indx)
|
|
|
|
subroutine imsrx(n,x,indx,flag)
|
|
|
|
integer :: n
|
|
|
|
integer :: n, flag
|
|
|
|
integer :: x(n)
|
|
|
|
integer :: x(n)
|
|
|
|
integer :: indx(n)
|
|
|
|
integer :: indx(n)
|
|
|
|
|
|
|
|
|
|
|
|
integer, allocatable :: iaux(:)
|
|
|
|
integer, allocatable :: iaux(:)
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iswap, iret, info, lp, k
|
|
|
|
integer :: iswap, iret, info, lp, k
|
|
|
|
integer :: lswap, ixswap
|
|
|
|
integer :: lswap, ixswap
|
|
|
|
|
|
|
|
|
|
|
@ -45,10 +45,12 @@ subroutine imsrx(n,x,indx)
|
|
|
|
write(0,*) 'Error: IMSRX: N<0'
|
|
|
|
write(0,*) 'Error: IMSRX: N<0'
|
|
|
|
return
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if (n==0) return
|
|
|
|
if (n==0) return
|
|
|
|
if (n==1) then
|
|
|
|
if (n==1) then
|
|
|
|
indx(1) = 1
|
|
|
|
if (flag == 0) then
|
|
|
|
|
|
|
|
indx(1) = 1
|
|
|
|
|
|
|
|
endif
|
|
|
|
return
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
@ -58,12 +60,13 @@ subroutine imsrx(n,x,indx)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
do k=1,n
|
|
|
|
if (flag == 0) then
|
|
|
|
indx(k) = k
|
|
|
|
do k=1,n
|
|
|
|
enddo
|
|
|
|
indx(k) = k
|
|
|
|
|
|
|
|
enddo
|
|
|
|
|
|
|
|
end if
|
|
|
|
call mrgsrt(n,x,iaux,iret)
|
|
|
|
call mrgsrt(n,x,iaux,iret)
|
|
|
|
|
|
|
|
|
|
|
|
if (iret /= 1) then
|
|
|
|
if (iret /= 1) then
|
|
|
|
lp = iaux(0)
|
|
|
|
lp = iaux(0)
|
|
|
|
k = 1
|
|
|
|
k = 1
|
|
|
|