7 : m_type(_traits.
name()), m_n_sublat(_n_sublat), m_n_vol(_n_vol) {}
17 std::vector<SymGroupRepID>
const &_symrep_IDs)
19 m_vals(
Eigen::VectorXi::Zero(_n_sublat * _n_vol)),
20 m_symrep_IDs(_symrep_IDs) {}
31 Eigen::Ref<ValueType const>
const &_values) {
65 Eigen::Ref<ValueType const>
const &_values)
const {
67 std::stringstream msg;
68 msg <<
"Invalid size in LocalDiscreteConfigDoFValues: "
70 <<
", received size=" << _values.size();
71 throw std::runtime_error(msg.str());
77 std::vector<DoFSetInfo>
const &_info) {
79 for (
auto const &_dof_set_info : _info) {
87 std::vector<DoFSetInfo>
const &_info)
89 m_dim(matrix_dim(_info)),
114 Eigen::Ref<const ValueType>
const &_values) {
147 Eigen::Ref<const Eigen::MatrixXd>
const &_standard_values) {
148 if (_standard_values.rows() !=
info().front().basis().rows() ||
150 std::stringstream msg;
151 msg <<
"Invalid standard values input size in "
152 "LocalContinuousConfigDoFValues: "
153 <<
"Expected rows=" <<
info().front().basis().rows()
154 <<
", received rows=" << _standard_values.rows()
156 <<
", received cols=" << _standard_values.cols();
157 throw std::runtime_error(msg.str());
161 info()[b].inv_basis() *
227 Eigen::Ref<ValueType const>
const &_values)
const {
229 std::stringstream msg;
230 msg <<
"Invalid size in LocalContinuousConfigDoFValues: "
231 <<
"Expected rows=" <<
dim() <<
", received rows=" << _values.rows()
233 <<
", received cols=" << _values.cols();
234 throw std::runtime_error(msg.str());
255 Eigen::Ref<const Eigen::MatrixXd>
const &_values) {
275 Eigen::Ref<const Eigen::MatrixXd>
const &_standard_values) {
276 if (_standard_values.size() !=
m_info.
basis().rows()) {
277 std::stringstream msg;
278 msg <<
"Invalid standard values input size in "
279 "GlobalContinuousConfigDoFValues: "
281 <<
", received size=" << _standard_values.size();
282 throw std::runtime_error(msg.str());
304 Eigen::Ref<ValueType const>
const &_values)
const {
306 std::stringstream msg;
307 msg <<
"Invalid size in LocalContinuousConfigDoFValues: "
309 <<
", received size=" << _values.size();
310 throw std::runtime_error(msg.str());
Specifies traits of (possibly) anisotropic crystal properties.
std::string const & type_name() const
ConfigDoFValues(DoF::BasicTraits const &_traits, Index _n_sublat, Index _n_vol)
Eigen::MatrixXd standard_values() const
Get global DoF values as standard DoF values.
GlobalContinuousConfigDoFValues(DoF::BasicTraits const &_traits, Index _n_sublat, Index _n_vol, DoFSetInfo const &_info)
void from_standard_values(Eigen::Ref< const Eigen::MatrixXd > const &_standard_values)
Set global DoF values from standard DoF values.
void _throw_if_invalid_size(Eigen::Ref< ValueType const > const &_values) const
Eigen::VectorXd const & values() const
Const access global DoF values.
Index dim() const
Global DoF vector representation dimension.
void setZero()
Set DoF values to zero.
DoFSetInfo const & info() const
DoFSetInfo provides the basis and symmetry representations for values
void set_values(Eigen::Ref< const Eigen::MatrixXd > const &_values)
Set global DoF values.
std::vector< DoFSetInfo > const & info() const
DoFSetInfo provides the basis and symmetry representations for values
SiteReference site_value(Index l)
Access site DoF value vector.
Index dim() const
maximum DoF vector representation size (max of DoFSetInfo::dim())
const Eigen::Block< const ValueType > ConstSublatReference
static Index matrix_dim(std::vector< DoFSetInfo > const &_info)
local continuous DoF values matrix has #rows == max( DoFSetInfo::dim() )
void from_standard_values(Eigen::Ref< const Eigen::MatrixXd > const &_standard_values)
Set local DoF values from standard DoF values.
std::vector< DoFSetInfo > m_info
void _throw_if_invalid_size(Eigen::Ref< ValueType const > const &_values) const
Eigen::Block< ValueType > SublatReference
LocalContinuousConfigDoFValues(DoF::BasicTraits const &_traits, Index _n_sublat, Index _n_vol, std::vector< DoFSetInfo > const &_info)
ValueType::ColXpr SiteReference
const ValueType::ConstColXpr ConstSiteReference
void set_values(Eigen::Ref< const ValueType > const &_values)
Access site DoF values (prim DoF basis, matrix representing all sites)
SublatReference sublat(Index b)
Access matrix block of values for all sites on one sublattice.
Eigen::MatrixXd const & values() const
Const access DoF values (prim DoF basis, matrix representing all sites)
void setZero()
Set DoF values to zero.
Eigen::MatrixXd standard_values() const
Get local DoF values as standard DoF values.
std::vector< SymGroupRepID > const & symrep_IDs() const
ValueType::ConstSegmentReturnType ConstSublatReference
int & occ(Index i)
Reference occupation value on site i.
std::vector< SymGroupRepID > m_symrep_IDs
LocalDiscreteConfigDoFValues(DoF::BasicTraits const &_traits, Index _n_sublat, Index _n_vol, std::vector< SymGroupRepID > const &_symrep_IDs)
Eigen::VectorXi const & values() const
SublatReference sublat(Index b)
Access vector block of values for all sites on one sublattice.
void _throw_if_invalid_size(Eigen::Ref< ValueType const > const &_values) const
ValueType::SegmentReturnType SublatReference
void set_values(Eigen::Ref< ValueType const > const &_values)
Set occupation values (values are indices into Site::occupant_dof())
void setZero()
Set occupation values to zero.
GenericDatumFormatter< std::string, DataObject > name()
INDEX_TYPE Index
For long integer indexing:
T max(const T &A, const T &B)
Eigen::MatrixXd const & inv_basis() const
Eigen::MatrixXd const & basis() const