1#ifndef RPC_REAL_MOVE_TPP
2#define RPC_REAL_MOVE_TPP
13#include <rpc/fts/montecarlo/McSimulator.h>
14#include <util/param/ParamComposite.h>
15#include <rpc/system/System.h>
16#include <util/random/Random.h>
52 read(in,
"sigma", sigma_);
59 const int nMonomer =
system().mixture().nMonomer();
60 IntVec<D> const & meshDimensions =
system().domain().mesh().dimensions();
62 dwc_.allocate(meshDimensions);
63 w_.allocate(nMonomer);
64 for (
int i = 0; i < nMonomer; ++i) {
65 w_[i].allocate(meshDimensions);
79 const int nMonomer =
system().mixture().nMonomer();
80 const int meshSize =
system().domain().mesh().size();
83 for (
int i = 0; i < nMonomer; ++i) {
84 w_[i] =
system().w().rgrid(i);
88 for (
int j = 0; j < nMonomer - 1; j++){
91 for (
int k = 0; k < meshSize; k++){
92 dwc_[k] = sigma_*
random().gaussian();
97 for (
int i = 0; i < nMonomer; ++i) {
100 for (
int k = 0; k < meshSize; ++k) {
101 w[k] += evec*dwc_[k];
108 system().w().setRGrid(w_);
122 out <<
"RealMove time contributions:\n";
An IntVec<D, T> is a D-component vector of elements of integer type T.
Field of real double precision values on an FFT mesh.
Random & random()
Get Random number generator of parent System.
McMove(McSimulator< D > &simulator)
Constructor.
System< D > & system()
Get parent System object.
McSimulator< D > & simulator()
Get parent McSimulator object.
virtual void outputTimers(std::ostream &out)
Log output timing results.
void readProbability(std::istream &in)
Read the probability from file.
virtual void setup()
Setup before the beginning of each simulation run.
Monte-Carlo simulation coordinator.
void outputTimers(std::ostream &out)
Return real move times contributions.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
void setClassName(const char *className)
Set class name string.
void readParameters(std::istream &in)
Read required parameters from file.
RealMove(McSimulator< D > &simulator)
Constructor.
void output()
Output statistics for this move (at the end of simulation)
void attemptMove()
Attempt unconstrained move.
void setup()
Setup before the beginning of each simulation run.
Real periodic fields, SCFT and PS-FTS (CPU).
PSCF package top-level namespace.