CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <ConfigDoFValues.hh>
Stores a vector with local discrete (occupation) DoF values
Notes:
prim.basis()[b].occupant_dof()[this->occ(l)]
, where the sublattice, b = l / this->n_vol()
.See ConfigDoF documentation for more details on how DoF values are stored.
The vector size is fixed at construction and attempts to change it, other than via a complete copy, will cause an exception to be thrown.
Definition at line 38 of file ConfigDoFValues.hh.
Public Types | |
typedef Eigen::VectorXi | ValueType |
typedef Eigen::VectorXi & | Reference |
typedef Eigen::VectorXi const & | ConstReference |
typedef ValueType::Scalar | SiteValueType |
typedef int & | SiteReference |
typedef const int & | ConstSiteReference |
typedef ValueType | SublatValueType |
typedef ValueType::SegmentReturnType | SublatReference |
typedef ValueType::ConstSegmentReturnType | ConstSublatReference |
Public Member Functions | |
LocalDiscreteConfigDoFValues (DoF::BasicTraits const &_traits, Index _n_sublat, Index _n_vol, std::vector< SymGroupRepID > const &_symrep_IDs) | |
int & | occ (Index i) |
Reference occupation value on site i. More... | |
void | set_values (Eigen::Ref< ValueType const > const &_values) |
Set occupation values (values are indices into Site::occupant_dof()) More... | |
void | setZero () |
Set occupation values to zero. More... | |
Eigen::VectorXi const & | values () const |
SublatReference | sublat (Index b) |
Access vector block of values for all sites on one sublattice. More... | |
ConstSublatReference | sublat (Index b) const |
Const access vector block of values for all sites on one sublattice. More... | |
std::vector< SymGroupRepID > const & | symrep_IDs () const |
std::string const & | type_name () const |
Index | n_vol () const |
Index | n_sublat () const |
Private Member Functions | |
void | _throw_if_invalid_size (Eigen::Ref< ValueType const > const &_values) const |
Private Attributes | |
ValueType | m_vals |
std::vector< SymGroupRepID > | m_symrep_IDs |
DoFKey | m_type |
Index | m_n_sublat |
Index | m_n_vol |
typedef Eigen::VectorXi const& CASM::LocalDiscreteConfigDoFValues::ConstReference |
Definition at line 42 of file ConfigDoFValues.hh.
typedef const int& CASM::LocalDiscreteConfigDoFValues::ConstSiteReference |
Definition at line 46 of file ConfigDoFValues.hh.
typedef ValueType::ConstSegmentReturnType CASM::LocalDiscreteConfigDoFValues::ConstSublatReference |
Definition at line 50 of file ConfigDoFValues.hh.
typedef Eigen::VectorXi& CASM::LocalDiscreteConfigDoFValues::Reference |
Definition at line 41 of file ConfigDoFValues.hh.
typedef int& CASM::LocalDiscreteConfigDoFValues::SiteReference |
Definition at line 45 of file ConfigDoFValues.hh.
typedef ValueType::Scalar CASM::LocalDiscreteConfigDoFValues::SiteValueType |
Definition at line 44 of file ConfigDoFValues.hh.
typedef ValueType::SegmentReturnType CASM::LocalDiscreteConfigDoFValues::SublatReference |
Definition at line 49 of file ConfigDoFValues.hh.
Definition at line 48 of file ConfigDoFValues.hh.
typedef Eigen::VectorXi CASM::LocalDiscreteConfigDoFValues::ValueType |
Definition at line 40 of file ConfigDoFValues.hh.
CASM::LocalDiscreteConfigDoFValues::LocalDiscreteConfigDoFValues | ( | DoF::BasicTraits const & | _traits, |
Index | _n_sublat, | ||
Index | _n_vol, | ||
std::vector< SymGroupRepID > const & | _symrep_IDs | ||
) |
Definition at line 15 of file ConfigDoFValues.cc.
|
private |
Definition at line 64 of file ConfigDoFValues.cc.
|
inherited |
Definition at line 13 of file ConfigDoFValues.cc.
|
inherited |
Definition at line 11 of file ConfigDoFValues.cc.
int & CASM::LocalDiscreteConfigDoFValues::occ | ( | Index | i | ) |
Reference occupation value on site i.
Definition at line 23 of file ConfigDoFValues.cc.
void CASM::LocalDiscreteConfigDoFValues::set_values | ( | Eigen::Ref< ValueType const > const & | _values | ) |
Set occupation values (values are indices into Site::occupant_dof())
Set occupation values (values are indices into Site::occupant_dof())
std::runtime_error | ("Invalid size in LocalDiscreteConfigDoFValues...") if size does not match _n_sublat * _n_vol |
Definition at line 30 of file ConfigDoFValues.cc.
void CASM::LocalDiscreteConfigDoFValues::setZero | ( | ) |
Set occupation values to zero.
Definition at line 37 of file ConfigDoFValues.cc.
LocalDiscreteConfigDoFValues::SublatReference CASM::LocalDiscreteConfigDoFValues::sublat | ( | Index | b | ) |
Access vector block of values for all sites on one sublattice.
Definition at line 47 of file ConfigDoFValues.cc.
LocalDiscreteConfigDoFValues::ConstSublatReference CASM::LocalDiscreteConfigDoFValues::sublat | ( | Index | b | ) | const |
Const access vector block of values for all sites on one sublattice.
Definition at line 53 of file ConfigDoFValues.cc.
std::vector< SymGroupRepID > const & CASM::LocalDiscreteConfigDoFValues::symrep_IDs | ( | ) | const |
Provides the symmetry representations for transforming values
(i.e. due to molecule orientation, not for permuting sites)
Definition at line 59 of file ConfigDoFValues.cc.
|
inherited |
Definition at line 9 of file ConfigDoFValues.cc.
Eigen::VectorXi const & CASM::LocalDiscreteConfigDoFValues::values | ( | ) | const |
Const access occupation values (values are indices into Site::occupant_dof())
Definition at line 41 of file ConfigDoFValues.cc.
|
privateinherited |
Definition at line 21 of file ConfigDoFValues.hh.
|
privateinherited |
Definition at line 22 of file ConfigDoFValues.hh.
|
private |
Definition at line 83 of file ConfigDoFValues.hh.
|
privateinherited |
Definition at line 20 of file ConfigDoFValues.hh.
|
private |
Definition at line 82 of file ConfigDoFValues.hh.