PSCF v1.5.0
ShiftMove_u.h
1#ifndef RPG_SHIFT_MOVE_U_H
2#define RPG_SHIFT_MOVE_U_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <rp/fts/montecarlo/ShiftMoveBase.h> // base class template
12#include <pscf/backend/cuda/CUT.h> // base class argument
13#include <pscf/backend/cuda/HostSendArray.h> // member
14#include <pscf/backend/cuda/cudaTypes.h> // member
15
16namespace Pscf {
17namespace Rp {
18
19 using namespace Util;
20
27 template <int D>
28 class ShiftMove<D,CUT> : public ShiftMoveBase<D,CUT>
29 {
30
31 public:
32
39
43 void setup() override;
44
45 protected:
46
47 using McMove<D,CUT>::system;
48
57 void shiftFields(IntVec<D> const & shift) override;
58
59 private:
60
61 // Work space on CPU for unshifted field
63
64 // Work space on CPU for a shifted field
66
67 using ShiftMoveBaseT = ShiftMoveBase<D,CUT>;
68
69 };
70
71 // Explicit instantiation declarations
72 PSCF_TMPL_DECLARE_CUDA(ShiftMove)
73 //extern template class ShiftMove<1,CUT>;
74 //extern template class ShiftMove<2,CUT>;
75 //extern template class ShiftMove<3,CUT>;
76
77} // namespace Rp
78} // namespace Pscf
79#endif
Backend identifier class for the GPU-enabled CUDA backend.
Definition CUT.h:31
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition IntVec.h:27
McMove is an abstract base class for Monte Carlo moves.
Definition McMove.h:50
McSimulator< D, CUT > & simulator()
Definition McMove.h:342
System< D, CUT > & system()
Definition McMove.h:328
Monte-Carlo simulation coordinator.
Definition McSimulator.h:55
ShiftMoveBase(McSimulator< D, CUT > &simulator)
ShiftMove(McSimulator< D, CUT > &simulator)
Constructor.
Definition ShiftMove.cu:20
void setup() override
Setup before simulation.
Definition ShiftMove.cu:29
void shiftFields(IntVec< D > const &shift) override
Compute and store shifted w fields.
Definition ShiftMove.cu:45
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.