CASM  1.1.0
A Clusters Approach to Statistical Mechanics
ConfigEnumStrain.hh
Go to the documentation of this file.
1 #ifndef CASM_ConfigEnumStrain
2 #define CASM_ConfigEnumStrain
3 
9 
10 namespace CASM {
11 
12 namespace SymRepTools_v2 {
13 class SubWedge;
14 }
15 
16 class ConfigEnumInput;
17 
21 
31  std::vector<SymRepTools_v2::SubWedge> wedges;
32 
33  // The options "min_val", "inc_val", "max_val" defines a grid of points to
34  // sample along each wedge axis. Must have same dimension as the number of
35  // subwedge axes columns.
36 
40 
41  // If true, set min_val[i]=-max_val[i], for strain components, i, with
42  // multiplicity==1 Typically, set to true if using symmetry adapted axes
43  bool auto_range = true;
44 
47  bool trim_corners = true;
48 };
49 
54 class ConfigEnumStrain : public InputEnumeratorBase<Configuration> {
55  // -- Required members -------------------
56 
57  public:
58  ConfigEnumStrain(ConfigEnumInput const &initial_state,
59  ConfigEnumStrainParams const &params);
60 
61  ConfigEnumStrain(ConfigEnumInput const &initial_state,
62  std::vector<SymRepTools_v2::SubWedge> const &wedges,
63  Eigen::VectorXd min_val, Eigen::VectorXd max_val,
64  Eigen::VectorXd inc_val, DoFKey const &strain_key,
65  bool auto_range, bool trim_corners);
66 
67  std::string name() const override;
68 
69  static const std::string enumerator_name;
70 
71  Index subwedge_index() const;
72 
74 
75  private:
77  void increment() override;
78 
79  // -- Unique -------------------
81 
83 
85 
86  // counts over strain grid
88 
89  // counts over transformation matrices
91 
92  std::vector<SymRepTools_v2::SubWedge> m_wedges;
93 
94  // set of non-equivalent transformation matrices matrices that, along with
95  // m_counter define irreducible space std::vector<Eigen::MatrixXd>
96  // m_trans_mats;
99 
101  const PermuteIterator &_perm_end() { return m_perm_end; }
102 };
103 
104 } // namespace CASM
105 
106 #endif
const PermuteIterator & _perm_end()
PermuteIterator m_perm_begin
const PermuteIterator & _perm_begin()
static const std::string enumerator_name
std::string name() const override
Derived enumerators must implement name, via ENUM_MEMBERS.
Eigen::VectorXd normal_coordinate() const
EigenCounter< Eigen::VectorXd > m_counter
Eigen::MatrixXd m_shape_factor
ConfigEnumStrain(ConfigEnumInput const &initial_state, ConfigEnumStrainParams const &params)
void increment() override
Implements increment over all strain states.
PermuteIterator m_perm_end
std::vector< SymRepTools_v2::SubWedge > m_wedges
A Counter allows looping over many incrementing variables in one loop.
Definition: Counter.hh:109
Base class for implementing specialized input enumerators.
Main CASM namespace.
Definition: APICommand.hh:8
Eigen::MatrixXd MatrixXd
std::string DoFKey
Definition: DoFDecl.hh:7
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
Eigen::VectorXd VectorXd
std::vector< SymRepTools_v2::SubWedge > wedges
DoFKey dof
Type of strain.