CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CanonicalConditions.hh
Go to the documentation of this file.
1 #ifndef CASM_CanonicalConditions_HH
2 #define CASM_CanonicalConditions_HH
3 
5 
6 namespace CASM {
7 
8  class PrimClex;
9 
10  namespace Monte {
11 
12  class MonteSettings;
13 
20  public:
21 
24 
32  CanonicalConditions(const PrimClex &_primclex,
33  double _temperature,
34  const Eigen::VectorXd &_param_comp,
35  double _tol);
36 
37  // ***************************************ACCESSORS********************************************** //
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 
58  double tolerance() const;
59 
60  // ***************************************MUTATORS*********************************************** //
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 
72  // ***************************************OPERATORS********************************************** //
73 
76 
79 
82 
85 
87  bool operator==(const CanonicalConditions &RHS) const;
88 
90  bool operator!=(const CanonicalConditions &RHS) const;
91 
93  int operator/(const CanonicalConditions &RHS_inc) const;
94 
95 
96  protected:
97 
99 
102 
104  double m_beta;
105 
108 
110  double m_tolerance;
111 
112 
113  };
114 
115  std::ostream &operator<<(std::ostream &sout, const CanonicalConditions &cond);
116  }
117 }
118 
119 #endif
120 
void set_param_composition(const Eigen::VectorXd &in_param_comp)
Set parametric composition.
Eigen::VectorXd param_composition() const
parametric composition: comp_x
Main CASM namespace.
Definition: complete.cpp:8
CanonicalConditions operator+(const CanonicalConditions &RHS) const
Add temperature and all chemical potentials together and return a new Condition.
std::ostream & operator<<(std::ostream &sout, const CanonicalConditions &cond)
double m_beta
Inverse temperature. Includes Boltzmann term.
CanonicalConditions & operator-=(const CanonicalConditions &RHS)
Subtract temperature and all chemical potentials to *this.
bool operator!=(const CanonicalConditions &RHS) const
Compare temperature and all chemical potentials to *this.
EigenIndex Index
For long integer indexing:
Eigen::VectorXd mol_composition() const
mol composition: comp_n
Eigen::VectorXd VectorXd
int operator/(const CanonicalConditions &RHS_inc) const
Divide ALL parameters and return the greatest number in absolute value.
PrimClex is the top-level data structure for a CASM project.
Definition: PrimClex.hh:52
Eigen::VectorXd m_param_composition
Vector of the param composition.
CanonicalConditions operator-(const CanonicalConditions &RHS) const
Subtract temperature and all chemical potentials together and return a new Condition.
bool operator==(const CanonicalConditions &RHS) const
Compare temperature and all chemical potentials to *this.
CanonicalConditions()
Default constructor.
CanonicalConditions & operator+=(const CanonicalConditions &RHS)
Add temperature and all chemical potentials to *this.
void set_temperature(double in_temp)
Set the temperature of the current grand canonical condition.
const PrimClex & primclex() const
double m_tolerance
Tolerance for comparison operators == and !=.