16#include <pscf/math/IntVec.h>
215 cufftHandle rcfPlan_;
218 cufftHandle criPlan_;
236 void FFT<1>::makePlans();
239 void FFT<2>::makePlans();
242 void FFT<3>::makePlans();
251 {
return meshDimensions_; }
268 int i = wavevector[D-1];
269 int d = meshDimensions[D-1];
270 if ((i != 0) && (d - i > d/2 + 1)) {
277 #ifndef PRDC_CUDA_FFT_TPP
279 extern template class FFT<1>;
280 extern template class FFT<2>;
281 extern template class FFT<3>;
An IntVec<D, T> is a D-component vector of elements of integer type T.
Field of complex double precision values on an FFT mesh.
Fourier transform wrapper.
Fourier transform of a real field on an FFT mesh.
Field of real double precision values on an FFT mesh.
static void computeKMesh(IntVec< D > const &rMeshDimensions, IntVec< D > &kMeshDimensions, int &kSize)
Compute dimensions and size of k-space mesh for DFT of real data.
FFT()
Default constructor.
void inverseTransform(CField< D > const &kField, CField< D > &rField) const
Compute inverse (complex-to-complex) discrete Fourier transform.
virtual ~FFT()
Destructor.
bool isSetup() const
Has this FFT object been setup?
const IntVec< D > & meshDimensions() const
Return the dimensions of the grid for which this was allocated.
void forwardTransform(RField< D > const &rField, RFieldDft< D > &kField) const
Compute forward (real-to-complex) discrete Fourier transform.
void setup(IntVec< D > const &meshDimensions)
Setup grid dimensions, plans and work space.
void inverseTransformUnsafe(RFieldDft< D > &kField, RField< D > &rField) const
Compute inverse (complex-to-real) DFT, overwriting the input.
void inverseTransformSafe(RFieldDft< D > const &kField, RField< D > &rField) const
Compute inverse (complex-to-real) DFT without overwriting input.
void forwardTransform(CField< D > const &rField, CField< D > &kField) const
Compute forward (complex-to-complex) discrete Fourier transform.
static bool hasImplicitInverse(IntVec< D > const &wavevector, IntVec< D > const &meshDimensions)
Does a wavevector have an implicit inverse in DFT for real data?
File containing preprocessor macros for error handling.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
PSCF package top-level namespace.