Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
Classes | Typedefs
FFT

Fast Fourier Transform. More...

Classes

struct  tinker::FFTPlan
 FFT plan. More...
 

Typedefs

typedef GenericUnit< FFTPlan, GenericUnitVersion::DISABLE_ON_DEVICE > tinker::FFTPlanUnit
 

Detailed Description

Fast Fourier Transform.


Class Documentation

◆ tinker::FFTPlan

struct tinker::FFTPlan

FFT plan.

Warning
PME grid sizes nfft1, nfft2, and nfft3 in Tinker are associated with x, y, and z directions, respectively. These three numbers also correspond to a Fortran array qgrid(2,nfft1,nfft2,nfft3), where nfft1 is the fastest changing dimension and nfft3 is the slowest changing dimension among the three.

The multi-dimensional FFTW3 Fortran API in Tinker is called as follows,

call dfftw_plan_dft_3d (planf,nfft1,nfft2,nfft3,qgrid,qgrid,ifront,iguess)

which is different from the C API.

The difference is described on the FFTW website:

‍A minor annoyance in calling FFTW from Fortran is that FFTW’s array dimensions are defined in the C convention (row-major order), while Fortran’s array dimensions are the opposite convention (column-major order). See Multi-dimensional Array Format. This is just a bookkeeping difference, with no effect on performance. The only consequence of this is that, whenever you create an FFTW plan for a multi-dimensional transform, you must always reverse the ordering of the dimensions.

cuFFT C API is similar to FFTW C API:

cufftResult cufftPlan3d(cufftHandle *plan,
int nx, int ny, int nz, cufftType type);

‍nx: The transform size in the x dimension. This is slowest changing dimension of a transform (strided in memory).
nz: The transform size in the z dimension. This is fastest changing dimension of a transform (contiguous in memory).

Public Member Functions

template<class T >
T & castTo ()
 Statically cast the FFTPlan to one of its derived type. More...
 
virtual ~FFTPlan ()
 

Constructor & Destructor Documentation

◆ ~FFTPlan()

virtual tinker::FFTPlan::~FFTPlan ( )
inlinevirtual

Member Function Documentation

◆ castTo()

template<class T >
T & tinker::FFTPlan::castTo ( )
inline

Statically cast the FFTPlan to one of its derived type.

Typedef Documentation

◆ FFTPlanUnit

typedef GenericUnit<FFTPlan, GenericUnitVersion::DISABLE_ON_DEVICE> tinker::FFTPlanUnit