|
PSCF v1.4.0
|
SimState stores the state used by a FTS simulation. More...
#include <SimState.h>
Public Member Functions | |
| void | allocate (int nMonomer, IntVec< D > const &dimensions) |
| Allocate memory for stored fields. | |
Public Attributes | |
| DArray< FT > | w |
| Chemical potential fields, r-grid format, indexed by monomer. | |
| DArray< FT > | wc |
| Chemical potential fields, r-grid format, indexed by eigenvector. | |
| DArray< FT > | cc |
| Eigenvector components of c fields on a real space grid. | |
| DArray< FT > | dc |
| Functional derivatives of the Hamiltonian on a real space grid. | |
| double | hamiltonian |
| Field theoretic Hamiltonian value (total). | |
| double | idealHamiltonian |
| Ideal gas contribution to Hamiltonian. | |
| double | fieldHamiltonian |
| Quadratic field contribution to Hamiltonian value. | |
| double | perturbationHamiltonian |
| Perturbation to Hamiltonian value (if any). | |
| bool | needsCc |
| True iff cc fields need to be saved. | |
| bool | needsDc |
| True iff dc fields need to be saved. | |
| bool | needsHamiltonian |
| True iff Hamiltonian components need to be saved. | |
| bool | hasData |
| Does this object currently store data? | |
| bool | isAllocated |
| Has memory been allocated for the fields? | |
Protected Member Functions | |
| SimState () | |
| Constructor. | |
| ~SimState ()=default | |
| Destructor. | |
SimState stores the state used by a FTS simulation.
This class is used to restore the state of FTS simulation after an attempted MC move or BD step is rejected or fails to converge. It is used in Monte Carlo (MC) simulations to restore the state after a rejected move. It is also used less frequently in Brownian dynamics (BD) simulations to restore the previous state if the compressor algorithm (the search for a partial saddle point) fails to converge after an attempted unconstrained BD step.
Specializations of this class template are used as base classes for two closely analogous class templates, also named SimState, that are defined in Rpc and Rpg namespaces and used in the pscf_rpc and pscf_rpg programs, respectively.
Template parameters:
Definition at line 42 of file fts/simulator/SimState.h.
|
protected |
Constructor.
Definition at line 21 of file SimState.tpp.
References fieldHamiltonian, hamiltonian, hasData, idealHamiltonian, isAllocated, needsCc, needsDc, needsHamiltonian, w, and wc.
|
protecteddefault |
Destructor.
| void Pscf::Rp::SimState< D, FT >::allocate | ( | int | nMonomer, |
| IntVec< D > const & | dimensions ) |
Allocate memory for stored fields.
| nMonomer | number of monomer types |
| dimensions | dimensions of discretization grid |
Definition at line 38 of file SimState.tpp.
References cc, dc, isAllocated, needsCc, needsDc, w, and wc.
| DArray<FT> Pscf::Rp::SimState< D, FT >::w |
Chemical potential fields, r-grid format, indexed by monomer.
Field w[i] is the chemical potential field for monomer type i, for i = 0, ..., nMonomer - 1.
Definition at line 55 of file fts/simulator/SimState.h.
Referenced by allocate(), and SimState().
| DArray<FT> Pscf::Rp::SimState< D, FT >::wc |
Chemical potential fields, r-grid format, indexed by eigenvector.
Field wc[i] is a pointwise projection of the w fields onto eigenvector number i of the projected chi matrix. for values i = 0, ..., nMonomer - 1.
Definition at line 64 of file fts/simulator/SimState.h.
Referenced by allocate(), and SimState().
| DArray<FT> Pscf::Rp::SimState< D, FT >::cc |
Eigenvector components of c fields on a real space grid.
Field cc[i] is a point-wise projection of the c fields onto eigenvector number i of the projected chi matrix , for values i = 0, ..., nMonomer - 1.
Definition at line 73 of file fts/simulator/SimState.h.
Referenced by allocate().
| DArray<FT> Pscf::Rp::SimState< D, FT >::dc |
Functional derivatives of the Hamiltonian on a real space grid.
Field dc[i] is the functional derivative of H[W] with respect to w-field component wc[i], indexed by eigenvector index i.
Definition at line 81 of file fts/simulator/SimState.h.
Referenced by allocate().
| double Pscf::Rp::SimState< D, FT >::hamiltonian |
Field theoretic Hamiltonian value (total).
Definition at line 84 of file fts/simulator/SimState.h.
Referenced by SimState().
| double Pscf::Rp::SimState< D, FT >::idealHamiltonian |
Ideal gas contribution to Hamiltonian.
Definition at line 87 of file fts/simulator/SimState.h.
Referenced by SimState().
| double Pscf::Rp::SimState< D, FT >::fieldHamiltonian |
Quadratic field contribution to Hamiltonian value.
Definition at line 90 of file fts/simulator/SimState.h.
Referenced by SimState().
| double Pscf::Rp::SimState< D, FT >::perturbationHamiltonian |
Perturbation to Hamiltonian value (if any).
Definition at line 93 of file fts/simulator/SimState.h.
| bool Pscf::Rp::SimState< D, FT >::needsCc |
True iff cc fields need to be saved.
Definition at line 96 of file fts/simulator/SimState.h.
Referenced by allocate(), and SimState().
| bool Pscf::Rp::SimState< D, FT >::needsDc |
True iff dc fields need to be saved.
Definition at line 99 of file fts/simulator/SimState.h.
Referenced by allocate(), and SimState().
| bool Pscf::Rp::SimState< D, FT >::needsHamiltonian |
True iff Hamiltonian components need to be saved.
Definition at line 102 of file fts/simulator/SimState.h.
Referenced by SimState().
| bool Pscf::Rp::SimState< D, FT >::hasData |
Does this object currently store data?
Definition at line 105 of file fts/simulator/SimState.h.
Referenced by SimState().
| bool Pscf::Rp::SimState< D, FT >::isAllocated |
Has memory been allocated for the fields?
Definition at line 108 of file fts/simulator/SimState.h.
Referenced by allocate(), and SimState().