11#include <prdc/cpu/RFieldDft.h>
12#include <pscf/math/IntVec.h>
21 template <
int D>
class RField;
22 template <
int D>
class CField;
265 {
return meshDimensions_; }
275 int i = wavevector[D-1];
278 if ((i != 0) && (d - i > d/2)) {
286 extern template class FFT<1>;
287 extern template class FFT<2>;
288 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.
bool isSetup() const
Has this FFT object been setup?
FFT()
Default constructor.
static bool hasImplicitInverse(IntVec< D > const &wavevector, IntVec< D > const &meshDimensions)
Does this wavevector have implicit inverse in DFT or real data?
IntVec< D > const & meshDimensions() const
Return the dimensions of the grid for which this was setup.
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 > const &in, RFieldDft< D > &out) const
Compute forward (real-to-complex) discrete Fourier transform (DFT).
void setup(IntVec< D > const &meshDimensions)
Setup grid dimensions, FFT plans and work space.
void inverseTransformSafe(RFieldDft< D > const &in, RField< D > &out) const
Compute inverse (complex-to-real) DFT without overwriting input.
void inverseTransform(CField< D > const &in, CField< D > &out) const
Compute complex-to-complex inverse Fourier transform.
virtual ~FFT()
Destructor.
void inverseTransformUnsafe(RFieldDft< D > &in, RField< D > &out) const
Compute inverse (complex-to-real) DFT, overwriting the input.
Fourier transform of a real field on an FFT mesh.
Field of real double precision values on an FFT mesh.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Fields and FFTs for periodic boundary conditions (CPU)
Periodic fields and crystallography.
PSCF package top-level namespace.