1#ifndef RP_REAL_MOVE_TPP
2#define RP_REAL_MOVE_TPP
12#include <rp/fts/montecarlo/McSimulator.h>
13#include <rp/fts/simulator/Simulator.h>
14#include <rp/system/System.h>
15#include <rp/solvers/Mixture.h>
16#include <rp/field/Domain.h>
17#include <rp/field/WFields.h>
19#include <pscf/backend/VecRandom.h>
20#include <pscf/backend/VecOp.h>
21#include <pscf/math/IntVec.h>
31 template <
int D,
class T>
43 template <
int D,
class T>
55 template <
int D,
class T>
61 const int nMonomer =
system().mixture().nMonomer();
63 w_.allocate(nMonomer);
64 for (
int i = 0; i < nMonomer; ++i) {
65 w_[i].allocate(meshDimensions);
67 dwc_.allocate(meshDimensions);
75 template <
int D,
class T>
79 const int nMonomer =
system().mixture().nMonomer();
80 for (
int i = 0; i < nMonomer; ++i) {
87 for (
int j = 0; j < nMonomer - 1; ++j) {
93 for (
int i = 0; i < nMonomer; ++i) {
100 system().w().setRGrid(w_);
An IntVec<D, T> is a D-component vector of elements of integer type T.
McSimulator< D, T > & simulator()
Get parent McSimulator object (non-const ref).
void readProbability(std::istream &in)
Read the probability from file.
VecRandom< T > & vecRandom()
Get the vector random number generator.
System< D, T > & system()
Get parent System object (non-const ref).
virtual void setup()
Setup before the beginning of each simulation run.
Monte-Carlo simulation coordinator.
RealMove(McSimulator< D, T > &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).
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.