PSCF v1.3.1
rpg/fts/brownian/PredCorrBdStep.h
1#ifndef RPG_PRED_CORR_BD_STEP_H
2#define RPG_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 "BdStep.h" // base class
13#include <prdc/cuda/RField.h> // member
14#include <util/containers/DArray.h> // member
15
16namespace Pscf {
17namespace Rpg {
18
19 using namespace Util;
20 using namespace Pscf::Prdc;
21 using namespace Pscf::Prdc::Cuda;
22
28 template <int D>
29 class PredCorrBdStep : public BdStep<D>
30 {
31
32 public:
33
40
46 virtual ~PredCorrBdStep();
47
53 virtual void readParameters(std::istream &in);
54
58 virtual void setup();
59
65 virtual bool step();
66
67 protected:
68
69 using BdStep<D>::system;
70 using BdStep<D>::simulator;
71 using BdStep<D>::cudaRandom;
73
74 private:
75
76 // Predictor value of fields (monomer fields)
78
79 // Correctd (new) values of fields (monomer fields)
81
82 // Initial deterministic forces (components)
83 DArray< RField<D> > dci_;
84
85 // Random displacement components (components)
86 DArray< RField<D> > eta_;
87
88 // Change in one component of wc
89 RField<D> dwc_;
90
91 // Change in pressure field component
92 RField<D> dwp_;
93
94 // Prefactor of -dc_ in deterministic drift term
95 double mobility_;
96
97 };
98
99 // Explicit instantiation declarations
100 extern template class PredCorrBdStep<1>;
101 extern template class PredCorrBdStep<2>;
102 extern template class PredCorrBdStep<3>;
103
104}
105}
106#endif
Field of real double precision values on an FFT mesh.
Definition cpu/RField.h:29
Brownian dynamics simulator.
BdStep(BdSimulator< D > &simulator)
Constructor.
System< D > & system()
Get parent System object.
CudaRandom & cudaRandom()
Get Random number generator of parent System.
BdSimulator< D > & simulator()
Get parent BdSimulator object.
Predictor-corrector Brownian dynamics stepper.
virtual void setup()
Setup before simulation.
virtual bool step()
Take a single Brownian dynamics step.
PredCorrBdStep(BdSimulator< D > &simulator)
Constructor.
virtual void readParameters(std::istream &in)
Read required parameters from file.
Dynamically allocatable contiguous array template.
Definition DArray.h:32
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Definition Reduce.cpp:14
Periodic fields and crystallography.
Definition CField.cpp:11
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Definition param_pc.dox:1