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.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) {
99 evec = simulator().chiEvecs(j, i);
100 for (
int k = 0; k < meshSize; ++k) {
101 w[k] += evec*dwc_[k];
108 system().setWRGrid(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.
McMove is an abstract base class for Monte Carlo moves.
virtual void outputTimers(std::ostream &out)
Log output timing results.
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.
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.
PSCF package top-level namespace.
Utility classes for scientific computation.