1#ifndef RPG_REAL_MOVE_TPP
2#define RPG_REAL_MOVE_TPP
13#include <rpg/fts/montecarlo/McSimulator.h>
14#include <rpg/fts/VecOpFts.h>
15#include <prdc/cuda/VecOp.h>
16#include <pscf/math/IntVec.h>
17#include <util/param/ParamComposite.h>
18#include <rpg/System.h>
19#include <pscf/cuda/CudaRandom.h>
55 read(in,
"sigma", sigma_);
64 const int nMonomer = system().mixture().nMonomer();
65 IntVec<D> meshDimensions = system().domain().mesh().dimensions();
68 w_.allocate(nMonomer);
69 for (
int i=0; i < nMonomer; ++i) {
70 w_[i].allocate(meshDimensions);
72 dwc_.allocate(meshDimensions);
73 gaussianField_.allocate(meshDimensions);
84 const int nMonomer = system().mixture().nMonomer();
85 const int meshSize = system().domain().mesh().size();
89 for (i = 0; i < nMonomer; ++i) {
97 for (j = 0; j < nMonomer - 1; ++j) {
100 cudaRandom().normal(gaussianField_, sigma_, mean);
104 for (i = 0; i < nMonomer; ++i) {
106 evec = simulator().chiEvecs(j,i);
113 system().setWRGrid(w_);
129 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 readParameters(std::istream &in)
Read required parameters from file.
void setClassName(const char *className)
Set class name string.
void attemptMove()
Attempt unconstrained move.
RealMove(McSimulator< D > &simulator)
Constructor.
void setup()
Setup before the beginning of each simulation run.
void outputTimers(std::ostream &out)
Return real move times contributions.
void output()
Output statistics for this move (at the end of simulation)
void eqV(DeviceArray< cudaReal > &a, DeviceArray< cudaReal > const &b, const int beginIdA, const int beginIdB, const int n)
Vector assignment, a[i] = b[i], kernel wrapper (cudaReal).
void addEqVc(DeviceArray< cudaReal > &a, DeviceArray< cudaReal > const &b, cudaReal const c)
Vector addition in-place w/ coefficient, a[i] += b[i] * c, kernel wrapper.
PSCF package top-level namespace.
Utility classes for scientific computation.