CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::DoFSpace Class Reference

#include <DoFSpace.hh>

Detailed Description

DoFSpace

The DoFSpace class is used to specify a particular degree of freedom space. DoFSpace have:

  • shared_prim (std::shared_ptr<Structure const>): The prim structure
  • dof_key (DoFKey): A string indicating which DoF type (e.g., "disp", "Hstrain", "occ")
  • transformation_matrix_to_super (std::optional<Eigen::Matrix3l>): Specifies the supercell for a local DoF space. Has value for local DoF.
  • sites (std::optional<std::set<Index>>): The sites included in a local DoF space. Has value for local DoF.
  • basis (Eigen::MatrixXd): Allows specifying a subspace of the space determined from dof_key, and for local DoF, transformation_matrix_to_super and sites. Examples:

    For dof_key=="disp", and sites.value().size()==4 (any transformation_matrix_to_super): The default DoF space has dimension 12 corresponding to (x,y,z) for each of the 4 sites. Then, basis is a matrix with 12 rows and 12 or fewer columns.

    For dof_key=="occ", and sites().value().size()==4 (any transformation_matrix_to_super), with the particular sites selected having allowed occupations ["A", "B"], ["A", "B", "C"], ["A, B"], and ["A", "B", "C"] : The default DoF space has dimension 10 = 2 + 3 + 2 + 3. Then, basis is a matrix with 10 rows and 10 or fewer columns.

    For dof_key=="GLstrain": The default DoF space has dimension 6 for the six independent GLstrain components. Then, basis is a matrix with 6 rows and 6 or fewer columns. By default, basis is the full DoF space (identity matrix with dimensions matching the full space for the particular combination of config_region and dof_key).

Definition at line 54 of file DoFSpace.hh.

Public Member Functions

 DoFSpace (std::shared_ptr< Structure const > const &_shared_prim, DoFKey const &_dof_key, std::optional< Eigen::Matrix3l > const &_transformation_matrix_to_super=std::nullopt, std::optional< std::set< Index >> const &_sites=std::nullopt, std::optional< Eigen::MatrixXd > const &_basis=std::nullopt)
 
std::shared_ptr< Structure const > const & shared_prim () const
 Shared prim structure. More...
 
DoFKey const & dof_key () const
 
std::optional< Eigen::Matrix3l > const & transformation_matrix_to_super () const
 Specifies the supercell for a local DoF space. Has value for local DoF. More...
 
std::optional< std::set< Index > > const & sites () const
 The sites included in a local DoF space. Has value for local DoF. More...
 
bool includes_all_sites () const
 True, if local DoF space with all sites in the supercell included. More...
 
Eigen::MatrixXd const & basis () const
 
Index dim () const
 The DoF space dimension (equal to number of rows in basis). More...
 
Index subspace_dim () const
 The DoF subspace dimension (equal to number of columns in basis). More...
 
std::vector< std::string > const & axis_glossary () const
 Names the DoF corresponding to each dimension (row) of the basis. More...
 
std::optional< std::vector< Index > > const & axis_site_index () const
 
std::optional< std::vector< Index > > const & axis_dof_component () const
 

Private Attributes

std::shared_ptr< Structure const > m_shared_prim
 Shared prim structure. More...
 
DoFKey m_dof_key
 
std::optional< Eigen::Matrix3lm_transformation_matrix_to_super
 Specifies the supercell for a local DoF space. Required for local DoF. More...
 
std::optional< std::set< Index > > m_sites
 The sites included in a local DoF space. Required for local DoF. More...
 
Eigen::MatrixXd m_basis
 
std::vector< std::string > m_axis_glossary
 Names the DoF corresponding to each dimension (row) of the basis. More...
 
std::optional< std::vector< Index > > m_axis_site_index
 
std::optional< std::vector< Index > > m_axis_dof_component
 

Constructor & Destructor Documentation

◆ DoFSpace()

CASM::DoFSpace::DoFSpace ( std::shared_ptr< Structure const > const &  _shared_prim,
DoFKey const &  _dof_key,
std::optional< Eigen::Matrix3l > const &  _transformation_matrix_to_super = std::nullopt,
std::optional< std::set< Index >> const &  _sites = std::nullopt,
std::optional< Eigen::MatrixXd > const &  _basis = std::nullopt 
)

DoFSpace constructor

Parameters
_shared_primThe prim structure
_dof_keyThe DoF type
_transformation_matrix_to_superSpecifies the supercell for a local DoF space. Required for local DoF. Ignored for global DoF.
_sitesThe sites included in a local DoF space. For local DoF, default value if none given is all sites in the supercell. Ignored for global DoF.
_basisThe DoFSpace basis, as a column vector matrix. May be a subspace (cols <= rows). If no value, will be set to identity matrix of dimension matching result of get_dof_space_dimension. If has value, dimension must match result of get_dof_space_dimension.

Definition at line 141 of file DoFSpace.cc.

Member Function Documentation

◆ axis_dof_component()

std::optional< std::vector< Index > > const & CASM::DoFSpace::axis_dof_component ( ) const

The local DoF site DoFSet component index corresponding to each dimension (row) of the basis. Has value for local DoF.

Note:

The local DoF site DoFSet component index corresponding to each dimension (row) of the basis. Has value for local DoF.

Definition at line 248 of file DoFSpace.cc.

◆ axis_glossary()

std::vector< std::string > const & CASM::DoFSpace::axis_glossary ( ) const

Names the DoF corresponding to each dimension (row) of the basis.

Definition at line 236 of file DoFSpace.cc.

◆ axis_site_index()

std::optional< std::vector< Index > > const & CASM::DoFSpace::axis_site_index ( ) const

The supercell site_index corresponding to each dimension (row) of the basis. Has value for local DoF.

Note:

  • For continuous DoF this gives the column index in ConfigDoF.local_dof(dof_key).values() corresponding to each row in the DoFSpace basis.
  • For "occ" DoF this gives the site index in ConfigDoF.occupation() corresponding to each row in the DoFSpace basis.

The supercell site_index corresponding to each dimension (row) of the basis. Has value for local DoF.

Definition at line 242 of file DoFSpace.cc.

◆ basis()

Eigen::MatrixXd const & CASM::DoFSpace::basis ( ) const

The DoF space basis, as a column vector matrix. May be a subspace (cols <= rows).

Definition at line 227 of file DoFSpace.cc.

◆ dim()

Index CASM::DoFSpace::dim ( ) const

The DoF space dimension (equal to number of rows in basis).

The DoF space dimensions (equals to number of rows in basis).

Definition at line 230 of file DoFSpace.cc.

◆ dof_key()

DoFKey const & CASM::DoFSpace::dof_key ( ) const

Type of degree of freedom that is under consideration (e.g., "disp", "Hstrain", "occ")

Definition at line 205 of file DoFSpace.cc.

◆ includes_all_sites()

bool CASM::DoFSpace::includes_all_sites ( ) const

True, if local DoF space with all sites in the supercell included.

Definition at line 219 of file DoFSpace.cc.

◆ shared_prim()

std::shared_ptr< Structure const > const & CASM::DoFSpace::shared_prim ( ) const

Shared prim structure.

Definition at line 199 of file DoFSpace.cc.

◆ sites()

std::optional< std::set< Index > > const & CASM::DoFSpace::sites ( ) const

The sites included in a local DoF space. Has value for local DoF.

Definition at line 214 of file DoFSpace.cc.

◆ subspace_dim()

Index CASM::DoFSpace::subspace_dim ( ) const

The DoF subspace dimension (equal to number of columns in basis).

Definition at line 233 of file DoFSpace.cc.

◆ transformation_matrix_to_super()

std::optional< Eigen::Matrix3l > const & CASM::DoFSpace::transformation_matrix_to_super ( ) const

Specifies the supercell for a local DoF space. Has value for local DoF.

Definition at line 208 of file DoFSpace.cc.

Member Data Documentation

◆ m_axis_dof_component

std::optional<std::vector<Index> > CASM::DoFSpace::m_axis_dof_component
private

The local DoF site DoFSet component index corresponding to each dimension (row) of the basis. Has value for local DoF.

Note:

Definition at line 159 of file DoFSpace.hh.

◆ m_axis_glossary

std::vector<std::string> CASM::DoFSpace::m_axis_glossary
private

Names the DoF corresponding to each dimension (row) of the basis.

Definition at line 135 of file DoFSpace.hh.

◆ m_axis_site_index

std::optional<std::vector<Index> > CASM::DoFSpace::m_axis_site_index
private

The supercell site_index corresponding to each dimension (row) of the basis. Has value for local DoF.

Note:

  • For continuous DoF this gives the column index in ConfigDoF.local_dof(dof_key).values() corresponding to each row in the DoFSpace basis.
  • For "occ" DoF this gives the site index in ConfigDoF.occupation() corresponding to each row in the DoFSpace basis.

Definition at line 147 of file DoFSpace.hh.

◆ m_basis

Eigen::MatrixXd CASM::DoFSpace::m_basis
private

The DoF space basis, as a column vector matrix. May be a subspace (cols <= rows).

Definition at line 132 of file DoFSpace.hh.

◆ m_dof_key

DoFKey CASM::DoFSpace::m_dof_key
private

Type of degree of freedom that is under consideration (e.g., "disp", "Hstrain", "occ")

Definition at line 122 of file DoFSpace.hh.

◆ m_shared_prim

std::shared_ptr<Structure const> CASM::DoFSpace::m_shared_prim
private

Shared prim structure.

Definition at line 118 of file DoFSpace.hh.

◆ m_sites

std::optional<std::set<Index> > CASM::DoFSpace::m_sites
private

The sites included in a local DoF space. Required for local DoF.

Definition at line 128 of file DoFSpace.hh.

◆ m_transformation_matrix_to_super

std::optional<Eigen::Matrix3l> CASM::DoFSpace::m_transformation_matrix_to_super
private

Specifies the supercell for a local DoF space. Required for local DoF.

Definition at line 125 of file DoFSpace.hh.


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