CASM  1.1.0
A Clusters Approach to Statistical Mechanics
StrainDoFTraits.hh
Go to the documentation of this file.
1 #ifndef CASM_StrainDoFTraits
2 #define CASM_StrainDoFTraits
4 
5 namespace CASM {
6 namespace DoF_impl {
8  public:
9  StrainDoFTraits(std::string const &_metric)
10  : DoFType::Traits(AnisoValTraits::strain(_metric)), m_metric(_metric) {}
11 
16  std::pair<Eigen::MatrixXd, std::set<std::string> > find_values(
17  std::map<std::string, Eigen::MatrixXd> const &values) const override;
18 
21  std::vector<BasisSet> construct_site_bases(
22  Structure const &_prim,
23  std::vector<Orbit<PrimPeriodicSymCompare<IntegralCluster> > > &_asym_unit,
24  BasisFunctionSpecs const &_basis_function_specs) const override;
25 
27  jsonParser dof_to_json(ConfigDoF const &_dof,
28  BasicStructure const &_reference) const override;
29 
32  void apply_dof(ConfigDoF const &_dof, BasicStructure const &_reference,
33  SimpleStructure &_struc) const override;
34 
35  protected:
36  DoFType::Traits *_clone() const override {
37  return new StrainDoFTraits(*this);
38  }
39 
40  std::string const m_metric;
41 };
42 } // namespace DoF_impl
43 
44 namespace DoFType {
46 
48 
50 
51 } // namespace DoFType
52 } // namespace CASM
53 #endif
Specifies traits of (possibly) anisotropic crystal properties.
jsonParser dof_to_json(ConfigDoF const &_dof, BasicStructure const &_reference) const override
Serialize strain DoF values from ConfigDoF.
StrainDoFTraits(std::string const &_metric)
DoFType::Traits * _clone() const override
std::vector< BasisSet > construct_site_bases(Structure const &_prim, std::vector< Orbit< PrimPeriodicSymCompare< IntegralCluster > > > &_asym_unit, BasisFunctionSpecs const &_basis_function_specs) const override
Construct the site basis (if DOF_MODE is LOCAL) for a DoF, given its site.
void apply_dof(ConfigDoF const &_dof, BasicStructure const &_reference, SimpleStructure &_struc) const override
Transforms SimpleSructure.
std::pair< Eigen::MatrixXd, std::set< std::string > > find_values(std::map< std::string, Eigen::MatrixXd > const &values) const override
Retrieve the standard values for a DoF from dictionary of properties from properties....
Collection of all the traits specific to a DoF type.
Definition: DoFTraits.hh:59
Traits(AnisoValTraits const &_val_traits, bool _requires_site_basis=false)
Definition: DoFTraits.hh:63
An Orbit of Element.
Definition: Orbit.hh:43
Structure specifies the lattice and atomic basis of a crystal.
Definition: Structure.hh:30
BasicStructure specifies the lattice and atomic basis of a crystal.
Representation of a crystal of molecular and/or atomic occupants, and any additional properties....
DoF_impl::StrainDoFTraits GLstrain()
DoF_impl::StrainDoFTraits Hstrain()
DoF_impl::StrainDoFTraits EAstrain()
Main CASM namespace.
Definition: APICommand.hh:8
Specify how to construct basis functions.