PSCF v1.3
Pscf::Rpg::SimState< D > Struct Template Reference

SimState stores the state used by an fts simulation. More...

#include <SimState.h>

Public Member Functions

 SimState ()
 Constructor.
 ~SimState ()
 Destructor.
void allocate (int nMonomer, IntVec< D > const &dimensions)
 Allocate memory for fields.

Public Attributes

DArray< RField< D > > w
 Chemical potential fields, r-grid format, indexed by monomer.
DArray< RField< D > > wc
 Chemical potential fields, r-grid format, indexed by eigenvector.
DArray< RField< D > > cc
 Eigenvector components of c fields on a real space grid.
DArray< RField< D > > dc
 Components of functional derivatives of the Hamiltonian fields on a real space grid.
double hamiltonian
 Monte-Carlo Hamiltonian value.
double idealHamiltonian
 Monte-Carlo ideal gas contribution to Hamiltonian value.
double fieldHamiltonian
 Monte-Carlo field part contribution to Hamiltonian value.
double perturbationHamiltonian
 Perturbation to Hamiltonian value (if any).
bool needsCc
 If cc fields needs to be saved.
bool needsDc
 If dc fields needs to be saved.
bool needsHamiltonian
 If hamiltonian needs to be saved.
bool hasData
 Is this struct being used to store data?
bool isAllocated
 Has memory be allocated for the w field?

Detailed Description

template<int D>
struct Pscf::Rpg::SimState< D >

SimState stores the state used by an fts simulation.

Definition at line 27 of file rpg/fts/simulator/SimState.h.

Constructor & Destructor Documentation

◆ SimState()

template<int D>
Pscf::Rpg::SimState< D >::SimState ( )

◆ ~SimState()

template<int D>
Pscf::Rpg::SimState< D >::~SimState ( )

Destructor.

Definition at line 40 of file rpg/fts/simulator/SimState.tpp.

Member Function Documentation

◆ allocate()

template<int D>
void Pscf::Rpg::SimState< D >::allocate ( int nMonomer,
IntVec< D > const & dimensions )

Allocate memory for fields.

Parameters
nMonomernumber of monomer types
dimensionsdimensions of discretization grid

Definition at line 47 of file rpg/fts/simulator/SimState.tpp.

References cc, dc, isAllocated, needsCc, needsDc, w, and wc.

Member Data Documentation

◆ w

template<int D>
DArray< RField<D> > Pscf::Rpg::SimState< D >::w

Chemical potential fields, r-grid format, indexed by monomer.

Definition at line 52 of file rpg/fts/simulator/SimState.h.

Referenced by allocate(), and SimState().

◆ wc

template<int D>
DArray< RField<D> > Pscf::Rpg::SimState< D >::wc

Chemical potential fields, r-grid format, indexed by eigenvector.

Each field is a component projected on pointwise onto a eigenvector of the projected chi matrix, with indices that correspond to eigenvector indices.

Definition at line 61 of file rpg/fts/simulator/SimState.h.

Referenced by allocate(), and SimState().

◆ cc

template<int D>
DArray< RField<D> > Pscf::Rpg::SimState< D >::cc

Eigenvector components of c fields on a real space grid.

Each field component corresponds to a point-wise projection of c onto an eigenvector of the projected chi matrix.

Definition at line 69 of file rpg/fts/simulator/SimState.h.

Referenced by allocate().

◆ dc

template<int D>
DArray< RField<D> > Pscf::Rpg::SimState< D >::dc

Components of functional derivatives of the Hamiltonian 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 78 of file rpg/fts/simulator/SimState.h.

Referenced by allocate().

◆ hamiltonian

template<int D>
double Pscf::Rpg::SimState< D >::hamiltonian

Monte-Carlo Hamiltonian value.

Definition at line 81 of file rpg/fts/simulator/SimState.h.

Referenced by SimState().

◆ idealHamiltonian

template<int D>
double Pscf::Rpg::SimState< D >::idealHamiltonian

Monte-Carlo ideal gas contribution to Hamiltonian value.

Definition at line 84 of file rpg/fts/simulator/SimState.h.

Referenced by SimState().

◆ fieldHamiltonian

template<int D>
double Pscf::Rpg::SimState< D >::fieldHamiltonian

Monte-Carlo field part contribution to Hamiltonian value.

Definition at line 87 of file rpg/fts/simulator/SimState.h.

Referenced by SimState().

◆ perturbationHamiltonian

template<int D>
double Pscf::Rpg::SimState< D >::perturbationHamiltonian

Perturbation to Hamiltonian value (if any).

Definition at line 90 of file rpg/fts/simulator/SimState.h.

◆ needsCc

template<int D>
bool Pscf::Rpg::SimState< D >::needsCc

If cc fields needs to be saved.

Definition at line 93 of file rpg/fts/simulator/SimState.h.

Referenced by allocate(), and SimState().

◆ needsDc

template<int D>
bool Pscf::Rpg::SimState< D >::needsDc

If dc fields needs to be saved.

Definition at line 96 of file rpg/fts/simulator/SimState.h.

Referenced by allocate(), and SimState().

◆ needsHamiltonian

template<int D>
bool Pscf::Rpg::SimState< D >::needsHamiltonian

If hamiltonian needs to be saved.

Definition at line 99 of file rpg/fts/simulator/SimState.h.

Referenced by SimState().

◆ hasData

template<int D>
bool Pscf::Rpg::SimState< D >::hasData

Is this struct being used to store data?

Definition at line 102 of file rpg/fts/simulator/SimState.h.

Referenced by SimState().

◆ isAllocated

template<int D>
bool Pscf::Rpg::SimState< D >::isAllocated

Has memory be allocated for the w field?

Definition at line 105 of file rpg/fts/simulator/SimState.h.

Referenced by allocate(), and SimState().


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