1#ifndef PSPC_R_FIELD_DFT_TPP
2#define PSPC_R_FIELD_DFT_TPP
23 :
Field<fftw_complex>()
42 :
Field<fftw_complex>()
47 data_ = (fftw_complex*) fftw_malloc(
sizeof(fftw_complex)*other.
capacity_);
53 meshDimensions_ = other.meshDimensions_;
54 dftDimensions_ = other.dftDimensions_;
71 if (
this == &other)
return *
this;
80 }
else if (capacity_ != other.
capacity_) {
81 UTIL_THROW(
"Cannot assign Fields of unequal capacity");
85 for (
int i = 0; i < capacity_; ++i) {
86 data_[i][0] = other.
data_[i][0];
87 data_[i][1] = other.
data_[i][1];
89 meshDimensions_ = other.meshDimensions_;
90 dftDimensions_ = other.dftDimensions_;
Base class template for a field defined on a spatial grid.
Fourier transform of a real field on an FFT mesh.
virtual ~RFieldDft()
Destructor.
RFieldDft< D > & operator=(RFieldDft< D > const &other)
Assignment operator.
RFieldDft()
Default constructor.
Data * data_
Pointer to an array of Data elements.
int capacity() const
Return allocated size.
int capacity_
Allocated size of the data_ array.
bool isAllocated() const
Return true if this DArray has been allocated, false otherwise.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.