PSCF v1.5.0
ShiftMove_c.h
1#ifndef RP_SHIFT_MOVE_C_H
2#define RP_SHIFT_MOVE_C_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/cpp/CPT.h> // base class argument
13
14namespace Pscf {
15namespace Rp {
16
17 using namespace Util;
18
25 template <int D>
26 class ShiftMove<D,CPT>
27 : public ShiftMoveBase<D,CPT>
28 {
29
30 public:
31
38
39 protected:
40
41 using McMove<D,CPT>::system;
42
43 protected:
44
45 /*
46 * Compute and store shifted w fields.
47 *
48 * On return, shifted values of fields obtained from system().w()
49 * are stored in the w_ member array.
50 *
51 * \param shift vector of integer shift values
52 */
53 void shiftFields(IntVec<D> const & shift);
54
55 using ShiftMoveBaseT = ShiftMoveBase<D,CPT>;
56
57 };
58
59 // Explicit instantiation declarations
60 PSCF_TMPL_DECLARE_CPP(ShiftMove)
61 //extern template class ShiftMove<1,CPT>;
62 //extern template class ShiftMove<2,CPT>;
63 //extern template class ShiftMove<3,CPT>;
64
65} // namespace Rp
66} // namespace Pscf
67#endif
Backend identifier class for the C++ serial CPU backend.
Definition CPT.h:32
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, CPT > & simulator()
Definition McMove.h:342
System< D, CPT > & system()
Definition McMove.h:328
Monte-Carlo simulation coordinator.
Definition McSimulator.h:55
ShiftMoveBase(McSimulator< D, CPT > &simulator)
ShiftMove(McSimulator< D, CPT > &simulator)
Constructor.
Definition ShiftMove.cpp:20
void shiftFields(IntVec< D > const &shift)
Compute and store shifted w fields.
Definition ShiftMove.cpp:29
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.