Return the Reverse (unnormalized) Fourier Transform of a periodic sequence of type complex
or real
of arbitrary kind parameter.
More...
Return the Reverse (unnormalized) Fourier Transform of a periodic sequence of type complex
or real
of arbitrary kind parameter.
See the documentation of pm_fftnr for more details.
- Parameters
-
[in,out] | data | : The input/output contiguous vector of arbitrary size of,
-
type
complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128),
-
type
real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
containing the periodic sequence whose FFT is to be computed.
On output, data contains the FFT result.
|
Possible calling interfaces ⛓
Return the Reverse (unnormalized) Fourier Transform of a periodic sequence of type complex or real of...
This module contains procedures and generic interfaces for computing the Discrete Fourier Transform o...
- Warning
- The condition
1 < size(data) .and. isIntPow(size(data))
must hold for the corresponding input arguments.
This condition is verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
-
The
pure
procedure(s) documented herein become impure
when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1
.
By default, these procedures are pure
in release
build and impure
in debug
and testing
builds.
- See also
- getFFTF
getFFTR
getFFTI
setFFTF
setFFTR
setFFTI
Example usage ⛓
11 integer(IK),
allocatable :: factor(:)
13 type(display_type) :: disp
18 complex(TKG),
allocatable :: data(:)
19 complex(TKG),
parameter :: ZERO
= 0._TKG
21 call disp%show(
"data = [complex(TKG) :: (1., -6.), (2., -5.), (3., -4.), (4., -3.), (5., -2.), (6., -1.), ZERO, ZERO]")
22 data = [
complex(TKG) :: (
1.,
-6.), (
2.,
-5.), (
3.,
-4.), (
4.,
-3.), (
5.,
-2.), (
6.,
-1.), ZERO, ZERO]
30 call disp%show(
"data * 2 / size(data)")
31 call disp%show(
data * 2 / size(data) )
37 complex(TKG),
allocatable :: data(:)
38 complex(TKG),
parameter :: ZERO
= 0._TKG
40 call disp%show(
"data = [complex(TKG) :: (1., -6.), (2., -5.), (3., -4.), (4., -3.), (5., -2.), (6., -1.), ZERO, ZERO]")
41 data = [
complex(TKG) :: (
1.,
-6.), (
2.,
-5.), (
3.,
-4.), (
4.,
-3.), (
5.,
-2.), (
6.,
-1.), ZERO, ZERO]
49 call disp%show(
"data * 2 / size(data)")
50 call disp%show(
data * 2 / size(data) )
56 complex(TKG),
allocatable :: data(:)
57 complex(TKG),
parameter :: ZERO
= 0._TKG
59 call disp%show(
"data = [complex(TKG) :: (1., -6.), (2., -5.), (3., -4.), (4., -3.), (5., -2.), (6., -1.), ZERO, ZERO]")
60 data = [
complex(TKG) :: (
1.,
-6.), (
2.,
-5.), (
3.,
-4.), (
4.,
-3.), (
5.,
-2.), (
6.,
-1.), ZERO, ZERO]
68 call disp%show(
"data * 2 / size(data)")
69 call disp%show(
data * 2 / size(data) )
75 real(TKG),
allocatable :: data(:)
76 real(TKG),
parameter :: ZERO
= 0._TKG
78 call disp%show(
"data = [real(TKG) :: 1., 2., 3., 4., 5., 6.5, ZERO, ZERO]")
79 data = [
real(TKG) ::
1.,
2.,
3.,
4.,
5.,
6.5, ZERO, ZERO]
87 call disp%show(
"data * 2 / size(data)")
88 call disp%show(
data * 2 / size(data) )
94 real(TKG),
allocatable :: data(:)
95 real(TKG),
parameter :: ZERO
= 0._TKG
97 call disp%show(
"data = [real(TKG) :: 1., 2., 3., 4., 5., 6.5, ZERO, ZERO]")
98 data = [
real(TKG) ::
1.,
2.,
3.,
4.,
5.,
6.5, ZERO, ZERO]
104 call disp%show(
"call setFFTR(data)")
106 call disp%show(
"data * 2 / size(data)")
107 call disp%show(
data * 2 / size(data) )
113 real(TKG),
allocatable :: data(:)
114 real(TKG),
parameter :: ZERO
= 0._TKG
116 call disp%show(
"data = [real(TKG) :: 1., 2., 3., 4., 5., 6.5, ZERO, ZERO]")
117 data = [
real(TKG) ::
1.,
2.,
3.,
4.,
5.,
6.5, ZERO, ZERO]
118 call disp%show(
"call setFFTF(data)")
123 call disp%show(
"call setFFTR(data)")
125 call disp%show(
"data * 2 / size(data)")
126 call disp%show(
data * 2 / size(data) )
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
Return the Forward Fourier Transform of a periodic sequence of type complex or real of arbitrary kind...
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter CKH
The scalar integer constant of intrinsic default kind, representing the highest-precision complex kin...
integer, parameter CKS
The single-precision complex kind in Fortran mode. On most platforms, this is a 32-bit real kind.
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter CKD
The double precision complex kind in Fortran mode. On most platforms, this is a 64-bit real kind.
integer, parameter RKD
The double precision real kind in Fortran mode. On most platforms, this is an 64-bit real kind.
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
2data = [
complex(TKG) :: (
1.,
-6.), (
2.,
-5.), (
3.,
-4.), (
4.,
-3.), (
5.,
-2.), (
6.,
-1.), ZERO, ZERO]
5(
+21.0000000,
-21.0000000), (
-0.707106352,
-1.70710707), (
+5.99999905,
-0.238418579E-6), (
+2.60659981,
-6.29289198), (
-3.00000000,
-3.00000000), (
+0.707106352,
-0.292893469), (
+0.715255737E-6,
-8.00000000), (
-18.6065998,
-7.70710802)
9(
+2.00000000,
-12.0000000), (
+4.00000143,
-9.99999905), (
+5.99999905,
-8.00000000), (
+7.99999905,
-5.99999905), (
+10.0000000,
-4.00000000), (
+11.9999981,
-2.00000000), (
+0.715255737E-6,
-0.238418579E-6), (
+0.119209290E-5,
-0.166893005E-5)
12data = [
complex(TKG) :: (
1.,
-6.), (
2.,
-5.), (
3.,
-4.), (
4.,
-3.), (
5.,
-2.), (
6.,
-1.), ZERO, ZERO]
15(
+21.000000000000000,
-21.000000000000000), (
-0.70710678118654524,
-1.7071067811865483), (
+5.9999999999999991,
-0.88817841970012523E-15), (
+2.6066017177982097,
-6.2928932188134530), (
-3.0000000000000000,
-3.0000000000000000), (
+0.70710678118654702,
-0.29289321881345343), (
+0.88817841970012523E-15,
-7.9999999999999991), (
-18.606601717798210,
-7.7071067811865452)
19(
+2.0000000000000004,
-12.000000000000000), (
+4.0000000000000018,
-9.9999999999999982), (
+5.9999999999999982,
-7.9999999999999991), (
+7.9999999999999973,
-5.9999999999999991), (
+10.000000000000000,
-4.0000000000000000), (
+11.999999999999998,
-1.9999999999999996), (
+0.13322676295501878E-14,
-0.88817841970012523E-15), (
+0.26645352591003757E-14,
-0.26645352591003757E-14)
22data = [
complex(TKG) :: (
1.,
-6.), (
2.,
-5.), (
3.,
-4.), (
4.,
-3.), (
5.,
-2.), (
6.,
-1.), ZERO, ZERO]
25(
+21.0000000000000000000000000000000000,
-21.0000000000000000000000000000000000), (
-0.707106781186547524400844362104848511,
-1.70710678118654752440084436210484928), (
+6.00000000000000000000000000000000000,
-0.385185988877447170611195588516985464E-33), (
+2.60660171779821286601266543157273536,
-6.29289321881345247559915563789515226), (
-3.00000000000000000000000000000000000,
-3.00000000000000000000000000000000000), (
+0.707106781186547524400844362104848511,
-0.292893218813452475599155637895151393), (
-0.385185988877447170611195588516985464E-33,
-8.00000000000000000000000000000000000), (
-18.6066017177982128660126654315727354,
-7.70710678118654752440084436210484774)
29(
+2.00000000000000000000000000000000000,
-12.0000000000000000000000000000000000), (
+4.00000000000000000000000000000000000,
-10.0000000000000000000000000000000000), (
+6.00000000000000000000000000000000000,
-8.00000000000000000000000000000000000), (
+8.00000000000000000000000000000000000,
-5.99999999999999999999999999999999923), (
+10.0000000000000000000000000000000000,
-4.00000000000000000000000000000000000), (
+12.0000000000000000000000000000000000,
-2.00000000000000000000000000000000000), (
-0.385185988877447170611195588516985464E-33,
-0.385185988877447170611195588516985464E-33), (
+0.00000000000000000000000000000000000,
-0.770371977754894341222391177033970927E-33)
32data = [
real(TKG) ::
1.,
2.,
3.,
4.,
5.,
6.5, ZERO, ZERO]
35+21.5000000,
-3.50000000,
-10.0104074,
+2.64644647,
+3.00000000,
+4.50000000,
+2.01040721,
-3.35355353
39+1.00000000,
+2.00000024,
+3.00000000,
+4.00000000,
+5.00000000,
+6.50000000,
+0.119209290E-6,
+0.00000000
42data = [
real(TKG) ::
1.,
2.,
3.,
4.,
5.,
6.5, ZERO, ZERO]
45+21.500000000000000,
-3.5000000000000000,
-10.010407640085653,
+2.6464466094067260,
+3.0000000000000000,
+4.5000000000000000,
+2.0104076400856532,
-3.3535533905932753
49+1.0000000000000000,
+2.0000000000000000,
+3.0000000000000000,
+3.9999999999999996,
+5.0000000000000000,
+6.5000000000000000,
+0.0000000000000000,
+0.44408920985006262E-15
52data = [
real(TKG) ::
1.,
2.,
3.,
4.,
5.,
6.5, ZERO, ZERO]
55+21.5000000000000000000000000000000000,
-3.50000000000000000000000000000000000,
-10.0104076400856539574071770778912162,
+2.64644660940672623779957781894757574,
+3.00000000000000000000000000000000000,
+4.50000000000000000000000000000000000,
+2.01040764008565395740717707789121696,
-3.35355339059327376220042218105242426
59+1.00000000000000000000000000000000039,
+2.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000,
+4.00000000000000000000000000000000000,
+5.00000000000000000000000000000000000,
+6.50000000000000000000000000000000000,
+0.192592994438723585305597794258492732E-33,
+0.192592994438723585305597794258492732E-33
- Test:
- test_pm_fftnr
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Fatemeh Bagheri, Tuesday 11:34 PM, August 10, 2021, Dallas, TX
Definition at line 1107 of file pm_fftnr.F90.