CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <DoF.hh>
A class that represents an individual Degree of Freedom.
Base DoF class associates three pieces of data that identify the degree of freedom
The type_name and variable_name must be set at construction. For local DoF's, the ID can be updated as needed, but IDs of global DoFs persist throughout their lifetime. Optionally, the ID can be 'locked' which prevents it from being changed
Public Types | |
using | RemoteHandle = DoF::RemoteHandle |
Public Member Functions | |
Base () | |
Base (BasicTraits const &traits, std::string const &_var_name, Index _ID) | |
BasicTraits const & | traits () const |
std::string | type_name () const |
Const access of DoF type name. More... | |
std::string | var_name () const |
Const access of variable name. More... | |
Index | ID () const |
Const access of integer ID. More... | |
RemoteHandle | handle () const |
Create a RemoteHandle that refers to this DoF. More... | |
bool | is_locked () const |
true if ID is locked More... | |
void | set_ID (Index new_ID) |
mutator to set integer ID if it is unlocked More... | |
void | lock_ID () |
mutator to lock integer ID More... | |
void | unlock_ID () |
mutator to unlock integer ID More... | |
Private Attributes | |
BasicTraits | m_traits |
std::string | m_var_name |
Index | m_dof_ID |
bool | m_ID_lock |
Locks the ID so that it can't be updated. Is used for global DoF's. More... | |
Base::Base | ( | BasicTraits const & | traits, |
std::string const & | _var_name, | ||
Index | _ID | ||
) |
|
inline |
Create a RemoteHandle that refers to this DoF.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
dof_ID is a way to distinguish between DoFs with the same name but different identities dof_ID for now usually refers to the site index of a cluster (e.g., 0, 1, 2 of a triplet) or an index into the primitive cell neighbor list. Other usage cases may be introduced later
|
private |
|
private |