3 #include <unordered_set>
13 if (dofset.
basis().isIdentity(
TOL) &&
14 dofset.
basis().rows() == dofset.
basis().cols())
25 const DoFSet &other_value)
const {
27 const auto &other_basis = other_value.
basis();
29 if (reference_basis.cols() != other_basis.cols())
return false;
33 if (reference_basis.cols() < other_basis.rows()) {
36 Eigen::MatrixXd aug(reference_basis.rows(), 2 * reference_basis.cols());
37 aug << reference_basis, other_basis;
39 Eigen::ColPivHouseholderQR<Eigen::MatrixXd> qr(aug);
40 qr.setThreshold(
m_tol);
56 if (!(U.transpose() * U).eval().isIdentity(tol)) {
57 throw std::runtime_error(
"Cannot find orthogonal symmetry representation!");
71 transformation_matrix * dof.
basis());
std::string const & name() const
Const access of name.
Eigen::MatrixXd symop_to_matrix(Eigen::Ref< const Eigen::Matrix3d > const &_matrix, Eigen::Ref< const Eigen::Vector3d > const &_tau, bool time_reversal) const
Generate a symmetry representation for the supporting vector space.
std::vector< std::string > const & variable_descriptions() const
Returns expanded description of each standard_var_name.
Eigen::MatrixXd const & basis() const
Matrix that relates DoFSet variables to a conventional coordiante system.
BasicTraits const & traits() const
Returns traits object for the DoF type of this DoFSet.
const std::vector< std::string > & component_names() const
Returns the names of each of the component axes.
const SymOp::matrix_type & get_matrix(const SymOp &op)
bool get_time_reversal(const SymOp &op)
const SymOp::vector_type & get_translation(const SymOp &op)
xtal::Coordinate copy_apply(const xtal::SymOp &op, xtal::Coordinate coord)
Copy and apply SymOp to a Coordinate.
std::vector< std::string > component_descriptions(DoFSet const &dofset)
Eigen::MatrixXd dofset_transformation_matrix(const Eigen::MatrixXd &from_basis, const Eigen::MatrixXd &to_basis, double tol)
Create the symmtery representation for going from one basis to another.
double m_tol
Tolerance value for making comparisons.
bool _traits_match(const DoFSet &other_value) const
Returns true if the traits match. Only compares the names.
bool operator()(const DoFSet &other_value) const
bool _basis_spans_same_space(const DoFSet &other_value) const
DoFSet m_reference_dofset
Values passed to operator() will be compared against this.