1#ifndef PRDC_CPU_R_FIELD_DFT_TPP
2#define PRDC_CPU_R_FIELD_DFT_TPP
12#include <prdc/cpu/FFT.h>
49 UTIL_THROW(
"Other Field must be allocated.");
72 if (
this == &other)
return *
this;
76 UTIL_THROW(
"Other RFieldDft must be allocated.");
84 UTIL_CHECK(meshDimensions_ == other.meshDimensions_);
85 UTIL_CHECK(dftDimensions_ == other.dftDimensions_);
103 for (
int i = 0; i < D; ++i) {
123 for (
int i = 0; i < D; ++i) {
124 meshDimensions_[i] = 0;
125 dftDimensions_[i] = 0;
An IntVec<D, T> is a D-component vector of elements of integer type T.
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 allocate(int capacity)
Allocate the underlying C array.
virtual void deallocate()
Dellocate the underlying C array.
bool isAllocated() const
Return true if the FftwDArray has been allocated, false otherwise.
virtual void deallocate()
Deallocate underlying C array and clear mesh dimensions.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array and set mesh dimensions.
virtual ~RFieldDft()
Destructor.
RFieldDft< D > & operator=(RFieldDft< D > const &other)
Assignment operator.
RFieldDft()
Default constructor.
IntVec< D > const & meshDimensions() const
Return vector of spatial mesh dimensions by constant reference.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Fields and FFTs for periodic boundary conditions (CPU)
Periodic fields and crystallography.
PSCF package top-level namespace.