15#include <pscf/math/IntVec.h>
214 cufftHandle rcfPlan_;
217 cufftHandle criPlan_;
235 void FFT<1>::makePlans();
238 void FFT<2>::makePlans();
241 void FFT<3>::makePlans();
250 {
return meshDimensions_; }
267 int i = wavevector[D-1];
270 if ( (i != 0) && (d - i > d / 2) ) {
278 extern template class FFT<1>;
279 extern template class FFT<2>;
280 extern template class FFT<3>;
An IntVec<D, T> is a D-component vector of elements of integer type T.
Field of complex values on a regular mesh, allocated on a GPU device.
Fourier transform wrapper for real or complex data.
FFT()
Default constructor.
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.
void inverseTransform(CField< D > const &kField, CField< D > &rField) const
Compute inverse (complex-to-complex) discrete Fourier transform.
bool isSetup() const
Has this FFT object been setup?
static bool hasImplicitInverse(IntVec< D > const &wavevector, IntVec< D > const &meshDimensions)
Does a wavevector have an implicit inverse in DFT mesh for real data?
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.
const IntVec< D > & meshDimensions() const
Return the dimensions of the grid for which this was allocated.
void inverseTransformSafe(RFieldDft< D > const &kField, RField< D > &rField) const
Compute inverse (complex-to-real) DFT without overwriting input.
virtual ~FFT()
Destructor.
Discrete Fourier Transform (DFT) of a real field, allocated on a GPU.
Field of real values on a regular mesh, allocated on a GPU device.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA).
Periodic fields and crystallography.
PSCF package top-level namespace.