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/System.h>
19#include <pscf/cuda/CudaRandom.h>
55 read(in,
"sigma", sigma_);
64 const int nMonomer =
system().mixture().nMonomer();
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) {
113 system().w().setRGrid(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.
CudaRandom & cudaRandom()
Get cuda random number generator by reference.
void readProbability(std::istream &in)
Read the probability from file.
McSimulator< D > & simulator()
Get parent McSimulator object.
System< D > & system()
Get parent System object.
virtual void outputTimers(std::ostream &out)
Log output timing results.
virtual void setup()
Setup before the beginning of each simulation run.
McMove(McSimulator< D > &simulator)
Constructor.
Monte-Carlo simulation coordinator.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
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.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.