rfft_nd_backward Subroutine

public subroutine rfft_nd_backward(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~~rfft_nd_backward~~CallsGraph proc~rfft_nd_backward rfft_nd_backward rfftmb rfftmb proc~rfft_nd_backward->rfftmb rfftmi rfftmi proc~rfft_nd_backward->rfftmi

Called by

proc~~rfft_nd_backward~~CalledByGraph proc~rfft_nd_backward rfft_nd_backward interface~ifftn ifftn interface~ifftn->proc~rfft_nd_backward

Source Code

  subroutine rfft_nd_backward(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,ier,inc,jump
    L=size(func)
    if(mod(N*lot,L)/=0)stop "rfft_Nd_backward: incommensurate values of parameters." 
    !
    lenr   = N*lot
    lenwrk = N*lot
    lensav = N  + int(log(dble(N))/log(2.d0)) + 4
    allocate(wsave(lensav))
    allocate(work(lenwrk))
    call rfftmi(N,wsave,lensav,ier)
    if(ier==2)stop "rfft_Nd_backward: LENSAV not big enough"
    jump   = N
    inc    = 1
    call rfftmb(lot,jump,N,inc,func,lenr,wsave,lensav,work,lenwrk,ier)
    deallocate(wsave,work)
    select case(ier)
    case (0)
       return
    case (1)
       stop "rfft_Nd_backward: LENR   not big enough"
    case (2)
       stop "rfft_Nd_backward: LENSAV not big enough"
    case (3)
       stop "rfft_Nd_backward: LENWRK not big enough"
    case (4)
       stop "rfft_Nd_backward: INC,JUMP,N,LOT are not consistent"
    end select
  end subroutine rfft_nd_backward