PSCF v1.3.1
rpg/fts/brownian/ExplicitBdStep.h
1#ifndef RPG_EXPLICIT_BD_STEP_H
2#define RPG_EXPLICIT_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
30 template <int D>
31 class ExplicitBdStep : public BdStep<D>
32 {
33
34 public:
35
42
48 virtual ~ExplicitBdStep();
49
55 virtual void readParameters(std::istream &in);
56
60 virtual void setup();
61
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 // Local copy of w fields
78
79 // Change in one component of wc
80 RField<D> dwc_;
81
83 RField<D> gaussianField_;
84
85 // Prefactor of -dc_ in deterministic drift term
86 double mobility_;
87
88 };
89
90 // Explicit instantiation declarations
91 extern template class ExplicitBdStep<1>;
92 extern template class ExplicitBdStep<2>;
93 extern template class ExplicitBdStep<3>;
94
95}
96}
97#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.
BdStep is an abstract base class for Brownian dynamics steps.
virtual bool step()
Take a single Brownian dynamics step.
virtual void readParameters(std::istream &in)
Read required parameters from file.
ExplicitBdStep(BdSimulator< D > &simulator)
Constructor.
virtual void setup()
Setup before simulation.
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