CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CanonicalConditions.hh
Go to the documentation of this file.
1 #ifndef CASM_CanonicalConditions_HH
2 #define CASM_CanonicalConditions_HH
3 
5 #include "casm/global/eigen.hh"
6 
7 namespace CASM {
8 class PrimClex;
9 }
10 
11 namespace CASM {
12 namespace Monte {
13 
14 class Settings;
15 
22  public:
25 
33  CanonicalConditions(const PrimClex &_primclex, double _temperature,
34  const Eigen::VectorXd &_param_comp, double _tol);
35 
36  // ***************************************ACCESSORS**********************************************
37  // //
38 
39  const PrimClex &primclex() const;
40 
41  double temperature() const;
42 
43  double beta() const;
44 
47 
49  double param_composition(Index index) const;
50 
53 
55  double mol_composition(Index index) const;
56 
57  double tolerance() const;
58 
59  // ***************************************MUTATORS***********************************************
60  // //
61 
63  void set_temperature(double in_temp);
64 
66  void set_param_composition(const Eigen::VectorXd &in_param_comp);
67 
69  void set_param_composition(Index ind, double in_param_comp);
70 
71  // ***************************************OPERATORS**********************************************
72  // //
73 
76 
80 
83 
87 
89  bool operator==(const CanonicalConditions &RHS) const;
90 
92  bool operator!=(const CanonicalConditions &RHS) const;
93 
95  int operator/(const CanonicalConditions &RHS_inc) const;
96 
97  protected:
99 
102 
104  double m_beta;
105 
108 
110  double m_tolerance;
111 };
112 
113 std::ostream &operator<<(std::ostream &sout, const CanonicalConditions &cond);
114 
115 } // namespace Monte
116 } // namespace CASM
117 
118 #endif
Eigen::VectorXd param_composition() const
parametric composition: comp_x
void set_temperature(double in_temp)
Set the temperature of the current grand canonical condition.
bool operator!=(const CanonicalConditions &RHS) const
Compare temperature and all chemical potentials to *this.
bool operator==(const CanonicalConditions &RHS) const
Compare temperature and all chemical potentials to *this.
int operator/(const CanonicalConditions &RHS_inc) const
Divide ALL parameters and return the greatest number in absolute value.
void set_param_composition(const Eigen::VectorXd &in_param_comp)
Set parametric composition.
const PrimClex & primclex() const
double m_tolerance
Tolerance for comparison operators == and !=.
Eigen::VectorXd m_param_composition
Vector of the param composition.
CanonicalConditions & operator+=(const CanonicalConditions &RHS)
Add temperature and all chemical potentials to *this.
Eigen::VectorXd mol_composition() const
mol composition: comp_n
CanonicalConditions & operator-=(const CanonicalConditions &RHS)
Subtract temperature and all chemical potentials to *this.
CanonicalConditions operator+(const CanonicalConditions &RHS) const
CanonicalConditions()
Default constructor.
double m_beta
Inverse temperature. Includes Boltzmann term.
CanonicalConditions operator-(const CanonicalConditions &RHS) const
PrimClex is the top-level data structure for a CASM project.
Definition: PrimClex.hh:55
std::ostream & operator<<(std::ostream &sout, const CanonicalConditions &cond)
Main CASM namespace.
Definition: APICommand.hh:8
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
Eigen::VectorXd VectorXd