11#include <pscf/backend/cuda/CUT.h>
13#include <pscf/math/IntVec.h>
20 template <
int D,
class T>
class CField;
21 template <
int D,
class T>
class RField;
22 template <
int D,
class T>
class FFT;
217 cufftHandle rcfPlan_;
220 cufftHandle criPlan_;
238 void FFT<1,CUT>::makePlans();
241 void FFT<2,CUT>::makePlans();
244 void FFT<3,CUT>::makePlans();
253 {
return meshDimensions_; }
270 int i = wavevector[D-1];
273 if ( (i != 0) && (d - i > d / 2) ) {
Backend identifier class for the GPU-enabled CUDA backend.
void inverseTransform(CField< D, CUT > const &kField, CField< D, CUT > &rField) const
Compute inverse (complex-to-complex) discrete Fourier transform.
void inverseTransformUnsafe(RFieldDft< D, CUT > &kField, RField< D, CUT > &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.
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 forwardTransform(RField< D, CUT > const &rField, RFieldDft< D, CUT > &kField) const
Compute forward (real-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 mesh for real data?
bool isSetup() const
Has this FFT object been setup?
void inverseTransformSafe(RFieldDft< D, CUT > const &kField, RField< D, CUT > &rField) const
Compute inverse (complex-to-real) DFT without overwriting input.
void setup(IntVec< D > const &meshDimensions)
Setup mesh dimensions, plans and work space.
FFT()
Default constructor.
An IntVec<D, T> is a D-component vector of elements of integer type T.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.