PSCF v1.4.0
fts/brownian/PredCorrBdStep.h
1#ifndef RP_PRED_CORR_BD_STEP_H
2#define RP_PRED_CORR_BD_STEP_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
12#include <util/containers/DArray.h> // member
13
14namespace Pscf {
15namespace Rp {
16
17 using namespace Util;
18
35 template <int D, class T>
36 class PredCorrBdStep : public T::BdStep
37 {
38
39 public:
40
41 // Protected constructor and destructor (see below).
42
48 void readParameters(std::istream &in) override;
49
53 void setup() override;
54
60 bool step() override;
61
62 protected:
63
69 PredCorrBdStep(typename T::BdSimulator& simulator);
70
71 ~PredCorrBdStep() = default;
72
73 // Alias for base class.
74 using BdStepT = typename T::BdStep;
75
76 // Protected inherited member functions
77 using BdStepT::system;
78 using BdStepT::simulator;
79
80 private:
81
82 using RFieldT = typename T::RField;
83
84 // Predicted values of fields (monomer fields)
86
87 // Corrected (final) values of fields (monomer fields)
89
90 // Initial deterministic forces (eigenvector components)
92
93 // Random displacement components (eigenvector components)
95
96 // Change in one component of wc
97 RFieldT dwc_;
98
99 // Change in pressure field component
100 RFieldT dwp_;
101
102 // Prefactor of -dc_ in deterministic drift term
103 double mobility_;
104
105 };
106
107}
108}
109#endif
PredCorrBdStep(typename T::BdSimulator &simulator)
Constructor.
void readParameters(std::istream &in) override
Read body of parameter file block and allocate memory.
void setup() override
Setup before simulation.
bool step() override
Take a single Brownian dynamics step.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.