FLASH-X
Doxygen Generated Documentation From Interface Source Code
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | Grid_pfft (direction, inArray, outArray) |
subroutine Grid_pfft | ( | integer | direction, |
real | inArray, | ||
real | outArray | ||
) |
This routine is the main interface for the parallel fft solver. It can do real-to-complex, complex-complex, sine and cosine transforms in parallel. The calling routine must first call the initialization routine, gr_pfftInit to create the data structures and trignometric tables for calculating the FFT. Once the calling routine is done, it should call gr_pfftFinalize to deallocate and clean up. Note that in the same simulation, it is possible to to call this routine for different sizes and different types of transforms, but each time the sequence must be call Grid_pfftInit(....) call Grid_pfft(PFFT_FORWARD ... call Grid_pfft(PFFT_INVERSE ... call Grid_pfftFinalize() The routine assumes that the domain is divided into pencils, that is the first dimension is all within the processor, while the remaining dimensions are distributed over a one or two dimensional processor grid. Note that the data distribution at the end of the forward transform is different from the original distriution, but it is restored when the inverse transform is performed. For example, if the global data is of the size NX,NY,NZ distributed over py,pz processors, then the original distribution is NX,NY/py,NZ/pz on each processor. After forward transform the distribution is NZ,NX/py,NY/pz. And the original distribution is restored upon inverse transform.
direction - to indicate whether it is forward or inverse transform inArray - single dimension array containing the data to be transformed outArray - array containing transformed data.
NOTES
Any routine calling this one must include the following line at the top #include "Pfft.h" Also, please see Grid_pfftInit.
Definition at line 58 of file Grid_pfft.F90.