PSCF v1.1
|
Fourier transform wrapper for real data. More...
#include <FFT.h>
Public Member Functions | |
FFT () | |
Default constructor. More... | |
virtual | ~FFT () |
Destructor. More... | |
void | setup (IntVec< D > const &meshDimensions) |
Setup grid dimensions, plans and work space. More... | |
void | setup (RDField< D > &rDField, RDFieldDft< D > &kDField) |
Check and setup grid dimensions if necessary. More... | |
void | forwardTransform (RDField< D > &rField, RDFieldDft< D > &kField) const |
Compute forward (real-to-complex) discrete Fourier transform. More... | |
void | forwardTransformSafe (RDField< D > const &rField, RDFieldDft< D > &kField) const |
Compute forward Fourier transform without destroying input. More... | |
void | inverseTransform (RDFieldDft< D > &kField, RDField< D > &rField) const |
Compute inverse (complex-to-real) discrete Fourier transform. More... | |
void | inverseTransformSafe (RDFieldDft< D > const &kField, RDField< D > &rField) const |
Compute inverse (complex to real) DFT without destroying input. More... | |
const IntVec< D > & | meshDimensions () const |
Return the dimensions of the grid for which this was allocated. More... | |
bool | isSetup () const |
Has this FFT object been setup? More... | |
cufftHandle & | fPlan () |
Get the plan for the forward DFT. More... | |
cufftHandle & | iPlan () |
Get the plan for the inverse DFT. More... | |
Fourier transform wrapper for real data.
Definition at line 33 of file pspg/field/FFT.h.
Pscf::Pspg::FFT< D >::FFT |
Default constructor.
Definition at line 27 of file pspg/field/FFT.tpp.
|
virtual |
Destructor.
Definition at line 40 of file pspg/field/FFT.tpp.
void Pscf::Pspg::FFT< D >::setup | ( | IntVec< D > const & | meshDimensions | ) |
Setup grid dimensions, plans and work space.
meshDimensions | Dimensions of real-space grid. |
Definition at line 54 of file pspg/field/FFT.tpp.
References Pscf::Pspg::RDField< D >::allocate(), Pscf::Pspg::RDFieldDft< D >::allocate(), and UTIL_CHECK.
void Pscf::Pspg::FFT< D >::setup | ( | RDField< D > & | rDField, |
RDFieldDft< D > & | kDField | ||
) |
Check and setup grid dimensions if necessary.
rDField | real data on r-space grid (device mem) |
kDField | complex data on k-space grid (device mem) |
Definition at line 72 of file pspg/field/FFT.tpp.
References Pscf::Pspg::DField< Data >::capacity(), Pscf::Pspg::RDField< D >::meshDimensions(), Pscf::Pspg::RDFieldDft< D >::meshDimensions(), and UTIL_CHECK.
void Pscf::Pspg::FFT< D >::forwardTransform | ( | RDField< D > & | rField, |
RDFieldDft< D > & | kField | ||
) | const |
Compute forward (real-to-complex) discrete Fourier transform.
rField | real values on r-space grid (input, gpu mem) |
kField | complex values on k-space grid (output, gpu mem) |
Definition at line 130 of file pspg/field/FFT.tpp.
References Pscf::Pspg::DField< Data >::capacity(), Pscf::Pspg::DField< Data >::cDField(), Pscf::Pspg::ThreadGrid::setThreadsLogical(), and UTIL_CHECK.
void Pscf::Pspg::FFT< D >::forwardTransformSafe | ( | RDField< D > const & | rField, |
RDFieldDft< D > & | kField | ||
) | const |
Compute forward Fourier transform without destroying input.
rField | real values on r-space grid (input, gpu mem) |
kField | complex values on k-space grid (output, gpu mem) |
Definition at line 165 of file pspg/field/FFT.tpp.
References Pscf::Pspg::DField< Data >::capacity(), and UTIL_CHECK.
void Pscf::Pspg::FFT< D >::inverseTransform | ( | RDFieldDft< D > & | kField, |
RDField< D > & | rField | ||
) | const |
Compute inverse (complex-to-real) discrete Fourier transform.
kField | complex values on k-space grid (input, gpu mem) |
rField | real values on r-space grid (output, gpu mem) |
Definition at line 178 of file pspg/field/FFT.tpp.
References Pscf::Pspg::DField< Data >::capacity(), Pscf::Pspg::DField< Data >::cDField(), Pscf::Pspg::RDField< D >::meshDimensions(), Pscf::Pspg::RDFieldDft< D >::meshDimensions(), and UTIL_CHECK.
void Pscf::Pspg::FFT< D >::inverseTransformSafe | ( | RDFieldDft< D > const & | kField, |
RDField< D > & | rField | ||
) | const |
Compute inverse (complex to real) DFT without destroying input.
kField | complex values on k-space grid (input, gpu mem) |
rField | real values on r-space grid (output, gpu mem) |
Definition at line 205 of file pspg/field/FFT.tpp.
References Pscf::Pspg::DField< Data >::capacity(), and UTIL_CHECK.
|
inline |
Return the dimensions of the grid for which this was allocated.
Definition at line 167 of file pspg/field/FFT.h.
|
inline |
Has this FFT object been setup?
Definition at line 171 of file pspg/field/FFT.h.
|
inline |
Get the plan for the forward DFT.
Definition at line 175 of file pspg/field/FFT.h.
|
inline |
Get the plan for the inverse DFT.
Definition at line 179 of file pspg/field/FFT.h.