ETS  \$Id: Doxyfile 2162 2020-02-26 14:16:09Z g2dpc $
 All Classes Files Functions Variables Pages
rfi2.f90
Go to the documentation of this file.
1 subroutine rfi2(data, nr, kr)
2 !-----------------------------------------------------------------------
3 ! inverse of rft2.
4 ! when using rfi2 it is necessary to have vanishing imaginary
5 ! parts of the first and last element of the input vector:
6 ! data(1+kr)=data(1+(nr+1)*kr)=0.
7 ! the calling program should have data dimensioned with at least
8 ! (nr+1)*kr+1 elements.
9 ! lasl routine may 75, calling rtran2 and fft2.
10 ! -----------------------------------------------------------------------
11 
12  use itm_types
13 
14  implicit none
15 
16  integer(itm_i4), intent(in) :: nr, kr
17  real(r8), dimension((nr + 1) * kr + 1), intent(inout) :: data
18 
19  real(r8) :: fni
20  integer(itm_i4) :: mr, i
21 
22  call rtran2(data, nr, kr, -1)
23 
24  mr = nr * kr
25  fni = 2._r8 / dble(nr)
26 
27  do i = 1, mr, kr
28  data(i) = fni * data(i)
29  end do
30 
31  call fft2(data(1), data(kr + 1), nr/2, (kr + kr))
32 
33  return
34 end subroutine rfi2
subroutine rtran2(data, nr, kr, ktran)
Definition: rtran2.f90:1
subroutine rfi2(data, nr, kr)
Definition: rfi2.f90:1
subroutine fft2(datar, datai, n, inc)
Definition: fft2.f90:1