|
CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <DoFSpace.hh>
The DoFSpace class is used to specify a particular degree of freedom space. DoFSpace have:
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::Matrix3l > | m_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 |
| 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
| _shared_prim | The prim structure |
| _dof_key | The DoF type |
| _transformation_matrix_to_super | Specifies the supercell for a local DoF space. Required for local DoF. Ignored for global DoF. |
| _sites | The 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. |
| _basis | The 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.
| 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:
ConfigDoF.local_dof(dof_key).values() corresponding to each row in the DoFSpace basis.Site.occupant_dof(), which is the value of of ConfigDoF.occupation()[site_index].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.
| 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.
| 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:
ConfigDoF.local_dof(dof_key).values() corresponding to each row in the DoFSpace basis.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.
| 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.
| 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.
| 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.
| 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.
| std::shared_ptr< Structure const > const & CASM::DoFSpace::shared_prim | ( | ) | const |
Shared prim structure.
Definition at line 199 of file DoFSpace.cc.
The sites included in a local DoF space. Has value for local DoF.
Definition at line 214 of file DoFSpace.cc.
| 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.
| 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.
|
private |
The local DoF site DoFSet component index corresponding to each dimension (row) of the basis. Has value for local DoF.
Note:
ConfigDoF.local_dof(dof_key).values() corresponding to each row in the DoFSpace basis.Site.occupant_dof(), which is the value of of ConfigDoF.occupation()[site_index]. Definition at line 159 of file DoFSpace.hh.
|
private |
Names the DoF corresponding to each dimension (row) of the basis.
Definition at line 135 of file DoFSpace.hh.
|
private |
The supercell site_index corresponding to each dimension (row) of the basis. Has value for local DoF.
Note:
ConfigDoF.local_dof(dof_key).values() corresponding to each row in the DoFSpace basis.ConfigDoF.occupation() corresponding to each row in the DoFSpace basis. Definition at line 147 of file DoFSpace.hh.
|
private |
The DoF space basis, as a column vector matrix. May be a subspace (cols <= rows).
Definition at line 132 of file DoFSpace.hh.
|
private |
Type of degree of freedom that is under consideration (e.g., "disp", "Hstrain", "occ")
Definition at line 122 of file DoFSpace.hh.
|
private |
Shared prim structure.
Definition at line 118 of file DoFSpace.hh.
The sites included in a local DoF space. Required for local DoF.
Definition at line 128 of file DoFSpace.hh.
|
private |
Specifies the supercell for a local DoF space. Required for local DoF.
Definition at line 125 of file DoFSpace.hh.