PSCF v1.3
rpc/field/WFieldContainer.tpp
1#ifndef RPC_W_FIELD_CONTAINER_TPP
2#define RPC_W_FIELD_CONTAINER_TPP
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "WFieldContainer.h" // class header
12#include <prdc/field/WFieldsReal.tpp> // base class implementation
13
14namespace Pscf {
15namespace Rpc {
16
17 using namespace Util;
18 using namespace Pscf::Prdc;
19 using namespace Pscf::Prdc::Cpu;
20
21 template <int D>
22 void WFieldContainer<D>::assignRField(RField<D>& lhs,
23 RField<D> const & rhs) const
24 {
25 int n = rhs.capacity();
26 UTIL_CHECK(lhs.capacity() == n);
27 UTIL_CHECK(meshSize() == n);
28 for (int i = 0; i < n; ++i) {
29 lhs[i] = rhs[i];
30 }
31 }
32
33} // namespace Rpc
34} // namespace Pscf
35#endif
Field of real double precision values on an FFT mesh.
Definition cpu/RField.h:29
int capacity() const
Return allocated size.
Definition Array.h:159
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Definition global.h:68
Fields and FFTs for periodic boundary conditions (CPU)
Definition CField.cpp:12
Periodic fields and crystallography.
Definition CField.cpp:11
Real periodic fields, SCFT and PS-FTS (CPU).
Definition param_pc.dox:2
PSCF package top-level namespace.
Definition param_pc.dox:1