11#include <pscf/backend/cpp/CPT.h>
12#include <pscf/field/cpp/RFieldDft.h>
13#include <pscf/math/IntVec.h>
19 template <
int D,
class T>
class CField;
20 template <
int D,
class T>
class RField;
28 template <
int D,
class T>
class FFT;
247 void FFT<1,CPT>::makePlans(
254 void FFT<2,CPT>::makePlans(
261 void FFT<3,CPT>::makePlans(
272 template <
int D>
inline
279 template <
int D>
inline
281 {
return meshDimensions_; }
286 template <
int D>
inline
291 int i = wavevector[D-1];
294 if ((i != 0) && (d - i > d/2)) {
Backend identifier class for the C++ serial CPU backend.
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.
IntVec< D > const & meshDimensions() const
Return the dimensions of the grid for which this was setup.
void setup(IntVec< D > const &meshDimensions)
Setup grid dimensions, FFT plans and work space.
void inverseTransform(CField< D, CPT > const &in, CField< D, CPT > &out) const
Compute complex-to-complex inverse Fourier transform.
void inverseTransformUnsafe(RFieldDft< D, CPT > &in, RField< D, CPT > &out) const
Compute inverse (complex-to-real) DFT, overwriting the input.
static bool hasImplicitInverse(IntVec< D > const &wavevector, IntVec< D > const &meshDimensions)
Does this wavevector have implicit inverse in DFT or real data?
void forwardTransform(RField< D, CPT > const &in, RFieldDft< D, CPT > &out) const
Compute forward (real-to-complex) discrete Fourier transform (DFT).
void inverseTransformSafe(RFieldDft< D, CPT > const &in, RField< D, CPT > &out) const
Compute inverse (complex-to-real) DFT without overwriting input.
FFT()
Default constructor.
bool isSetup() const
Has this FFT object been setup?
An IntVec<D, T> is a D-component vector of elements of integer type T.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.