Variable#
- class casm.bset.polynomial_functions.Variable(
- name: str,
- key: str,
- cluster_site_index: int | None = None,
- component_index: int | None = None,
- site_basis_function_index: int | None = None,
- neighborhood_site_index: int | None = None,
Bases:
object
Represents a variable in a PolynomialFunction
This class is used to keep the information necessary for collecting the degree of freedom (DoF) values necessary for evaluating polynomial functions.
Constructor
- Parameters:
name (str) –
Name used for identification and printing. For example:
”{e_1}”, “{e_2}”, etc. or “{E_{xx}}”, “{E_{yy}}”, etc. for strain degrees of freedom;
”{d_1}”, “{d_2}”, etc. or “dx”, “dy”, “dz” for displacement degrees of freedom;
”{\\\phi_1}”, “{\\\phi_2}”, etc. for occupation site basis functions, or “{\\\phi_{a,1}}”, “{\\\phi_{a,2}}”, etc. and “{\\\phi_{b,1}}”, “{\\\phi_{b,2}}”, etc. for occupation site basis functions on symmetrically distinct sites \(a\) and \(b\).
key (str) – Name of the degree of freedom (DoF) this variable represents.
cluster_site_index (Optional[int] = None) – For site variables, the cluster site index of the site associated with the variable.
component_index (Optional[int] = None) – For vector-valued continuous variables, the component of the vector this variable corresponds to.
site_basis_function_index (Optional[int] = None) – For discrete occupation variables, the site basis function index this variable corresponds to.
neighborhood_site_index (Optional[int] = None) –
For site variables, the neighbor list index of the site associated with the variable.
Used for printing expressions for evaluation of functions in terms of values on sites determined by the neighbor list position.
Methods
Attributes
Name used for identification and printing.
Name of the degree of freedom (DoF) this variable represents.
For site variables, the cluster site index of the site associated with the variable.
For vector-valued continuous variables, the component of the vector this variable corresponds to.
For occupation variables, the site basis function index this variable corresponds to.
For site variables, the neighbor list index of the site associated with the variable.