With FFTW and MPI, given a two-dimensional array that is the transform of a real function, represented in complex space, is it possible to output the real-space array transposed?
For example, suppose there is a 2x4 array in real space. If the code calls fftw_mpi_plan_dft_r2c_2d
, then it will output a 2x3 complex array. If the flag FFTW_MPI_TRANSPOSED_OUT
is added, then the output is a 3x2 complex array, the transpose of the former array. I can easily produce this behavior.
My question: is it possible to go the other way? Starting with a 2x3 complex array that is the complex-space transform of a 2x4 real-space array, is it possible to use fftw_mpi_plan_dft_c2r_2d
with suitable arguments to produce the transposed, 4x2 real-space array?
Note, this is in 2D. In 3D, everything works fine, indicating that in 2D it may have to do with the last dimension representing only half of the complex plane conflicting with FTTW's expectation of the layout of the complex transpose.