1#ifndef RP_REAL_MOVE_TPP
2#define RP_REAL_MOVE_TPP
12#include <pscf/math/IntVec.h>
22 template <
int D,
class T>
34 template <
int D,
class T>
37 McMoveT::readProbability(in);
46 template <
int D,
class T>
52 const int nMonomer = system().mixture().nMonomer();
53 IntVec<D> meshDimensions = system().domain().mesh().dimensions();
54 w_.allocate(nMonomer);
55 for (
int i = 0; i < nMonomer; ++i) {
56 w_[i].allocate(meshDimensions);
58 dwc_.allocate(meshDimensions);
66 template <
int D,
class T>
70 const int nMonomer = system().mixture().nMonomer();
71 for (
int i = 0; i < nMonomer; ++i) {
78 for (
int j = 0; j < nMonomer - 1; ++j) {
81 vecRandom().normal(dwc_, sigma_, mean);
84 for (
int i = 0; i < nMonomer; ++i) {
85 evec = simulator().chiEvecs(j, i);
91 system().w().setRGrid(w_);
An IntVec<D, T> is a D-component vector of elements of integer type T.
RealMove(typename T::McSimulator &simulator)
Constructor.
void readParameters(std::istream &in) override
Read body of parameter file block.
void attemptMove() override
Attempt unconstrained move.
void setup() override
Setup before the simulation loop.
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 eqV(Array< double > &a, Array< double > const &b, const int beginIdA, const int beginIdB, const int n)
Vector assignment, a[i] = b[i] (real, slice).
void addEqVc(Array< double > &a, Array< double > const &b, const double c)
Add scaled vector in-place, a[i] += b[i]*c (real).
Class templates for real-valued periodic fields.
PSCF package top-level namespace.