|
PSCF v1.4.0
|
FieldState for fields in symmetry-adapted basis format. More...
#include <BasisFieldState.h>
Public Member Functions | |
| void | allocate () |
| Allocate all fields. | |
| void | read (const std::string &filename) |
| Read state from file. | |
| void | write (const std::string &filename) |
| Write state to file. | |
| void | getSystemState () |
| Store the current state of the associated system. | |
| void | setSystemState (bool newCellParams) |
| Set the state of the associated system to this state. | |
| const DArray< FT > & | fields () const |
| Get array of all fields by const reference. | |
| DArray< FT > & | fields () |
| Get array of all chemical potential fields (non-const reference). | |
| const DArray< double > & | field (int monomerId) const |
| Get a field for a single monomer type by const reference. | |
| DArray< double > & | field (int monomerId) |
| Get field for a specific monomer type (non-const reference). | |
| const UnitCell< D > & | unitCell () const |
| Get UnitCell (i.e., lattice type and parameters) by const reference. | |
| UnitCell< D > & | unitCell () |
| Get the UnitCell by non-const reference. | |
| typename T::System & | system () |
| Get associated System by reference. | |
| Public Member Functions inherited from Pscf::Prdc::FieldState< D, DArray< double >, T::System > | |
| FieldState () | |
| Default constructor. | |
| ~FieldState () | |
| Destructor. | |
| void | setSystem (T::System &system) |
| Set association with System, after default construction. | |
| const DArray< FT > & | fields () const |
| Get array of all fields by const reference. | |
| const DArray< double > & | field (int monomerId) const |
| Get a field for a single monomer type by const reference. | |
| const UnitCell< D > & | unitCell () const |
| Get UnitCell (i.e., lattice type and parameters) by const reference. | |
Protected Member Functions | |
| BasisFieldState () | |
| Default constructor. | |
| BasisFieldState (typename T::System &system) | |
| Constructor, create association with a parent system. | |
| Protected Member Functions inherited from Pscf::Prdc::FieldState< D, DArray< double >, T::System > | |
| bool | hasSystem () |
| Has a system been set? | |
| T::System & | system () |
| Get associated System by reference. | |
FieldState for fields in symmetry-adapted basis format.
Instantiations of this class template are used as base classes for two closely analogous class templates, also named BasisFieldState, that are defined in Rpc and Rpg namespaces and used in the pscf_rpc and pscf_rpg programs, respectively.
Template parameters:
Definition at line 36 of file scft/sweep/BasisFieldState.h.
|
protected |
Default constructor.
Definition at line 33 of file BasisFieldState.tpp.
|
protected |
Constructor, create association with a parent system.
| system | associated parent system |
Definition at line 41 of file BasisFieldState.tpp.
References system().
| void Pscf::Rp::BasisFieldState< D, T >::allocate | ( | ) |
Allocate all fields.
Precondition: hasSystem() == true
Definition at line 49 of file BasisFieldState.tpp.
References Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::hasSystem(), and UTIL_CHECK.
Referenced by getSystemState(), and read().
| void Pscf::Rp::BasisFieldState< D, T >::read | ( | const std::string & | filename | ) |
Read state from file.
| filename | name of input w-field file, in basis format |
Definition at line 78 of file BasisFieldState.tpp.
References allocate(), fields(), system(), and unitCell().
Referenced by pscfpp.command.Script::__init__(), pscfpp.field.Field::__init__(), pscfpp.output.Thermo::__init__(), pscfpp.param.Array::__init__(), pscfpp.param.Composite::__init__(), and pscfpp.param.Matrix::__init__().
| void Pscf::Rp::BasisFieldState< D, T >::write | ( | const std::string & | filename | ) |
Write state to file.
| filename | name of output w-field file, in basis format |
Definition at line 89 of file BasisFieldState.tpp.
| void Pscf::Rp::BasisFieldState< D, T >::getSystemState | ( | ) |
Store the current state of the associated system.
Copy the fields and the unit cell.
Definition at line 99 of file BasisFieldState.tpp.
References allocate(), field(), system(), and unitCell().
| void Pscf::Rp::BasisFieldState< D, T >::setSystemState | ( | bool | newCellParams | ) |
Set the state of the associated system to this state.
| newCellParams | update unit cell parameters iff true |
Definition at line 122 of file BasisFieldState.tpp.
References fields(), system(), and unitCell().
| const DArray< FT > & Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::fields | ( | ) | const |
Get array of all fields by const reference.
The array capacity is equal to the number of monomer types.
Referenced by read(), and setSystemState().
| DArray< FT > & Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::fields | ( | ) |
Get array of all chemical potential fields (non-const reference).
The array capacity is equal to the number of monomer types.
| const DArray< double > & Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::field | ( | int | monomerId | ) | const |
Get a field for a single monomer type by const reference.
| monomerId | integer monomer type index |
Referenced by getSystemState().
| DArray< double > & Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::field | ( | int | monomerId | ) |
Get field for a specific monomer type (non-const reference).
| monomerId | integer monomer type index |
| const UnitCell< D > & Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::unitCell | ( | ) | const |
Get UnitCell (i.e., lattice type and parameters) by const reference.
Referenced by getSystemState(), read(), and setSystemState().
| UnitCell< D > & Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::unitCell | ( | ) |
Get the UnitCell by non-const reference.
| typename T::System & Pscf::Prdc::FieldState< D, DArray< double >, typename T::System >::system | ( | ) |
Get associated System by reference.
Referenced by BasisFieldState(), getSystemState(), read(), and setSystemState().