1#ifndef PRDC_CUDA_R_FIELD_DFT_TPP
2#define PRDC_CUDA_R_FIELD_DFT_TPP
50 meshDimensions_ = other.meshDimensions_;
51 dftDimensions_ = other.dftDimensions_;
64 meshDimensions_ = other.meshDimensions_;
65 dftDimensions_ = other.dftDimensions_;
79 UTIL_THROW(
"Error: RHS HostDArray<cudaComplex> is not allocated.");
82 UTIL_THROW(
"Error: LHS RFieldDft<D> is not allocated.");
85 UTIL_THROW(
"Cannot assign Fields of unequal capacity");
101 for (
int i = 0; i < D; ++i) {
103 meshDimensions_[i] = meshDimensions[i];
123 for (
int i = 0; i < D; ++i) {
Dynamic array on the GPU device with aligned data.
virtual DeviceArray< Data > & operator=(const DeviceArray< Data > &other)
Assignment operator, assign from another DeviceArray<Data> array.
void associate(DeviceArray< Data > &arr, int beginId, int capacity)
Associate this object with a slice of a different DeviceArray.
void allocate(int capacity)
Allocate the underlying C array on the device.
Template for dynamic array stored in host CPU memory.
An IntVec<D, T> is a D-component vector of elements of integer type T.
Fourier transform of a real field on an FFT mesh.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array and set mesh dimensions.
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.
IntVec< D > const & meshDimensions() const
Return vector of real-space mesh dimensions by constant reference.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array for an FFT grid.
virtual ~RFieldDft()
Destructor.
void associate(DeviceArray< cudaComplex > &arr, int beginId, IntVec< D > const &meshDimensions)
Associate this object with a slice of another DeviceArray.
RFieldDft< D > & operator=(RFieldDft< D > const &other)
Assignment operator, assignment from another RFieldDft<D>.
RFieldDft()
Default constructor.
int capacity() const
Return allocated size.
bool isAllocated() const
Return true if this DArray has been allocated, false otherwise.
#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, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
PSCF package top-level namespace.