PSCF v1.4.0
fts/montecarlo/RealMove.h
1#ifndef RP_REAL_MOVE_H
2#define RP_REAL_MOVE_H
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 <util/containers/DArray.h> // member
12#include <iostream>
13
14namespace Pscf {
15namespace Rp {
16
17 using namespace Util;
18
35 template <int D, class T>
36 class RealMove : public T::McMove
37 {
38 public:
39
45 void readParameters(std::istream &in) override;
46
50 void setup() override;
51
52 protected:
53
59 RealMove(typename T::McSimulator& simulator);
60
64 ~RealMove() = default;
65
69 void attemptMove() override;
70
71 // Alias for McMove base class.
72 using McMoveT = typename T::McMove;
73
74 // Inherited protected member functions (selected).
75 using McMoveT::system;
76 using McMoveT::simulator;
77 using McMoveT::vecRandom;
78
79 private:
80
81 using RFieldT = typename T::RField;
82
85
87 RFieldT dwc_;
88
90 double sigma_;
91
93 bool isAllocated_;
94
95 };
96
97}
98}
99#endif
~RealMove()=default
Destructor.
RealMove(typename T::McSimulator &simulator)
Constructor.
Definition RealMove.tpp:23
void readParameters(std::istream &in) override
Read body of parameter file block.
Definition RealMove.tpp:35
void attemptMove() override
Attempt unconstrained move.
Definition RealMove.tpp:67
void setup() override
Setup before the simulation loop.
Definition RealMove.tpp:47
Class templates for real-valued periodic fields.
PSCF package top-level namespace.