PSCF v1.2
Pscf::Rpc::BasisFieldState< D > Class Template Reference

FieldState for fields in symmetry-adapted basis format. More...

#include <BasisFieldState.h>

Inheritance diagram for Pscf::Rpc::BasisFieldState< D >:
Pscf::Rpc::FieldState< D, DArray< double > >

Public Member Functions

 BasisFieldState ()
 Default constructor.
 
 BasisFieldState (System< D > &system)
 Constructor, create association with a parent system.
 
 ~BasisFieldState ()
 Destructor.
 
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 ()
 Copy the current state of the associated system.
 
void setSystemState (bool isFlexible)
 Set the state of the associated system to this state.
 
- Public Member Functions inherited from Pscf::Rpc::FieldState< D, DArray< double > >
 FieldState ()
 Default constructor.
 
 FieldState (System< D > &system)
 Constructor, creates association with a System.
 
 ~FieldState ()
 Destructor.
 
void setSystem (System< D > &system)
 Set association with System, after default construction.
 
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.
 

Additional Inherited Members

- Protected Member Functions inherited from Pscf::Rpc::FieldState< D, DArray< double > >
bool hasSystem ()
 Has a system been set?
 
System< D > & system ()
 Get associated System by reference.
 

Detailed Description

template<int D>
class Pscf::Rpc::BasisFieldState< D >

FieldState for fields in symmetry-adapted basis format.

Definition at line 24 of file rpc/scft/sweep/BasisFieldState.h.

Constructor & Destructor Documentation

◆ BasisFieldState() [1/2]

template<int D>
Pscf::Rpc::BasisFieldState< D >::BasisFieldState ( )

Default constructor.

Definition at line 25 of file rpc/scft/sweep/BasisFieldState.tpp.

◆ BasisFieldState() [2/2]

template<int D>
Pscf::Rpc::BasisFieldState< D >::BasisFieldState ( System< D > & system)

Constructor, create association with a parent system.

Parameters
systemassociated parent system

Definition at line 33 of file rpc/scft/sweep/BasisFieldState.tpp.

◆ ~BasisFieldState()

template<int D>
Pscf::Rpc::BasisFieldState< D >::~BasisFieldState ( )

Destructor.

Definition at line 41 of file rpc/scft/sweep/BasisFieldState.tpp.

Member Function Documentation

◆ allocate()

template<int D>
void Pscf::Rpc::BasisFieldState< D >::allocate ( )

Allocate all fields.

Precondition: hasSystem() == true

Definition at line 48 of file rpc/scft/sweep/BasisFieldState.tpp.

References UTIL_CHECK.

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

◆ read()

template<int D>
void Pscf::Rpc::BasisFieldState< D >::read ( const std::string & filename)

◆ write()

template<int D>
void Pscf::Rpc::BasisFieldState< D >::write ( const std::string & filename)

Write state to file.

Write fields in symmetry-adapted basis format.

Parameters
filenamename of output file, in symmetry-adapated format.

Definition at line 90 of file rpc/scft/sweep/BasisFieldState.tpp.

References Pscf::Prdc::FieldIoReal< D, RFRT, RFKT, FFTT >::writeFieldsBasis().

◆ getSystemState()

template<int D>
void Pscf::Rpc::BasisFieldState< D >::getSystemState ( )

Copy the current state of the associated system.

Copy the fields and the unit cell.

Definition at line 100 of file rpc/scft/sweep/BasisFieldState.tpp.

◆ setSystemState()

template<int D>
void Pscf::Rpc::BasisFieldState< D >::setSystemState ( bool isFlexible)

Set the state of the associated system to this state.

Parameters
isFlexibleupdate system unit cell iff isFlexible == true.

Definition at line 123 of file rpc/scft/sweep/BasisFieldState.tpp.


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