1#ifndef PSPC_R_FIELD_DFT_H
2#define PSPC_R_FIELD_DFT_H
12#include <pscf/math/IntVec.h>
99 template <
class Archive>
100 void serialize(Archive& ar,
const unsigned int version);
119 for (
int i = 0; i < D; ++i) {
121 meshDimensions_[i] = meshDimensions[i];
123 dftDimensions_[i] = meshDimensions[i];
124 size *= meshDimensions[i];
126 dftDimensions_[i] = (meshDimensions[i]/2 + 1);
127 size *= dftDimensions_[i];
138 {
return meshDimensions_; }
145 {
return dftDimensions_; }
151 template <
class Archive>
155 ar & meshDimensions_;
159 #ifndef PSPC_R_FIELD_DFT_TPP
Base class template for a field defined on a spatial grid.
An IntVec<D, T> is a D-component vector of elements of integer type T.
void allocate(int capacity)
Allocate the underlying C array.
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.
IntVec< D > const & meshDimensions() const
Return vector of spatial mesh dimensions by constant reference.
virtual ~RFieldDft()
Destructor.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array for an FFT grid.
RFieldDft< D > & operator=(RFieldDft< D > const &other)
Assignment operator.
void serialize(Archive &ar, const unsigned int version)
Serialize a Field to/from an Archive.
RFieldDft()
Default constructor.
IntVec< D > const & dftDimensions() const
Return vector of dft (Fourier) grid dimensions by constant reference.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.