PSCF v1.1
RDField.tpp
1#ifndef PSPG_R_DFIELD_TPP
2#define PSPG_R_DFIELD_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 "RDField.h"
12
13namespace Pscf {
14namespace Pspg
15{
16
17 using namespace Util;
18
22 template <int D>
24 : DField<cudaReal>()
25 {}
26
27 /*
28 * Destructor.
29 */
30 template <int D>
32 {}
33
34 /*
35 * Copy constructor.
36 *
37 * Allocates new memory and copies all elements by value.
38 *
39 *\param other the Field to be copied.
40 */
41 template <int D>
43 : DField<cudaReal>(other),
44 meshDimensions_(0)
45 {
46 meshDimensions_ = other.meshDimensions_;
47 }
48
49 /*
50 * Assignment, element-by-element.
51 *
52 * This operator will allocate memory if not allocated previously.
53 *
54 * \throw Exception if other Field is not allocated.
55 * \throw Exception if both Fields are allocated with unequal capacities.
56 *
57 * \param other the rhs Field
58 */
59 template <int D>
61 {
63 meshDimensions_ = other.meshDimensions_;
64
65 return *this;
66 }
67
68}
69}
70#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
Field of real single precision values on an FFT mesh on a device.
Definition: RDField.h:34
RDField()
Default constructor.
Definition: RDField.tpp:23
RDField & operator=(const RDField &other)
Assignment operator.
Definition: RDField.tpp:60
virtual ~RDField()
Destructor.
Definition: RDField.tpp:31
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1