PSCF v1.1
Protected Member Functions | List of all members
Pscf::Pspc::FieldState< D, FT > Class Template Reference

Record of a state of a System (fields + unit cell). More...

#include <FieldState.h>

Public Member Functions

Construction and Destruction
 FieldState ()
 Default constructor. More...
 
 FieldState (System< D > &system)
 Constructor, creates association with a System. More...
 
 ~FieldState ()
 Destructor. More...
 
void setSystem (System< D > &system)
 Set association with System, after default construction. More...
 
Accessors
const DArray< FT > & fields () const
 Get array of all fields by const reference. More...
 
DArray< FT > & fields ()
 Get array of all chemical potential fields (non-const reference). More...
 
const FT & field (int monomerId) const
 Get a field for a single monomer type by const reference. More...
 
FT & field (int monomerId)
 Get field for a specific monomer type (non-const reference). More...
 
const UnitCell< D > & unitCell () const
 Get UnitCell (i.e., lattice type and parameters) by const reference. More...
 
UnitCell< D > & unitCell ()
 Get the UnitCell by non-const reference. More...
 

Protected Member Functions

bool hasSystem ()
 Has a system been set? More...
 
System< D > & system ()
 Get associated System by reference. More...
 

Detailed Description

template<int D, class FT>
class Pscf::Pspc::FieldState< D, FT >

Record of a state of a System (fields + unit cell).

The template parameter D is the dimension of space, while parameter FT is a field type.

A FieldState can be used to store either chemical potential or concentration fields, along with an associated UnitCell<D>. Different choices for class FT can be used to store fields in symmetry-adapted basis function, r-grid or k-grid format.

Definition at line 40 of file pspc/sweep/FieldState.h.

Constructor & Destructor Documentation

◆ FieldState() [1/2]

template<int D, class FT >
Pscf::Pspc::FieldState< D, FT >::FieldState

Default constructor.

Definition at line 33 of file pspc/sweep/FieldState.tpp.

◆ FieldState() [2/2]

template<int D, class FT >
Pscf::Pspc::FieldState< D, FT >::FieldState ( System< D > &  system)

Constructor, creates association with a System.

Equivalent to default construction followed by setSystem(system).

Parameters
systemassociated parent System<D> object.

Definition at line 43 of file pspc/sweep/FieldState.tpp.

References Pscf::Pspc::FieldState< D, FT >::setSystem(), and Pscf::Pspc::FieldState< D, FT >::system().

◆ ~FieldState()

template<int D, class FT >
Pscf::Pspc::FieldState< D, FT >::~FieldState

Destructor.

Definition at line 53 of file pspc/sweep/FieldState.tpp.

Member Function Documentation

◆ setSystem()

template<int D, class FT >
void Pscf::Pspc::FieldState< D, FT >::setSystem ( System< D > &  system)

Set association with System, after default construction.

Parameters
systemassociated parent System<D> object.

Definition at line 60 of file pspc/sweep/FieldState.tpp.

Referenced by Pscf::Pspc::Sweep< D >::checkAllocation(), and Pscf::Pspc::FieldState< D, FT >::FieldState().

◆ fields() [1/2]

template<int D, class FT >
const DArray< FT > & Pscf::Pspc::FieldState< D, FT >::fields
inline

Get array of all fields by const reference.

The array capacity is equal to the number of monomer types.

Definition at line 154 of file pspc/sweep/FieldState.h.

Referenced by pscfpp.command.Command::__init__(), pscfpp.text.Record::__init__(), pscfpp.text.Record::__str__(), pscfpp.command.Command::nParam(), pscfpp.command.Command::param(), and pscfpp.command.Command::setParam().

◆ fields() [2/2]

template<int D, class FT >
DArray< FT > & Pscf::Pspc::FieldState< D, FT >::fields
inline

Get array of all chemical potential fields (non-const reference).

The array capacity is equal to the number of monomer types.

Definition at line 160 of file pspc/sweep/FieldState.h.

Referenced by pscfpp.command.Command::__init__(), pscfpp.text.Record::__init__(), pscfpp.text.Record::__str__(), pscfpp.command.Command::nParam(), pscfpp.command.Command::param(), and pscfpp.command.Command::setParam().

◆ field() [1/2]

template<int D, class FT >
const FT & Pscf::Pspc::FieldState< D, FT >::field ( int  monomerId) const
inline

Get a field for a single monomer type by const reference.

Parameters
monomerIdinteger monomer type index

Definition at line 166 of file pspc/sweep/FieldState.h.

◆ field() [2/2]

template<int D, class FT >
FT & Pscf::Pspc::FieldState< D, FT >::field ( int  monomerId)
inline

Get field for a specific monomer type (non-const reference).

Parameters
monomerIdinteger monomer type index

Definition at line 171 of file pspc/sweep/FieldState.h.

◆ unitCell() [1/2]

template<int D, class FT >
const UnitCell< D > & Pscf::Pspc::FieldState< D, FT >::unitCell
inline

Get UnitCell (i.e., lattice type and parameters) by const reference.

Definition at line 177 of file pspc/sweep/FieldState.h.

Referenced by Pscf::Pspc::Sweep< D >::checkAllocation().

◆ unitCell() [2/2]

template<int D, class FT >
UnitCell< D > & Pscf::Pspc::FieldState< D, FT >::unitCell
inline

Get the UnitCell by non-const reference.

Definition at line 182 of file pspc/sweep/FieldState.h.

◆ hasSystem()

template<int D, class FT >
bool Pscf::Pspc::FieldState< D, FT >::hasSystem
inlineprotected

Has a system been set?

Definition at line 189 of file pspc/sweep/FieldState.h.

◆ system()

template<int D, class FT >
System< D > & Pscf::Pspc::FieldState< D, FT >::system
inlineprotected

Get associated System by reference.

Definition at line 194 of file pspc/sweep/FieldState.h.

Referenced by Pscf::Pspc::FieldState< D, FT >::FieldState().


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