PSCF v1.1
RDFieldDft.tpp
1#ifndef PSPG_R_DFIELD_DFT_TPP
2#define PSPG_R_DFIELD_DFT_TPP
3
4/*
5* PSCF Package
6*
7* Copyright 2016 - 2022, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "RDFieldDft.h"
12
13namespace Pscf {
14namespace Pspg {
15
16 using namespace Util;
17
21 template <int D>
23 : DField<cudaComplex>()
24 {}
25
26 /*
27 * Destructor.
28 */
29 template <int D>
31 {}
32
33 /*
34 * Copy constructor.
35 *
36 * Allocates new memory and copies all elements by value.
37 *
38 *\param other the RField<D> to be copied.
39 */
40 template <int D>
42 : DField<cudaComplex>(other)
43 {
44 meshDimensions_ = other.meshDimensions_;
45 dftDimensions_ = other.dftDimensions_;
46 }
47
48 /*
49 * Assignment, element-by-element.
50 *
51 * This operator will allocate memory if not allocated previously.
52 *
53 * \throw Exception if other Field is not allocated.
54 * \throw Exception if both Fields are allocated with unequal capacities.
55 *
56 * \param other the rhs Field
57 */
58 template <int D>
60 {
61
63 meshDimensions_ = other.meshDimensions_;
64 dftDimensions_ = other.dftDimensions_;
65
66 return *this;
67 }
68
69}
70}
71#endif
Dynamic array on the GPU with alligned data.
Definition: DField.h:30
virtual DField< Data > & operator=(const DField< Data > &other)
Assignment operator.
Definition: DField.tpp:110
Discrete Fourier Transform (DFT) of a real field on an FFT mesh.
Definition: RDFieldDft.h:35
virtual ~RDFieldDft()
Destructor.
Definition: RDFieldDft.tpp:30
RDFieldDft< D > & operator=(const RDFieldDft< D > &other)
Assignment operator.
Definition: RDFieldDft.tpp:59
RDFieldDft()
Default constructor.
Definition: RDFieldDft.tpp:22
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1