PSCF v1.4.0
Pscf::Rp::ShiftMove< D, T > Class Template Referenceabstract

ShiftMove rigidly translates the field. More...

#include <ShiftMove.h>

Inheritance diagram for Pscf::Rp::ShiftMove< D, T >:

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.

Detailed Description

template<int D, class T>
class Pscf::Rp::ShiftMove< D, T >

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:

See also
Manual Page.

Definition at line 46 of file fts/montecarlo/ShiftMove.h.

Constructor & Destructor Documentation

◆ ShiftMove()

template<int D, class T>
Pscf::Rp::ShiftMove< D, T >::ShiftMove ( typename T::McSimulator & simulator)
protected

Constructor.

Parameters
simulatorparent McSimulator

Definition at line 26 of file fts/montecarlo/ShiftMove.tpp.

References Util::ParamComposite::setClassName().

◆ ~ShiftMove()

template<int D, class T>
Pscf::Rp::ShiftMove< D, T >::~ShiftMove ( )
protecteddefault

Destructor.

Member Function Documentation

◆ readParameters()

template<int D, class T>
void Pscf::Rpc::ShiftMove< D >::readParameters ( std::istream & in)
override

Read body of parameter file block.

Parameters
ininput parameter file stream

Definition at line 36 of file fts/montecarlo/ShiftMove.tpp.

References Util::ParamComposite::read(), and UTIL_CHECK.

◆ setup()

template<int D, class T>
void Pscf::Rp::ShiftMove< D, T >::setup ( )
override

Setup before the beginning of each simulation run.

Definition at line 57 of file fts/montecarlo/ShiftMove.tpp.

References w_.

◆ attemptMove()

template<int D, class T>
void Pscf::Rpc::ShiftMove< D >::attemptMove ( )
overrideprotected

Attempt move that translates all w fields.

Definition at line 78 of file fts/montecarlo/ShiftMove.tpp.

References shiftFields(), and w_.

◆ shiftFields()

template<int D, class T>
virtual void Pscf::Rp::ShiftMove< D, T >::shiftFields ( IntVec< D > const & shift)
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.

Parameters
shiftvector of integer shift values (# of grid points)

Implemented in Pscf::Rpc::ShiftMove< D >, and Pscf::Rpg::ShiftMove< D >.

Referenced by attemptMove().

◆ shiftField()

template<int D, class T>
void Pscf::Rpc::ShiftMove< D >::shiftField ( Array< double > & out,
Array< double > const & in,
IntVec< D > shift,
IntVec< D > dimensions ) const
protected

Compute a shifted version of a field.

This operation is carried out on the CPU.

Parameters
outshifted field (output)
inoriginal field (input)
shiftvector of integer shift values
dimensionsdimensions 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.

Member Data Documentation

◆ w_

template<int D, class T>
DArray< typename T::RField > Pscf::Rp::ShiftMove< D, T >::w_
mutableprotected

Shifted field configurations.

Definition at line 110 of file fts/montecarlo/ShiftMove.h.

Referenced by attemptMove(), and setup().


The documentation for this class was generated from the following files: