PSCF v1.5.0
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 - 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/brownian/BdStep.h> // base class
12#include <util/containers/DArray.h> // member
13
14// Forward declarations
15namespace Pscf {
16 template <int D, class T> class RField;
17}
18
19namespace Pscf {
20namespace Rp {
21
22 using namespace Util;
23
35 template <int D, class T>
36 class PredCorrBdStep : public BdStep<D,T>
37 {
38
39 public:
40
47
48 ~PredCorrBdStep() = default;
49
55 void readParameters(std::istream &in) override;
56
60 void setup() override;
61
67 bool step() override;
68
69 protected:
70
71 // Alias for base class.
72 using BdStepT = BdStep<D,T>;
73
74 // Protected inherited member functions
75 using BdStepT::system;
77
78 private:
79
80 using RFieldT = RField<D,T>;
81
82 // Predicted values of fields (monomer fields)
84
85 // Corrected (final) values of fields (monomer fields)
87
88 // Initial deterministic forces (eigenvector components)
90
91 // Random displacement components (eigenvector components)
93
94 // Change in one component of wc
95 RFieldT dwc_;
96
97 // Change in pressure field component
98 RFieldT dwp_;
99
100 // Prefactor of -dc_ in deterministic drift term
101 double mobility_;
102
103 };
104
105}
106}
107#endif
Brownian dynamics simulator for PS-FTS.
Definition BdSimulator.h:52
BdStep(BdSimulator< D, T > &simulator)
Constructor.
Definition BdStep.tpp:32
BdSimulator< D, T > & simulator()
Get parent BdSimulator object.
Definition BdStep.h:183
System< D, T > & system()
Get parent System object.
Definition BdStep.h:176
PredCorrBdStep(BdSimulator< D, T > &simulator)
Constructor.
BdSimulator< D, T > & simulator()
Get parent BdSimulator object.
Definition BdStep.h:183
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.
Dynamically allocatable contiguous array template.
Definition DArray.h:32
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.