|
PSCF v1.5.0
|
Fourier transform of a real field on an FFT mesh (CPU version). More...
#include <RFieldDft.h>
Public Types | |
| using | RealType = double |
| Type of real and imaginary parts of a complex element value. | |
Public Member Functions | |
| RFieldDft () | |
| Default constructor. | |
| RFieldDft (RFieldDft< D, CPT > const &other) | |
| Copy constructor. | |
| virtual | ~RFieldDft () |
| Destructor. | |
| RFieldDft< D, CPT > & | operator= (RFieldDft< D, CPT > const &other) |
| Assignment operator. | |
| RFieldDft< D, CPT > & | operator= (HostSendArray< fftw_complex, CPT > const &other) |
| Pseudo-assignment from an associated HostSendArray. | |
| void | allocate (IntVec< D > const &meshDimensions) |
| Allocate the underlying C array and set mesh dimensions. | |
| virtual void | deallocate () |
| Deallocate underlying C array and clear mesh dimensions. | |
| IntVec< D > const & | meshDimensions () const |
| Return vector of spatial mesh dimensions by const reference. | |
| IntVec< D > const & | dftDimensions () const |
| Return vector of dft (Fourier) grid dimensions by const reference. | |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serialize a Field to/from an Archive. | |
Fourier transform of a real field on an FFT mesh (CPU version).
Definition at line 35 of file cpp/RFieldDft.h.
| using Pscf::RFieldDft< D, CPT >::RealType = double |
Type of real and imaginary parts of a complex element value.
Definition at line 51 of file cpp/RFieldDft.h.
| Pscf::RFieldDft< D, CPT >::RFieldDft | ( | ) |
Default constructor.
Definition at line 22 of file cpp/RFieldDft.tpp.
References RFieldDft().
Referenced by allocate(), deallocate(), dftDimensions(), meshDimensions(), operator=(), operator=(), RFieldDft(), RFieldDft(), serialize(), and ~RFieldDft().
| Pscf::RFieldDft< D, CPT >::RFieldDft | ( | RFieldDft< D, CPT > const & | other | ) |
Copy constructor.
Allocates new memory and copies all elements by value.
| other | the RFieldDft to be copied. |
Definition at line 34 of file cpp/RFieldDft.tpp.
References allocate(), and RFieldDft().
|
virtual |
Destructor.
Deletes underlying C array, if allocated previously.
Definition at line 53 of file cpp/RFieldDft.tpp.
References RFieldDft().
| RFieldDft< D, CPT > & Pscf::RFieldDft< D, CPT >::operator= | ( | RFieldDft< D, CPT > const & | other | ) |
Assignment operator.
Perform a deep copy of all elements of another RFieldDft array. If this Field is not allocated, it first allocates this array. If this and the other Field are both allocated on entry, the capacities must match.
| Exception | if other is not allocated |
| Exception | if this and other have unequal nonzero capacities |
| other | the field on the RHS of assignment |
Definition at line 68 of file cpp/RFieldDft.tpp.
References allocate(), RFieldDft(), UTIL_CHECK, and UTIL_THROW.
| RFieldDft< D, CPT > & Pscf::RFieldDft< D, CPT >::operator= | ( | HostSendArray< fftw_complex, CPT > const & | other | ) |
Pseudo-assignment from an associated HostSendArray.
This function simply calls the corresponding assignment operator of the BackendArray base class, then returns this RFieldDft object. It checks if an association exists between the LHS and RHS arrays, and does nothing if this is the case.
| Exception | if other (RHS) is not allocated |
| Exception | if other (RHS) is not associated with this (LHS) |
| other | the RHS host array |
Definition at line 100 of file cpp/RFieldDft.tpp.
References RFieldDft().
| void Pscf::RFieldDft< D, CPT >::allocate | ( | IntVec< D > const & | meshDimensions | ) |
Allocate the underlying C array and set mesh dimensions.
| meshDimensions | vector of grid points in each direction |
Definition at line 110 of file cpp/RFieldDft.tpp.
References Pscf::FftwDRArray< Data >::allocate(), meshDimensions(), RFieldDft(), and UTIL_CHECK.
Referenced by operator=(), and RFieldDft().
|
virtual |
Deallocate underlying C array and clear mesh dimensions.
Definition at line 130 of file cpp/RFieldDft.tpp.
References Pscf::FftwDRArray< Data >::deallocate(), and RFieldDft().
|
inline |
Return vector of spatial mesh dimensions by const reference.
Definition at line 167 of file cpp/RFieldDft.h.
References RFieldDft().
Referenced by allocate().
|
inline |
Return vector of dft (Fourier) grid dimensions by const reference.
The last element of dftDimensions() and meshDimensions() differ by about a factor of two: dftDimension()[D-1] = meshDimensions()/2 + 1. For D > 1, other elements are equal.
Definition at line 174 of file cpp/RFieldDft.h.
References RFieldDft().
| void Pscf::RFieldDft< D, CPT >::serialize | ( | Archive & | ar, |
| const unsigned int | version ) |
Serialize a Field to/from an Archive.
| ar | archive |
| version | archive version id |
Definition at line 182 of file cpp/RFieldDft.h.
References RFieldDft(), and Pscf::FftwDRArray< Data >::serialize().