|
PSCF v1.5.0
|
SimState stores the state used by a FTS simulation. More...
#include <SimState.h>
Public Member Functions | |
| SimState () | |
| Constructor. | |
| ~SimState ()=default | |
| Destructor. | |
| void | allocate (int nMonomer, IntVec< D > const &dimensions) |
| Allocate memory for stored fields. | |
Public Attributes | |
| DArray< RField< D, T > > | w |
| Chemical potential fields, r-grid format, indexed by monomer. | |
| DArray< RField< D, T > > | wc |
| Chemical potential fields, r-grid format, indexed by eigenvector. | |
| DArray< RField< D, T > > | cc |
| Eigenvector components of c fields on a real space grid. | |
| DArray< RField< D, T > > | 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? | |
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.
Template parameters:
Definition at line 43 of file SimState.h.
| Pscf::Rp::SimState< D, T >::SimState | ( | ) |
Constructor.
Definition at line 23 of file SimState.tpp.
References fieldHamiltonian, hamiltonian, hasData, idealHamiltonian, isAllocated, needsCc, needsDc, needsHamiltonian, w, and wc.
|
default |
Destructor.
References allocate().
| void Pscf::Rp::SimState< D, T >::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 40 of file SimState.tpp.
References cc, needsCc, w, and wc.
Referenced by ~SimState().
| DArray< RField<D,T> > Pscf::Rp::SimState< D, T >::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 78 of file SimState.h.
Referenced by allocate(), and SimState().
| DArray< RField<D,T> > Pscf::Rp::SimState< D, T >::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 87 of file SimState.h.
Referenced by allocate(), and SimState().
| DArray< RField<D,T> > Pscf::Rp::SimState< D, T >::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 96 of file SimState.h.
Referenced by allocate().
| DArray< RField<D,T> > Pscf::Rp::SimState< D, T >::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 104 of file SimState.h.
| double Pscf::Rp::SimState< D, T >::hamiltonian |
Field theoretic Hamiltonian value (total).
Definition at line 107 of file SimState.h.
Referenced by SimState().
| double Pscf::Rp::SimState< D, T >::idealHamiltonian |
Ideal gas contribution to Hamiltonian.
Definition at line 110 of file SimState.h.
Referenced by SimState().
| double Pscf::Rp::SimState< D, T >::fieldHamiltonian |
Quadratic field contribution to Hamiltonian value.
Definition at line 113 of file SimState.h.
Referenced by SimState().
| double Pscf::Rp::SimState< D, T >::perturbationHamiltonian |
Perturbation to Hamiltonian value (if any).
Definition at line 116 of file SimState.h.
| bool Pscf::Rp::SimState< D, T >::needsCc |
True iff cc fields need to be saved.
Definition at line 119 of file SimState.h.
Referenced by allocate(), and SimState().
| bool Pscf::Rp::SimState< D, T >::needsDc |
True iff dc fields need to be saved.
Definition at line 122 of file SimState.h.
Referenced by SimState().
| bool Pscf::Rp::SimState< D, T >::needsHamiltonian |
True iff Hamiltonian components need to be saved.
Definition at line 125 of file SimState.h.
Referenced by SimState().
| bool Pscf::Rp::SimState< D, T >::hasData |
Does this object currently store data?
Definition at line 128 of file SimState.h.
Referenced by SimState().
| bool Pscf::Rp::SimState< D, T >::isAllocated |
Has memory been allocated for the fields?
Definition at line 131 of file SimState.h.
Referenced by SimState().