PSCF v1.3
Pscf::Rpc::Simulator< D > Class Template Reference

Field theoretic simulator (base class). More...

#include <Simulator.h>

Inheritance diagram for Pscf::Rpc::Simulator< D >:
Util::ParamComposite Util::ParamComponent Util::Serializable Util::MpiFileIo Pscf::Rpc::BdSimulator< D > Pscf::Rpc::McSimulator< D >

Public Member Functions

 Simulator (System< D > &system)
 Constructor.
 ~Simulator ()
 Destructor.
void allocate ()
 Allocate required memory.
virtual void readParameters (std::istream &in)
 Read parameters for a simulation.
Primary Actions: Simulation and Analysis
virtual void simulate (int nStep)
 Perform a field theoretic Monte-Carlo simulation.
virtual void analyze (int min, int max, std::string classname, std::string filename)
 Read and analyze a trajectory file.
void clearData ()
 Clear field eigen-components and hamiltonian components.
Timers and Counters
virtual void outputTimers (std::ostream &out) const
 Output timing results.
virtual void outputMdeCounter (std::ostream &out) const
 Output MDE counter.
virtual void clearTimers ()
 Clear timers.
long iStep ()
 Return the current converged simulation step index.
long iTotalStep ()
 Return the current simulation step index.
Projected Chi Matrix
void analyzeChi ()
 Perform eigenvalue analysis of projected chi matrix.
DArray< double > const & chiEvals () const
 Get an array of the eigenvalues of the projected chi matrix.
double chiEval (int a) const
 Get a single eigenvalue of the projected chi matrix.
DMatrix< double > const & chiEvecs () const
 Get the matrix of all eigenvectors of the projected chi matrix.
double chiEvecs (int a, int i) const
 Get one element of an eigenvector of the projected chi matrix.
DArray< double > const & sc () const
 Get all components of the vector S.
double sc (int a) const
 Get a single component of the S vector.
Field Theoretic Hamiltonian
void computeHamiltonian ()
 Compute the Hamiltonian used in PS-FTS.
double hamiltonian () const
 Get the Hamiltonian used in PS-FTS.
double idealHamiltonian () const
 Get ideal gas contribution to the Hamiltonian.
double fieldHamiltonian () const
 Get the quadratic field contribution to the Hamiltonian.
double perturbationHamiltonian () const
 Get the perturbation to the standard Hamiltonian (if any).
bool hasHamiltonian () const
 Has the Hamiltonian been computed for current w and c fields?
Chemical Potential Field (W Field) Components
void computeWc ()
 Compute eigenvector components of the current w fields.
DArray< RField< D > > const & wc () const
 Get all eigenvector components of the current w fields.
RField< D > const & wc (int a) const
 Get one eigenvector component of the current w fields.
bool hasWc () const
 Are eigen-components of current w fields valid ?
Monomer Concentration Field (C-Field) Components
void computeCc ()
 Compute eigenvector components of the current c fields.
DArray< RField< D > > const & cc () const
 Get all eigenvector components of the current c fields.
RField< D > const & cc (int a) const
 Get one eigenvector component of the current c fields.
bool hasCc () const
 Are eigen-components of current c fields valid ?
Functional Derivatives of H[W]
void computeDc ()
 Compute functional derivatives of the Hamiltonian.
DArray< RField< D > > const & dc () const
 Get all of the current d fields.
RField< D > const & dc (int i) const
 Get one eigenvector component of the current d fields.
bool hasDc () const
 Are the current d fields valid ?
Utilities for moves
void saveState ()
 Save a copy of the fts move state.
void restoreState ()
 Restore the saved copy of the fts move state.
void clearState ()
 Clear the saved copy of the fts state.
Miscellaneous
System< D > & system ()
 Get parent system by reference.
Randomrandom ()
 Get random number generator by reference.
bool hasCompressor () const
 Does this Simulator have a Compressor?
Compressor< D > & compressor ()
 Get the compressor by non-const reference.
Compressor< D > const & compressor () const
 Get the compressor by const reference.
bool hasPerturbation () const
 Does this Simulator have a Perturbation?
Perturbation< D > & perturbation ()
 Get the perturbation factory by non-const reference.
Perturbation< D > const & perturbation () const
 Get the associated Perturbation by const reference.
bool hasRamp () const
 Does this Simulator have a Ramp?
Ramp< D > const & ramp () const
 Get the associated Ramp by const reference.
Ramp< D > & ramp ()
 Get the ramp by non-const reference.
Public Member Functions inherited from Util::ParamComposite
 ParamComposite ()
 Constructor.
 ParamComposite (const ParamComposite &other)
 Copy constructor.
 ParamComposite (int capacity)
 Constructor.
virtual ~ParamComposite ()
 Virtual destructor.
void resetParam ()
 Resets ParamComposite to its empty state.
virtual void readParam (std::istream &in)
 Read the parameter file block.
virtual void readParamOptional (std::istream &in)
 Read optional parameter file block.
virtual void writeParam (std::ostream &out) const
 Write all parameters to an output stream.
virtual void load (Serializable::IArchive &ar)
 Load all parameters from an input archive.
virtual void loadOptional (Serializable::IArchive &ar)
 Load an optional ParamComposite.
virtual void loadParameters (Serializable::IArchive &ar)
 Load state from archive, without adding Begin and End lines.
virtual void save (Serializable::OArchive &ar)
 Saves all parameters to an archive.
void saveOptional (Serializable::OArchive &ar)
 Saves isActive flag, and then calls save() iff isActive is true.
void readParamComposite (std::istream &in, ParamComposite &child, bool next=true)
 Add and read a required child ParamComposite.
void readParamCompositeOptional (std::istream &in, ParamComposite &child, bool next=true)
 Add and attempt to read an optional child ParamComposite.
template<typename Type>
ScalarParam< Type > & read (std::istream &in, const char *label, Type &value)
 Add and read a new required ScalarParam < Type > object.
template<typename Type>
ScalarParam< Type > & readOptional (std::istream &in, const char *label, Type &value)
 Add and read a new optional ScalarParam < Type > object.
template<typename Type>
CArrayParam< Type > & readCArray (std::istream &in, const char *label, Type *value, int n)
 Add and read a required C array parameter.
template<typename Type>
CArrayParam< Type > & readOptionalCArray (std::istream &in, const char *label, Type *value, int n)
 Add and read an optional C array parameter.
template<typename Type>
DArrayParam< Type > & readDArray (std::istream &in, const char *label, DArray< Type > &array, int n)
 Add and read a required DArray < Type > parameter.
template<typename Type>
DArrayParam< Type > & readOptionalDArray (std::istream &in, const char *label, DArray< Type > &array, int n)
 Add and read an optional DArray < Type > parameter.
template<typename Type, int N>
FArrayParam< Type, N > & readFArray (std::istream &in, const char *label, FArray< Type, N > &array)
 Add and read a required FArray < Type, N > array parameter.
template<typename Type, int N>
FArrayParam< Type, N > & readOptionalFArray (std::istream &in, const char *label, FArray< Type, N > &array)
 Add and read an optional FArray < Type, N > array parameter.
template<typename Type, int N>
FSArrayParam< Type, N > & readFSArray (std::istream &in, const char *label, FSArray< Type, N > &array, int size)
 Add and read a required FSArray < Type, N > array parameter.
template<typename Type, int N>
FSArrayParam< Type, N > & readOptionalFSArray (std::istream &in, const char *label, FSArray< Type, N > &array, int size)
 Add and read an optional FSArray < Type, N > array parameter.
template<typename Type>
CArray2DParam< Type > & readCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np)
 Add and read a required CArray2DParam < Type > 2D C-array.
template<typename Type>
CArray2DParam< Type > & readOptionalCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np)
 Add and read an optional CArray2DParam < Type > 2D C-array parameter.
template<typename Type>
DMatrixParam< Type > & readDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and read a required DMatrix < Type > matrix parameter.
template<typename Type>
DMatrixParam< Type > & readOptionalDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and read an optional DMatrix < Type > matrix parameter.
template<typename Type>
DSymmMatrixParam< Type > & readDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n)
 Add and read a required symmetrix DMatrix.
template<typename Type>
DSymmMatrixParam< Type > & readOptionalDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n)
 Add and read an optional DMatrix matrix parameter.
BeginreadBegin (std::istream &in, const char *label, bool isRequired=true)
 Add and read a class label and opening bracket.
EndreadEnd (std::istream &in)
 Add and read the closing bracket.
BlankreadBlank (std::istream &in)
 Add and read a new Blank object, representing a blank line.
void loadParamComposite (Serializable::IArchive &ar, ParamComposite &child, bool next=true)
 Add and load a required child ParamComposite.
void loadParamCompositeOptional (Serializable::IArchive &ar, ParamComposite &child, bool next=true)
 Add and load an optional child ParamComposite if isActive.
template<typename Type>
ScalarParam< Type > & loadParameter (Serializable::IArchive &ar, const char *label, Type &value, bool isRequired)
 Add and load a new ScalarParam < Type > object.
template<typename Type>
ScalarParam< Type > & loadParameter (Serializable::IArchive &ar, const char *label, Type &value)
 Add and load new required ScalarParam < Type > object.
template<typename Type>
CArrayParam< Type > & loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n, bool isRequired)
 Add a C array parameter and load its elements.
template<typename Type>
CArrayParam< Type > & loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n)
 Add and load a required CArrayParam< Type > array parameter.
template<typename Type>
DArrayParam< Type > & loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n, bool isRequired)
 Add an load a DArray < Type > array parameter.
template<typename Type>
DArrayParam< Type > & loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n)
 Add and load a required DArray< Type > array parameter.
template<typename Type, int N>
FArrayParam< Type, N > & loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array, bool isRequired)
 Add and load an FArray < Type, N > fixed-size array parameter.
template<typename Type, int N>
FArrayParam< Type, N > & loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array)
 Add and load a required FArray < Type > array parameter.
template<typename Type, int N>
FSArrayParam< Type, N > & loadFSArray (Serializable::IArchive &ar, const char *label, FSArray< Type, N > &array, int size, bool isRequired)
 Add and load an FSArray < Type, N > array parameter.
template<typename Type, int N>
FSArrayParam< Type, N > & loadFSArray (Serializable::IArchive &ar, const char *label, FSArray< Type, N > &array, int size)
 Add and load a required FSArray < Type > array parameter.
template<typename Type>
CArray2DParam< Type > & loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np, bool isRequired)
 Add and load a CArray2DParam < Type > C 2D array parameter.
template<typename Type>
CArray2DParam< Type > & loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np)
 Add and load a required < Type > matrix parameter.
template<typename Type>
DMatrixParam< Type > & loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n, bool isRequired)
 Add and load a DMatrixParam < Type > matrix parameter.
template<typename Type>
DMatrixParam< Type > & loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n)
 Add and load a required DMatrixParam < Type > matrix parameter.
template<typename Type>
DSymmMatrixParam< Type > & loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n, bool isRequired)
 Add and load a symmetric DSymmMatrixParam < Type > matrix parameter.
template<typename Type>
DSymmMatrixParam< Type > & loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n)
 Add and load a required DSymmMatrixParam < Type > matrix parameter.
void addParamComposite (ParamComposite &child, bool next=true)
 Add a child ParamComposite object to the format array.
BeginaddBegin (const char *label)
 Add a Begin object representing a class name and bracket.
EndaddEnd ()
 Add a closing bracket.
BlankaddBlank ()
 Create and add a new Blank object, representing a blank line.
std::string className () const
 Get class name string.
bool isRequired () const
 Is this ParamComposite required in the input file?
bool isActive () const
 Is this parameter active?
Public Member Functions inherited from Util::ParamComponent
virtual ~ParamComponent ()
 Destructor.
void setIndent (const ParamComponent &parent, bool next=true)
 Set indent level.
std::string indent () const
 Return indent string for this object (string of spaces).
template<class Archive>
void serialize (Archive &ar, const unsigned int version)
 Serialize this ParamComponent as a string.
Public Member Functions inherited from Util::Serializable
virtual ~Serializable ()
 Destructor.
Public Member Functions inherited from Util::MpiFileIo
 MpiFileIo ()
 Constructor.
 MpiFileIo (const MpiFileIo &other)
 Copy constructor.
bool isIoProcessor () const
 Can this processor do file I/O ?

Protected Member Functions

void readRandomSeed (std::istream &in)
 Optionally read a random number generator seed.
CompressorFactory< D > & compressorFactory ()
 Get the compressor factory by reference.
void readCompressor (std::istream &in, bool &isEnd)
 Read the compressor block of the parameter file.
PerturbationFactory< D > & perturbationFactory ()
 Get the perturbation factory by reference.
void readPerturbation (std::istream &in, bool &isEnd)
 Optionally read an associated perturbation.
void setPerturbation (Perturbation< D > *ptr)
 Set the associated perturbation.
RampFactory< D > & rampFactory ()
 Get the ramp factory by reference.
void readRamp (std::istream &in, bool &isEnd)
 Optionally read an associated ramp.
void setRamp (Ramp< D > *ptr)
 Set the associated ramp.
void setClassName (const char *className)
 Set class name string.
void setClassName (const char *className)
 Set class name string.
void setIsRequired (bool isRequired)
 Set or unset the isActive flag.
void setIsActive (bool isActive)
 Set or unset the isActive flag.
void setParent (ParamComponent &param, bool next=true)
 Set this to the parent of a child component.
void addComponent (ParamComponent &param, bool isLeaf=true)
 Add a new ParamComponent object to the format array.
template<typename Type>
ScalarParam< Type > & add (std::istream &in, const char *label, Type &value, bool isRequired=true)
 Add a new required ScalarParam < Type > object.
template<typename Type>
CArrayParam< Type > & addCArray (std::istream &in, const char *label, Type *value, int n, bool isRequired=true)
 Add (but do not read) a required C array parameter.
template<typename Type>
DArrayParam< Type > & addDArray (std::istream &in, const char *label, DArray< Type > &array, int n, bool isRequired=true)
 Add (but do not read) a DArray < Type > parameter.
template<typename Type, int N>
FArrayParam< Type, N > & addFArray (std::istream &in, const char *label, FArray< Type, N > &array, bool isRequired=true)
 Add (but do not read) a FArray < Type, N > array parameter.
template<typename Type, int N>
FSArrayParam< Type, N > & addFSArray (std::istream &in, const char *label, FSArray< Type, N > &array, int size, bool isRequired=true)
 Add (but do not read) a FSArray < Type, N > array parameter.
template<typename Type>
CArray2DParam< Type > & addCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np, bool isRequired=true)
 Add (but do not read) a CArray2DParam < Type > 2D C-array.
template<typename Type>
DMatrixParam< Type > & addDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n, bool isRequired=true)
 Add and read a required DMatrix < Type > matrix parameter.
Protected Member Functions inherited from Util::ParamComponent
 ParamComponent ()
 Constructor.
 ParamComponent (const ParamComponent &other)
 Copy constructor.

Protected Attributes

Random random_
 Random number generator.
DArray< RField< D > > wc_
 Eigenvector components of w fields on a real space grid.
DArray< RField< D > > cc_
 Eigenvector components of c fields on a real space grid.
DArray< RField< D > > dc_
 Components of d fields on a real space grid.
SimState< D > state_
 Previous state saved during at the beginning of a step.
double hamiltonian_
 Total field theoretic Hamiltonian H[W] (extensive value).
double idealHamiltonian_
 Ideal gas contribution (-lnQ) to Hamiltonian H[W].
double fieldHamiltonian_
 Field contribution (H_W) to Hamiltonian.
double perturbationHamiltonian_
 Perturbation to the standard Hamiltonian (if any).
long iStep_
 Step counter - attempted steps for which compressor converges.
long iTotalStep_
 Step counter - total number of attempted BD or MC steps.
long seed_
 Random number generator seed.
bool hasHamiltonian_
 Has the Hamiltonian been computed for the current w and c fields?
bool hasWc_
 Have eigen-components of the current w fields been computed ?
bool hasCc_
 Have eigen-components of the current c fields been computed ?
bool hasDc_
 Have functional derivatives of H[W] been computed ?

Additional Inherited Members

Public Types inherited from Util::Serializable
typedef BinaryFileOArchive OArchive
 Type of output archive used by save method.
typedef BinaryFileIArchive IArchive
 Type of input archive used by load method.
Static Public Member Functions inherited from Util::ParamComponent
static void initStatic ()
 Initialize static echo member to false.
static void setEcho (bool echo=true)
 Enable or disable echoing for all subclasses of ParamComponent.
static bool echo ()
 Get echo parameter.

Detailed Description

template<int D>
class Pscf::Rpc::Simulator< D >

Field theoretic simulator (base class).

The Simulator base class provides tools needed in field-theoretic simulations that are based on a partial saddle-point approximation. Subclasses designed for field theoretic Monte Carlo (MC) and Brownian dynamics (BD) simulations, named McSimulator and BdSimulator, provide more specialized algorithms and data structures needed by these two sampling methods.

The Simulator class provides functions to compute and diagonalze a projected chi matrix, functions to access components of several types of fields in a basis of eigenvectors of the projected chi matrix, and functions to compute and return contributions to the field theoretic Hamiltonian.

The analyzeChi function constructs and diagonalizes the projected chi matrix. This is a singular nMonomer x nMonomer matrix defined by evaluating the orthogonal projection of the chi matrix into the subspace of fluctuations that preserves total monomer concentration. The eigenvalues and eigenvectors of this matrix are accessed via the chiEvals and chiEvecs functions, respectively.

The computeWc, computeCc and computeDc functions compute components of various types of multi-component fields (i.e., fields that are associated with a monomer type index) in a basis of eigenvectors of the projected chi matrix. Names such as wc, cc and dc that end with a suffix "c" refer to components of multi-component fields that are defined using this eigenvector basis.

Definition at line 68 of file rpc/fts/simulator/Simulator.h.

Constructor & Destructor Documentation

◆ Simulator()

template<int D>
Pscf::Rpc::Simulator< D >::Simulator ( System< D > & system)

◆ ~Simulator()

template<int D>
Pscf::Rpc::Simulator< D >::~Simulator ( )

Destructor.

Definition at line 71 of file rpc/fts/simulator/Simulator.tpp.

Member Function Documentation

◆ allocate()

template<int D>
void Pscf::Rpc::Simulator< D >::allocate ( )

Allocate required memory.

Values of nMonomer and the mesh dimensions must be defined in Mixture and Domain members of the parent System on entry. This function must be called by the readParameters method of any subclass.

Definition at line 97 of file rpc/fts/simulator/Simulator.tpp.

References cc_, dc_, state_, system(), UTIL_CHECK, and wc_.

Referenced by Pscf::Rpc::BdSimulator< D >::readParameters(), and Pscf::Rpc::McSimulator< D >::readParameters().

◆ readParameters()

template<int D>
void Pscf::Rpc::Simulator< D >::readParameters ( std::istream & in)
virtual

Read parameters for a simulation.

The default implementation reads a Compressor block, an optional random seed, and optional Perturbation, and an optional Ramp, in that order. This is intended to be used by subclasses designed for and BD simulations to read the shared initial parts of the parameter block format, to which blocks for MC moves or a BD step and analyzers can be added by subclasses.

Parameters
ininput parameter stream

Reimplemented from Util::ParamComposite.

Reimplemented in Pscf::Rpc::BdSimulator< D >, and Pscf::Rpc::McSimulator< D >.

Definition at line 138 of file rpc/fts/simulator/Simulator.tpp.

References readCompressor(), readPerturbation(), readRamp(), and readRandomSeed().

◆ simulate()

template<int D>
void Pscf::Rpc::Simulator< D >::simulate ( int nStep)
virtual

Perform a field theoretic Monte-Carlo simulation.

Perform a field theoretic simulation of nSteps using the partial saddle-point approximation.

The default implemention is a do-nothing placeholder that throws an error if called, and must be re-implemented by subclasses.

Parameters
nStepnumber of simulation steps

Reimplemented in Pscf::Rpc::BdSimulator< D >, and Pscf::Rpc::McSimulator< D >.

Definition at line 159 of file rpc/fts/simulator/Simulator.tpp.

References UTIL_THROW.

◆ analyze()

template<int D>
void Pscf::Rpc::Simulator< D >::analyze ( int min,
int max,
std::string classname,
std::string filename )
virtual

Read and analyze a trajectory file.

This function uses an instance of the TrajectoryReader class specified by the "classname" argument to read a trajectory file with the specified filename. The function opens the file, performs the analysis, and closes the file before returning.

The default implemention is a do-nothing placeholder that throws an error if called, and must be re-implemented by subclasses.

Parameters
minfirst frame number
maxlast frame number
classnamename of TrajectoryReader class
filenamename of trajectory file

Reimplemented in Pscf::Rpc::BdSimulator< D >, and Pscf::Rpc::McSimulator< D >.

Definition at line 166 of file rpc/fts/simulator/Simulator.tpp.

References UTIL_THROW.

◆ clearData()

template<int D>
void Pscf::Rpc::Simulator< D >::clearData ( )

Clear field eigen-components and hamiltonian components.

On return from this function, hasHamiltonian(), hasWc(), hasCc(), and hasDc() all return false.

Definition at line 175 of file rpc/fts/simulator/Simulator.tpp.

References hasCc_, hasDc_, hasHamiltonian_, and hasWc_.

Referenced by Pscf::Rpc::BdSimulator< D >::analyze(), and Pscf::Rpc::McSimulator< D >::analyze().

◆ outputTimers()

template<int D>
void Pscf::Rpc::Simulator< D >::outputTimers ( std::ostream & out) const
virtual

Output timing results.

Empty default implementation.

Parameters
outoutput stream

Reimplemented in Pscf::Rpc::McSimulator< D >.

Definition at line 695 of file rpc/fts/simulator/Simulator.tpp.

References outputMdeCounter(), and UTIL_CHECK.

◆ outputMdeCounter()

template<int D>
void Pscf::Rpc::Simulator< D >::outputMdeCounter ( std::ostream & out) const
virtual

Output MDE counter.

Output the number of times the modified diffusion equation has been solved.

Parameters
outoutput stream

Definition at line 706 of file rpc/fts/simulator/Simulator.tpp.

References UTIL_CHECK.

Referenced by outputTimers(), and Pscf::Rpc::McSimulator< D >::simulate().

◆ clearTimers()

template<int D>
void Pscf::Rpc::Simulator< D >::clearTimers ( )
virtual

Clear timers.

Empty default implementation.

Reimplemented in Pscf::Rpc::McSimulator< D >.

Definition at line 718 of file rpc/fts/simulator/Simulator.tpp.

References UTIL_CHECK.

◆ iStep()

template<int D>
long Pscf::Rpc::Simulator< D >::iStep ( )
inline

Return the current converged simulation step index.

Definition at line 1049 of file rpc/fts/simulator/Simulator.h.

References iStep_.

◆ iTotalStep()

template<int D>
long Pscf::Rpc::Simulator< D >::iTotalStep ( )
inline

Return the current simulation step index.

Definition at line 1054 of file rpc/fts/simulator/Simulator.h.

References iTotalStep_.

◆ analyzeChi()

template<int D>
void Pscf::Rpc::Simulator< D >::analyzeChi ( )

Perform eigenvalue analysis of projected chi matrix.

Uses a chi matrix obtained from the Interaction member of the parent System.

Definition at line 292 of file rpc/fts/simulator/Simulator.tpp.

References Util::DArray< Data >::allocate(), Util::DMatrix< Data >::allocate(), Util::Log::file(), system(), and UTIL_CHECK.

◆ chiEvals()

template<int D>
DArray< double > const & Pscf::Rpc::Simulator< D >::chiEvals ( ) const
inline

Get an array of the eigenvalues of the projected chi matrix.

The projected chi matrix is given by the matrix product P*chi*P, where P is the symmetric projection matrix that projects onto the subspace orthogonal to the vector e = (1,1,...,1). The projected chi matrix is singular, and has a zero eigenvalue with associated eigenvector e. By convention, this zero eigenvalue and its eigenvector e are listed last, with index nMonomer - 1.

Definition at line 933 of file rpc/fts/simulator/Simulator.h.

◆ chiEval()

template<int D>
double Pscf::Rpc::Simulator< D >::chiEval ( int a) const
inline

Get a single eigenvalue of the projected chi matrix.

Parameters
aindex of eigenvalue (0, ... , nMonomer - 1)

Definition at line 938 of file rpc/fts/simulator/Simulator.h.

◆ chiEvecs() [1/2]

template<int D>
DMatrix< double > const & Pscf::Rpc::Simulator< D >::chiEvecs ( ) const
inline

Get the matrix of all eigenvectors of the projected chi matrix.

This function returns the entire nMonomer x nMonomer matrix of the eigenvectors of the projected chi matrix, in which each row is an eigenvector. The first (row) index of this matrix thus identifies an eigenvector, while the second (column) index identifies the monomer type associated with one component of an eigen-vector.

Each eigenvector is normalized such that the sum of the squares of its elements is equal to nMonomer, the number of monomer types. The sign of each vector is chosen so as to make the first (0) component non-negative. The last eigenvector is always the null vector e = (1,1,...,1).

For the case nMonomer = 2 of an AB system, the resulting two eigenvectors are (1,-1) and (1,1).

Definition at line 943 of file rpc/fts/simulator/Simulator.h.

◆ chiEvecs() [2/2]

template<int D>
double Pscf::Rpc::Simulator< D >::chiEvecs ( int a,
int i ) const
inline

Get one element of an eigenvector of the projected chi matrix.

See documentation of chiEvecs(), which returns the entire matrix.

Parameters
aeigenvector index (0, ..., nMonomer - 1)
imonomoner type index (0, ..., nMonomer - 1)

Definition at line 948 of file rpc/fts/simulator/Simulator.h.

◆ sc() [1/2]

template<int D>
DArray< double > const & Pscf::Rpc::Simulator< D >::sc ( ) const
inline

Get all components of the vector S.

The value of component \( S_{a} \) may be expressed using Einstein summation convention as

\[ S_{a} \equiv \frac{1}{M^2} v_{ai}\chi_{ij}e_{j} \]

for any \( a = 0, \ldots, M - 1 \), where M = nMonomer (the number of monomer types), \( e_{j} =1 \) for any j, and \( v_{ai} \) is component associated with monomer type i of eigenvector a of the projected chi matrix, with the convention \( v_{ia} = e_{i} = 1 \) for a = nMonomer - 1.

Definition at line 953 of file rpc/fts/simulator/Simulator.h.

◆ sc() [2/2]

template<int D>
double Pscf::Rpc::Simulator< D >::sc ( int a) const
inline

Get a single component of the S vector.

This function retrieves on component of the vector defined in the documentation for function sc().

Parameters
aeigenvector index (0, ..., nMonomer - 1)

Definition at line 958 of file rpc/fts/simulator/Simulator.h.

◆ computeHamiltonian()

◆ hamiltonian()

template<int D>
double Pscf::Rpc::Simulator< D >::hamiltonian ( ) const
inline

Get the Hamiltonian used in PS-FTS.

This function returns the real, thermodynamically extensive Hamiltonian used in simulations based on partial saddle-point approximation (PS-FTS).

Definition at line 965 of file rpc/fts/simulator/Simulator.h.

References hamiltonian_, hasHamiltonian_, and UTIL_CHECK.

Referenced by saveState().

◆ idealHamiltonian()

template<int D>
double Pscf::Rpc::Simulator< D >::idealHamiltonian ( ) const
inline

Get ideal gas contribution to the Hamiltonian.

Definition at line 973 of file rpc/fts/simulator/Simulator.h.

References hasHamiltonian_, idealHamiltonian_, and UTIL_CHECK.

Referenced by saveState().

◆ fieldHamiltonian()

template<int D>
double Pscf::Rpc::Simulator< D >::fieldHamiltonian ( ) const
inline

Get the quadratic field contribution to the Hamiltonian.

Definition at line 981 of file rpc/fts/simulator/Simulator.h.

References fieldHamiltonian_, hasHamiltonian_, and UTIL_CHECK.

Referenced by saveState().

◆ perturbationHamiltonian()

template<int D>
double Pscf::Rpc::Simulator< D >::perturbationHamiltonian ( ) const
inline

Get the perturbation to the standard Hamiltonian (if any).

A perturbation to the Hamiltonian, if any, is computed by an associated Perturbation object. When a perturbation exists, as indicated by hasPerturbation(), the perturbationHamiltonian component is added to the idealHamiltonian and fieldHamiltonian components to obtain the total value that is returned by the hamiltonian() member function.

Definition at line 989 of file rpc/fts/simulator/Simulator.h.

References hasHamiltonian_, perturbationHamiltonian_, and UTIL_CHECK.

Referenced by saveState().

◆ hasHamiltonian()

template<int D>
bool Pscf::Rpc::Simulator< D >::hasHamiltonian ( ) const
inline

Has the Hamiltonian been computed for current w and c fields?

Definition at line 997 of file rpc/fts/simulator/Simulator.h.

References hasHamiltonian_.

Referenced by saveState().

◆ computeWc()

template<int D>
void Pscf::Rpc::Simulator< D >::computeWc ( )

Compute eigenvector components of the current w fields.

Compute and store the components of the values of the w fields on nodes of a real-space grid (r-grid) in a basis of the eigenvectors of the projected chi matrix. The component field \( W_{a}({\bf r}) \) at grid point \( {\bf r} \) is given using Einstein summation by

\[ W_{a}({\bf r}) = v_{ai} w_{i}({\bf r}) / M \]

where \( w_{i}({\bf r}) \) is the w-field associated with monomer type \( i \), \( v_{ai} \) is eigenvector a of the projected chi matrix, and M = nMonomer.

Definition at line 460 of file rpc/fts/simulator/Simulator.tpp.

References hasWc_, system(), UTIL_CHECK, and wc_.

Referenced by computeDc().

◆ wc() [1/2]

template<int D>
DArray< RField< D > > const & Pscf::Rpc::Simulator< D >::wc ( ) const
inline

Get all eigenvector components of the current w fields.

This function returns a DArray of fields in which each field is a chemical field component \( W_{a}({\bf r}) \) as defined in the documentation of computeWc(), for a = 0, ..., nMonomer - 1.

Definition at line 1004 of file rpc/fts/simulator/Simulator.h.

References wc_.

Referenced by saveState().

◆ wc() [2/2]

template<int D>
RField< D > const & Pscf::Rpc::Simulator< D >::wc ( int a) const
inline

Get one eigenvector component of the current w fields.

See documentation of functions computeWc() and wc() for details.

Parameters
aeigenvector index in range 0 , ..., nMonomer -1

Definition at line 1009 of file rpc/fts/simulator/Simulator.h.

References wc_.

◆ hasWc()

template<int D>
bool Pscf::Rpc::Simulator< D >::hasWc ( ) const
inline

Are eigen-components of current w fields valid ?

Definition at line 1014 of file rpc/fts/simulator/Simulator.h.

References hasWc_.

Referenced by saveState().

◆ computeCc()

template<int D>
void Pscf::Rpc::Simulator< D >::computeCc ( )

Compute eigenvector components of the current c fields.

Compute and store the components of the values of the c fields on nodes of a real-space grid (r-grid) in a basis of the eigenvectors of the projected chi matrix.

Definition at line 498 of file rpc/fts/simulator/Simulator.tpp.

References cc_, hasCc_, system(), and UTIL_CHECK.

Referenced by computeDc().

◆ cc() [1/2]

template<int D>
DArray< RField< D > > const & Pscf::Rpc::Simulator< D >::cc ( ) const
inline

Get all eigenvector components of the current c fields.

Each component \(C_{a}({\bf r}) \) is a point-wise projection of the monomer c fields onto a corresponding eigenvector of the projected chi matrix. The resulting value \( C_{a}({\bf r}) \) for eigen-component a at grid point \( {\bf r} \) is given using Einstein notation as

\[ C_{a}({\bf r}) = v_{ai} c_{i}({\bf r}) \]

where \( c_{i}({\bf r}) \) is the concentration / volume fraction field associated with monomer type i.

Note: The above definition \( C_{a} \) uses a different prefactor than that used to define the corresponding w-field component \( W_{a} \) given in the documentation of the function wc(), without the prefactor of 1/nMonomer. This is intentional, and is convenient for other aspects of the underlying theory.

Definition at line 1019 of file rpc/fts/simulator/Simulator.h.

References cc_.

Referenced by saveState().

◆ cc() [2/2]

template<int D>
RField< D > const & Pscf::Rpc::Simulator< D >::cc ( int a) const
inline

Get one eigenvector component of the current c fields.

This returns a reference to a field \( C_{a}({\bf r}) \) as defined in the documentation of function cc().

Parameters
aeigenvector / eigenvalue index

Definition at line 1024 of file rpc/fts/simulator/Simulator.h.

References cc_.

◆ hasCc()

template<int D>
bool Pscf::Rpc::Simulator< D >::hasCc ( ) const
inline

Are eigen-components of current c fields valid ?

Definition at line 1029 of file rpc/fts/simulator/Simulator.h.

References hasCc_.

Referenced by saveState().

◆ computeDc()

template<int D>
void Pscf::Rpc::Simulator< D >::computeDc ( )

Compute functional derivatives of the Hamiltonian.

Compute and store the functional derivatives of the field theoretic Hamiltonian with respect to eigenvector components of the w fields (i.e., with respect to components of wc).

Definition at line 538 of file rpc/fts/simulator/Simulator.tpp.

References cc_, computeCc(), computeWc(), dc_, hasCc_, hasDc_, hasPerturbation(), hasWc_, perturbation(), system(), UTIL_CHECK, and wc_.

◆ dc() [1/2]

template<int D>
DArray< RField< D > > const & Pscf::Rpc::Simulator< D >::dc ( ) const
inline

Get all of the current d fields.

This function returns an array of fields in which element a is the functional derivative of the Hamiltonian H[W] with respect to the field component \( W_{a} \) that is returned by the function wc(a).

Definition at line 1034 of file rpc/fts/simulator/Simulator.h.

References dc_.

Referenced by saveState().

◆ dc() [2/2]

template<int D>
RField< D > const & Pscf::Rpc::Simulator< D >::dc ( int i) const
inline

Get one eigenvector component of the current d fields.

Parameters
ieigenvector / eigenvalue index

Definition at line 1039 of file rpc/fts/simulator/Simulator.h.

References dc_.

◆ hasDc()

template<int D>
bool Pscf::Rpc::Simulator< D >::hasDc ( ) const
inline

Are the current d fields valid ?

Definition at line 1044 of file rpc/fts/simulator/Simulator.h.

References hasDc_.

Referenced by saveState().

◆ saveState()

template<int D>
void Pscf::Rpc::Simulator< D >::saveState ( )

Save a copy of the fts move state.

This function and restoreState() are intended for use in the implementation of field theoretic moves. This function stores the current w fields and the corresponding Hamiltonian value. Current cc fields and dc fields are saved based on save policy. This is normally the first step of a fts move, prior to an attempted modification of the fields stored in the system w field container.

Definition at line 581 of file rpc/fts/simulator/Simulator.tpp.

References cc(), dc(), fieldHamiltonian(), hamiltonian(), hasCc(), hasDc(), hasHamiltonian(), hasPerturbation(), hasWc(), idealHamiltonian(), perturbation(), perturbationHamiltonian(), state_, system(), UTIL_CHECK, and wc().

◆ restoreState()

template<int D>
void Pscf::Rpc::Simulator< D >::restoreState ( )

Restore the saved copy of the fts move state.

This function and saveState() are intended to be used together in the implementation of fts moves. If an attempted Monte-Carle move is rejected or an fts move fails to converge restoreState() is called to restore the fields and Hamiltonian value that were saved by a previous call to the function saveState().

Definition at line 637 of file rpc/fts/simulator/Simulator.tpp.

References cc_, dc_, fieldHamiltonian_, hamiltonian_, hasCc_, hasDc_, hasHamiltonian_, hasPerturbation(), hasWc_, idealHamiltonian_, perturbation(), perturbationHamiltonian_, state_, system(), UTIL_CHECK, and wc_.

◆ clearState()

template<int D>
void Pscf::Rpc::Simulator< D >::clearState ( )

Clear the saved copy of the fts state.

This function, restoreState(), and saveState() are intended to be used together in the implementation of reversible fts moves. If an attempted move is accepted, clearState() is called to indicate the need to recompute some quantities.

Definition at line 687 of file rpc/fts/simulator/Simulator.tpp.

References state_.

◆ system()

◆ random()

template<int D>
Random & Pscf::Rpc::Simulator< D >::random ( )
inline

Get random number generator by reference.

Definition at line 839 of file rpc/fts/simulator/Simulator.h.

References random_.

Referenced by readRandomSeed().

◆ hasCompressor()

◆ compressor() [1/2]

template<int D>
Compressor< D > & Pscf::Rpc::Simulator< D >::compressor ( )
inline

Get the compressor by non-const reference.

Definition at line 857 of file rpc/fts/simulator/Simulator.h.

References hasCompressor(), and UTIL_CHECK.

Referenced by Pscf::Rpc::McSimulator< D >::outputTimers(), and Pscf::Rpc::BdSimulator< D >::simulate().

◆ compressor() [2/2]

template<int D>
Compressor< D > const & Pscf::Rpc::Simulator< D >::compressor ( ) const
inline

Get the compressor by const reference.

Definition at line 865 of file rpc/fts/simulator/Simulator.h.

References hasCompressor(), and UTIL_CHECK.

◆ hasPerturbation()

template<int D>
bool Pscf::Rpc::Simulator< D >::hasPerturbation ( ) const
inline

◆ perturbation() [1/2]

template<int D>
Perturbation< D > & Pscf::Rpc::Simulator< D >::perturbation ( )
inline

Get the perturbation factory by non-const reference.

Definition at line 886 of file rpc/fts/simulator/Simulator.h.

References UTIL_CHECK.

Referenced by computeDc(), computeHamiltonian(), restoreState(), and saveState().

◆ perturbation() [2/2]

template<int D>
Perturbation< D > const & Pscf::Rpc::Simulator< D >::perturbation ( ) const
inline

Get the associated Perturbation by const reference.

Definition at line 878 of file rpc/fts/simulator/Simulator.h.

References UTIL_CHECK.

◆ hasRamp()

template<int D>
bool Pscf::Rpc::Simulator< D >::hasRamp ( ) const
inline

◆ ramp() [1/2]

template<int D>
Ramp< D > const & Pscf::Rpc::Simulator< D >::ramp ( ) const
inline

Get the associated Ramp by const reference.

Definition at line 907 of file rpc/fts/simulator/Simulator.h.

References UTIL_CHECK.

Referenced by Pscf::Rpc::BdSimulator< D >::simulate(), and Pscf::Rpc::McSimulator< D >::simulate().

◆ ramp() [2/2]

template<int D>
Ramp< D > & Pscf::Rpc::Simulator< D >::ramp ( )
inline

Get the ramp by non-const reference.

Definition at line 915 of file rpc/fts/simulator/Simulator.h.

References UTIL_CHECK.

◆ readRandomSeed()

template<int D>
void Pscf::Rpc::Simulator< D >::readRandomSeed ( std::istream & in)
protected

Optionally read a random number generator seed.

Parameters
ininput parameter stream

Definition at line 730 of file rpc/fts/simulator/Simulator.tpp.

References random(), Util::ParamComposite::readOptional(), and seed_.

Referenced by Pscf::Rpc::BdSimulator< D >::readParameters(), Pscf::Rpc::McSimulator< D >::readParameters(), and readParameters().

◆ compressorFactory()

template<int D>
CompressorFactory< D > & Pscf::Rpc::Simulator< D >::compressorFactory ( )
inlineprotected

Get the compressor factory by reference.

Definition at line 844 of file rpc/fts/simulator/Simulator.h.

References UTIL_CHECK.

Referenced by readCompressor().

◆ readCompressor()

template<int D>
void Pscf::Rpc::Simulator< D >::readCompressor ( std::istream & in,
bool & isEnd )
protected

Read the compressor block of the parameter file.

If isEnd it true on entry, the function returns immediately.

Parameters
ininput parameter stream
isEndWas the end bracket of the Simulator block read?

Definition at line 745 of file rpc/fts/simulator/Simulator.tpp.

References Util::ParamComposite::className(), compressorFactory(), Util::ParamComponent::echo(), Util::Log::file(), hasCompressor(), Util::ParamComponent::indent(), and UTIL_CHECK.

Referenced by Pscf::Rpc::BdSimulator< D >::readParameters(), Pscf::Rpc::McSimulator< D >::readParameters(), and readParameters().

◆ perturbationFactory()

template<int D>
PerturbationFactory< D > & Pscf::Rpc::Simulator< D >::perturbationFactory ( )
inlineprotected

Get the perturbation factory by reference.

Definition at line 894 of file rpc/fts/simulator/Simulator.h.

References UTIL_CHECK.

Referenced by readPerturbation().

◆ readPerturbation()

template<int D>
void Pscf::Rpc::Simulator< D >::readPerturbation ( std::istream & in,
bool & isEnd )
protected

Optionally read an associated perturbation.

If isEnd it true on entry, this function returns immediately.

Parameters
ininput parameter stream
isEndWas the end bracket of the Simulator block read?

Definition at line 765 of file rpc/fts/simulator/Simulator.tpp.

References Util::ParamComposite::className(), Util::ParamComponent::echo(), Util::Log::file(), hasPerturbation(), Util::ParamComponent::indent(), perturbationFactory(), and UTIL_CHECK.

Referenced by Pscf::Rpc::BdSimulator< D >::readParameters(), Pscf::Rpc::McSimulator< D >::readParameters(), and readParameters().

◆ setPerturbation()

template<int D>
void Pscf::Rpc::Simulator< D >::setPerturbation ( Perturbation< D > * ptr)
protected

Set the associated perturbation.

Parameters
ptrpointer to a new Perturbation<D> object.

Definition at line 783 of file rpc/fts/simulator/Simulator.tpp.

References UTIL_CHECK.

◆ rampFactory()

template<int D>
RampFactory< D > & Pscf::Rpc::Simulator< D >::rampFactory ( )
inlineprotected

Get the ramp factory by reference.

Definition at line 923 of file rpc/fts/simulator/Simulator.h.

References UTIL_CHECK.

Referenced by readRamp().

◆ readRamp()

template<int D>
void Pscf::Rpc::Simulator< D >::readRamp ( std::istream & in,
bool & isEnd )
protected

Optionally read an associated ramp.

If isEnd it true on entry, this function returns immediately.

Parameters
ininput parameter stream
isEndWas the end bracket of the Simulator block read?

Definition at line 795 of file rpc/fts/simulator/Simulator.tpp.

References Util::ParamComposite::className(), Util::ParamComponent::echo(), Util::Log::file(), Util::ParamComponent::indent(), rampFactory(), and UTIL_CHECK.

Referenced by Pscf::Rpc::BdSimulator< D >::readParameters(), Pscf::Rpc::McSimulator< D >::readParameters(), and readParameters().

◆ setRamp()

template<int D>
void Pscf::Rpc::Simulator< D >::setRamp ( Ramp< D > * ptr)
protected

Set the associated ramp.

Parameters
ptrpointer to a new Ramp<D> object.

Definition at line 812 of file rpc/fts/simulator/Simulator.tpp.

References UTIL_CHECK.

◆ setClassName()

template<int D>
void Util::ParamComposite::setClassName ( const char * className)
protected

Set class name string.

Should be set in subclass constructor.

Definition at line 900 of file ParamComposite.cpp.

Referenced by Simulator().

Member Data Documentation

◆ random_

template<int D>
Random Pscf::Rpc::Simulator< D >::random_
protected

Random number generator.

Definition at line 635 of file rpc/fts/simulator/Simulator.h.

Referenced by random(), and Simulator().

◆ wc_

template<int D>
DArray< RField<D> > Pscf::Rpc::Simulator< D >::wc_
protected

Eigenvector components of w fields on a real space grid.

Each field component corresponds to a point-wise projection of the monomer w fields onto an eigenvector of the projected chi matrix. The number of components is equal to the number of monomer types, nMonomer. The last component is a pressure-like field.

Definition at line 646 of file rpc/fts/simulator/Simulator.h.

Referenced by allocate(), computeDc(), computeHamiltonian(), computeWc(), restoreState(), wc(), and wc().

◆ cc_

template<int D>
DArray< RField<D> > Pscf::Rpc::Simulator< D >::cc_
protected

Eigenvector components of c fields on a real space grid.

Each field component corresponds to a point-wise projection of the monomer c fields onto an eigenvector of the projected chi matrix. The number of components is equal to the number of monomer types, nMonomer. The last component must satisfy an incompressibility constraint.

Definition at line 657 of file rpc/fts/simulator/Simulator.h.

Referenced by allocate(), cc(), cc(), computeCc(), computeDc(), and restoreState().

◆ dc_

template<int D>
DArray< RField<D> > Pscf::Rpc::Simulator< D >::dc_
protected

Components of d fields on a real space grid.

Each field component is the functional derivative of H[W] with respect to one eigenvector w-field component.

Definition at line 665 of file rpc/fts/simulator/Simulator.h.

Referenced by allocate(), computeDc(), dc(), dc(), and restoreState().

◆ state_

template<int D>
SimState<D> Pscf::Rpc::Simulator< D >::state_
mutableprotected

Previous state saved during at the beginning of a step.

This data structure is used to restore a previous state if the compressor fails to converge or if a MC move is rejected.

Definition at line 673 of file rpc/fts/simulator/Simulator.h.

Referenced by allocate(), clearState(), Pscf::Rpc::McSimulator< D >::needsCc(), Pscf::Rpc::McSimulator< D >::needsDc(), Pscf::Rpc::BdSimulator< D >::readParameters(), Pscf::Rpc::McSimulator< D >::readParameters(), restoreState(), and saveState().

◆ hamiltonian_

template<int D>
double Pscf::Rpc::Simulator< D >::hamiltonian_
protected

Total field theoretic Hamiltonian H[W] (extensive value).

Definition at line 678 of file rpc/fts/simulator/Simulator.h.

Referenced by computeHamiltonian(), hamiltonian(), restoreState(), and Simulator().

◆ idealHamiltonian_

template<int D>
double Pscf::Rpc::Simulator< D >::idealHamiltonian_
protected

Ideal gas contribution (-lnQ) to Hamiltonian H[W].

Definition at line 683 of file rpc/fts/simulator/Simulator.h.

Referenced by computeHamiltonian(), idealHamiltonian(), restoreState(), and Simulator().

◆ fieldHamiltonian_

template<int D>
double Pscf::Rpc::Simulator< D >::fieldHamiltonian_
protected

Field contribution (H_W) to Hamiltonian.

Definition at line 688 of file rpc/fts/simulator/Simulator.h.

Referenced by computeHamiltonian(), fieldHamiltonian(), restoreState(), and Simulator().

◆ perturbationHamiltonian_

template<int D>
double Pscf::Rpc::Simulator< D >::perturbationHamiltonian_
protected

Perturbation to the standard Hamiltonian (if any).

A perturbation to the Hamiltonian, if any, is computed by an associated Perturbation object and added to the ideal and field components to obtain the total hamiltonian_ value.

Definition at line 697 of file rpc/fts/simulator/Simulator.h.

Referenced by computeHamiltonian(), perturbationHamiltonian(), restoreState(), and Simulator().

◆ iStep_

template<int D>
long Pscf::Rpc::Simulator< D >::iStep_
protected

Step counter - attempted steps for which compressor converges.

Steps for which the compressor fails to converge are returned to the previous state so that another random displacement can be chosen. Attempted MC moves for which the compressor converged but which are then rejected based on a Metropolis criterion are included in iStep_. The difference iTotalStep_ - iStep_ is the number of moves that failed because the compressor failed to converge.

Definition at line 710 of file rpc/fts/simulator/Simulator.h.

Referenced by Pscf::Rpc::BdSimulator< D >::analyze(), Pscf::Rpc::McSimulator< D >::analyze(), iStep(), Pscf::Rpc::BdSimulator< D >::simulate(), Pscf::Rpc::McSimulator< D >::simulate(), and Simulator().

◆ iTotalStep_

template<int D>
long Pscf::Rpc::Simulator< D >::iTotalStep_
protected

Step counter - total number of attempted BD or MC steps.

Definition at line 715 of file rpc/fts/simulator/Simulator.h.

Referenced by iTotalStep(), Pscf::Rpc::BdSimulator< D >::simulate(), Pscf::Rpc::McSimulator< D >::simulate(), and Simulator().

◆ seed_

template<int D>
long Pscf::Rpc::Simulator< D >::seed_
protected

Random number generator seed.

Definition at line 720 of file rpc/fts/simulator/Simulator.h.

Referenced by readRandomSeed(), and Simulator().

◆ hasHamiltonian_

template<int D>
bool Pscf::Rpc::Simulator< D >::hasHamiltonian_
protected

Has the Hamiltonian been computed for the current w and c fields?

Definition at line 727 of file rpc/fts/simulator/Simulator.h.

Referenced by clearData(), computeHamiltonian(), fieldHamiltonian(), hamiltonian(), hasHamiltonian(), idealHamiltonian(), perturbationHamiltonian(), restoreState(), and Simulator().

◆ hasWc_

template<int D>
bool Pscf::Rpc::Simulator< D >::hasWc_
protected

Have eigen-components of the current w fields been computed ?

Definition at line 732 of file rpc/fts/simulator/Simulator.h.

Referenced by clearData(), computeDc(), computeHamiltonian(), computeWc(), hasWc(), restoreState(), and Simulator().

◆ hasCc_

template<int D>
bool Pscf::Rpc::Simulator< D >::hasCc_
protected

Have eigen-components of the current c fields been computed ?

Definition at line 737 of file rpc/fts/simulator/Simulator.h.

Referenced by clearData(), computeCc(), computeDc(), hasCc(), restoreState(), and Simulator().

◆ hasDc_

template<int D>
bool Pscf::Rpc::Simulator< D >::hasDc_
protected

Have functional derivatives of H[W] been computed ?

Definition at line 742 of file rpc/fts/simulator/Simulator.h.

Referenced by clearData(), computeDc(), hasDc(), restoreState(), and Simulator().


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