|
PSCF v1.4.0
|
ShiftMove rigidly translates the field. More...
#include <ShiftMove.h>
Public Member Functions | |
| void | readParameters (std::istream &in) override |
| Read body of parameter file block. | |
| void | setup () override |
| Setup before the beginning of each simulation run. | |
Protected Member Functions | |
| ShiftMove (typename T::McSimulator &simulator) | |
| Constructor. | |
| ~ShiftMove ()=default | |
| Destructor. | |
| void | attemptMove () override |
| Attempt move that translates all w fields. | |
| virtual void | shiftFields (IntVec< D > const &shift)=0 |
| Compute and store shifted w fields. | |
| void | shiftField (Array< double > &out, Array< double > const &in, IntVec< D > shift, IntVec< D > dimensions) const |
| Compute a shifted version of a field. | |
Protected Attributes | |
| DArray< typename T::RField > | w_ |
| Shifted field configurations. | |
ShiftMove rigidly translates the field.
An attempted ShiftMove rigidly translates all w fields by a random rigid translation, shifting each coordinate by an integer number of grid points in each direction.
Specializations of this class template are used as base classes for two closely analogous class templates, also both named ShiftMove, that are defined in Rpc and Rpg namespaces for use in the pscf_rpc and pscf_rpg programs, respectively.
Template parameters:
Definition at line 46 of file fts/montecarlo/ShiftMove.h.
|
protected |
Constructor.
| simulator | parent McSimulator |
Definition at line 26 of file fts/montecarlo/ShiftMove.tpp.
References Util::ParamComposite::setClassName().
|
protecteddefault |
Destructor.
|
override |
Read body of parameter file block.
| in | input parameter file stream |
Definition at line 36 of file fts/montecarlo/ShiftMove.tpp.
References Util::ParamComposite::read(), and UTIL_CHECK.
|
override |
Setup before the beginning of each simulation run.
Definition at line 57 of file fts/montecarlo/ShiftMove.tpp.
References w_.
|
overrideprotected |
Attempt move that translates all w fields.
Definition at line 78 of file fts/montecarlo/ShiftMove.tpp.
References shiftFields(), and w_.
|
protectedpure virtual |
Compute and store shifted w fields.
On return, shifted values of fields obtained from system().w() for all monomer types are stored in the w_ member array.
| shift | vector of integer shift values (# of grid points) |
Implemented in Pscf::Rpc::ShiftMove< D >, and Pscf::Rpg::ShiftMove< D >.
Referenced by attemptMove().
|
protected |
Compute a shifted version of a field.
This operation is carried out on the CPU.
| out | shifted field (output) |
| in | original field (input) |
| shift | vector of integer shift values |
| dimensions | dimensions of computational mesh |
Definition at line 97 of file fts/montecarlo/ShiftMove.tpp.
References Util::Array< Data >::capacity(), Pscf::Mesh< D >::position(), Pscf::Mesh< D >::rank(), Pscf::Mesh< D >::size(), and UTIL_CHECK.
|
mutableprotected |
Shifted field configurations.
Definition at line 110 of file fts/montecarlo/ShiftMove.h.
Referenced by attemptMove(), and setup().