The Elk Code
Loading...
Searching...
No Matches
zfftifc_fftw.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3
! This file is distributed under the terms of the GNU General Public License.
4
! See the file COPYING for license details.
5
6
subroutine
zfftifc
(nd,n,sgn,z)
7
implicit none
8
! arguments
9
integer
,
intent(in)
:: nd,n(nd),sgn
10
complex(8)
,
intent(inout)
:: z(*)
11
! local variables
12
integer
,
parameter
:: FFTW_ESTIMATE=64
13
integer
p
14
integer(8)
plan
15
real
(8) t1
16
! interface to FFTW version 3
17
!$OMP CRITICAL(fftw_)
18
call
dfftw_plan_dft(plan,nd,n,z,z,sgn,fftw_estimate)
19
!$OMP END CRITICAL(fftw_)
20
call
dfftw_execute(plan)
21
!$OMP CRITICAL(fftw_)
22
call
dfftw_destroy_plan(plan)
23
!$OMP END CRITICAL(fftw_)
24
if
(sgn == -1)
then
25
p=product(n(1:nd))
26
t1=1.d0/dble(p)
27
call
zdscal(p,t1,z,1)
28
end if
29
end subroutine
30
31
subroutine
rzfftifc
(nd,n,sgn,r,z)
32
implicit none
33
! arguments
34
integer
,
intent(in)
:: nd,n(nd),sgn
35
real
(8),
intent(inout)
:: r(*)
36
complex(8)
,
intent(inout)
:: z(*)
37
! local variables
38
integer
,
parameter
:: FFTW_ESTIMATE=64
39
integer
p
40
integer(8)
plan
41
real
(8) t1
42
!$OMP CRITICAL(fftw_)
43
if
(sgn == -1)
then
44
call
dfftw_plan_dft_r2c(plan,nd,n,r,z,fftw_estimate)
45
else
46
call
dfftw_plan_dft_c2r(plan,nd,n,z,r,fftw_estimate)
47
end if
48
!$OMP END CRITICAL(fftw_)
49
call
dfftw_execute(plan)
50
!$OMP CRITICAL(fftw_)
51
call
dfftw_destroy_plan(plan)
52
!$OMP END CRITICAL(fftw_)
53
if
(sgn == -1)
then
54
p=product(n(1:nd))
55
t1=1.d0/dble(p)
56
p=p/n(1)
57
p=p*(n(1)/2+1)
58
call
zdscal(p,t1,z,1)
59
end if
60
end subroutine
61
zfftifc
subroutine zfftifc(nd, n, sgn, z)
Definition
zfftifc_fftw.f90:7
rzfftifc
subroutine rzfftifc(nd, n, sgn, r, z)
Definition
zfftifc_fftw.f90:32
zfftifc_fftw.f90
Generated by
1.9.8