sint_nd_forward Subroutine

public subroutine sint_nd_forward(func, N, lot)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: N
integer, intent(in) :: lot

Calls

proc~~sint_nd_forward~2~~CallsGraph proc~sint_nd_forward~2 sint_nd_forward sintmf sintmf proc~sint_nd_forward~2->sintmf sintmi sintmi proc~sint_nd_forward~2->sintmi

Called by

proc~~sint_nd_forward~2~~CalledByGraph proc~sint_nd_forward~2 sint_nd_forward interface~sinftn~2 sinftn interface~sinftn~2->proc~sint_nd_forward~2

Source Code

  subroutine sint_nd_forward(func,n,lot)
    real(8),dimension(:),intent(inout) :: func
    integer,intent(in)                 :: N,lot
    real(8),dimension(:),allocatable   :: wsave,work
    integer                            :: L,lenwrk,lensav,lenr,inc,ier,jump
    L=size(func)
    if(mod(N*lot,L)/=0)stop "cost_Nd_forward: incommensurate values of parameters." 
    !
    lenr   = N*lot
    lenwrk = lot*2*(N+2)
    lensav = N/2 + N  + int(log(dble(N))/log(2.d0)) + 4
    jump   = N
    inc    = 1
    allocate(wsave(lensav),work(lenwrk))
    call sintmi(N,wsave,lensav,ier)
    if(ier==2)stop "sint_Nd_forward: LENSAV not big enough"
    if(ier==20)stop "sint_Nd_forward: error returned by lower level routine"
    call sintmf(lot,jump,N,inc,func,lenr,wsave,lensav,work,lenwrk,ier)
    deallocate(wsave,work)
    select case(ier)
    case (0)
       return
    case (1)
       stop "sint_Nd_forward: LENR not big enough"
    case (2)
       stop "sint_Nd_forward: LENSAV not big enough"
    case (3)
       stop "sint_Nd_forward: LENWRK not big enough"
    case (4)
       stop "sint_Nd_forward: INC,JUMP,N,LOT are not consistent" 
    case (20)
       stop "sint_Nd_forward: input error returned by lower level routine"
    end select
  end subroutine sint_nd_forward