CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::GrandCanonicalConditions Class Reference

#include <GrandCanonicalConditions.hh>

Detailed Description

Conditions for a Grand Canonical run: Temperature Chemical potential Tolerance (for comparing conditions)

Definition at line 15 of file GrandCanonicalConditions.hh.

Public Member Functions

 GrandCanonicalConditions ()
 Default constructor. More...
 
 GrandCanonicalConditions (const PrimClex &_primclex, double _temperature, const Eigen::VectorXd &_param_chem_pot, double _tol)
 Constructor. More...
 
const PrimClexprimclex () const
 
double temperature () const
 
double beta () const
 
Eigen::MatrixXd exchange_chem_pot () const
 matrix of exchange chemical potential, M(new, curr) = chem_pot(new) - chem_pot(curr) More...
 
double exchange_chem_pot (Index index_new, Index index_curr) const
 exchange chemical potential: chem_pot(new) - chem_pot(curr) More...
 
Eigen::VectorXd param_chem_pot () const
 parametric chemical potential: dg/dcomp_x More...
 
double param_chem_pot (Index index) const
 parametric chemical potential: dg/dcomp_x(index) More...
 
double tolerance () const
 
void set_temperature (double in_temp)
 Set the temperature of the current grand canonical condition. More...
 
void set_param_chem_pot (const Eigen::VectorXd &in_chem_pot)
 Set all the parametric chemical potentials of the current grand canonical condition. More...
 
void set_param_chem_pot (Index ind, double in_chem_pot)
 Set a single parametric chemical potential by specifying an index and a value. More...
 
GrandCanonicalConditionsoperator+= (const GrandCanonicalConditions &RHS)
 Add temperature and all chemical potentials to *this. More...
 
GrandCanonicalConditions operator+ (const GrandCanonicalConditions &RHS) const
 Add temperature and all chemical potentials together and return a new Condition. More...
 
GrandCanonicalConditionsoperator-= (const GrandCanonicalConditions &RHS)
 Subtract temperature and all chemical potentials to *this. More...
 
GrandCanonicalConditions operator- (const GrandCanonicalConditions &RHS) const
 Subtract temperature and all chemical potentials together and return a new Condition. More...
 
bool operator== (const GrandCanonicalConditions &RHS) const
 Compare temperature and all chemical potentials to *this. More...
 
bool operator!= (const GrandCanonicalConditions &RHS) const
 Compare temperature and all chemical potentials to *this. More...
 
int operator/ (const GrandCanonicalConditions &RHS_inc) const
 Divide ALL parameters and return the greatest number in absolute value. More...
 

Protected Attributes

const PrimClexm_primclex
 
double m_temperature
 Temperature. More...
 
double m_beta
 Inverse temperature. Includes Boltzmann term. More...
 
Eigen::VectorXd m_chem_pot
 Vector of the 'atomic' chemical potentials for each species. Ordered as primclex.get_param_comp().get_components() More...
 
Eigen::VectorXd m_param_chem_pot
 Vector of the parametric chemical potentials conjugate to the parametric compositions. More...
 
Eigen::MatrixXd m_exchange_chem_pot
 Matrix(i,j) of chem_pot(i) - chem_pot(j) More...
 
double m_tolerance
 Tolerance for comparison operators == and !=. More...
 

Constructor & Destructor Documentation

CASM::GrandCanonicalConditions::GrandCanonicalConditions ( )
inline

Default constructor.

Definition at line 19 of file GrandCanonicalConditions.hh.

CASM::GrandCanonicalConditions::GrandCanonicalConditions ( const PrimClex _primclex,
double  _temperature,
const Eigen::VectorXd &  _param_chem_pot,
double  _tol 
)

Constructor.

Parameters
_primclexPrimClex
_temperaturein K
_param_chem_potParametric composition chemical potential
_toltolerance for comparing conditions

Definition at line 17 of file GrandCanonicalConditions.cc.

Member Function Documentation

double CASM::GrandCanonicalConditions::beta ( ) const

Definition at line 45 of file GrandCanonicalConditions.cc.

Eigen::MatrixXd CASM::GrandCanonicalConditions::exchange_chem_pot ( ) const

matrix of exchange chemical potential, M(new, curr) = chem_pot(new) - chem_pot(curr)

Definition at line 49 of file GrandCanonicalConditions.cc.

double CASM::GrandCanonicalConditions::exchange_chem_pot ( Index  index_new,
Index  index_curr 
) const

exchange chemical potential: chem_pot(new) - chem_pot(curr)

Definition at line 53 of file GrandCanonicalConditions.cc.

bool CASM::GrandCanonicalConditions::operator!= ( const GrandCanonicalConditions RHS) const

Compare temperature and all chemical potentials to *this.

Definition at line 149 of file GrandCanonicalConditions.cc.

GrandCanonicalConditions CASM::GrandCanonicalConditions::operator+ ( const GrandCanonicalConditions RHS) const

Add temperature and all chemical potentials together and return a new Condition.

Definition at line 116 of file GrandCanonicalConditions.cc.

GrandCanonicalConditions & CASM::GrandCanonicalConditions::operator+= ( const GrandCanonicalConditions RHS)

Add temperature and all chemical potentials to *this.

Definition at line 106 of file GrandCanonicalConditions.cc.

GrandCanonicalConditions CASM::GrandCanonicalConditions::operator- ( const GrandCanonicalConditions RHS) const

Subtract temperature and all chemical potentials together and return a new Condition.

Definition at line 131 of file GrandCanonicalConditions.cc.

GrandCanonicalConditions & CASM::GrandCanonicalConditions::operator-= ( const GrandCanonicalConditions RHS)

Subtract temperature and all chemical potentials to *this.

Definition at line 121 of file GrandCanonicalConditions.cc.

int CASM::GrandCanonicalConditions::operator/ ( const GrandCanonicalConditions RHS_inc) const

Divide ALL parameters and return the greatest number in absolute value.

Definition at line 153 of file GrandCanonicalConditions.cc.

bool CASM::GrandCanonicalConditions::operator== ( const GrandCanonicalConditions RHS) const

Compare temperature and all chemical potentials to *this.

Definition at line 135 of file GrandCanonicalConditions.cc.

Eigen::VectorXd CASM::GrandCanonicalConditions::param_chem_pot ( ) const

parametric chemical potential: dg/dcomp_x

Definition at line 57 of file GrandCanonicalConditions.cc.

double CASM::GrandCanonicalConditions::param_chem_pot ( Index  index) const

parametric chemical potential: dg/dcomp_x(index)

Definition at line 61 of file GrandCanonicalConditions.cc.

const PrimClex & CASM::GrandCanonicalConditions::primclex ( ) const

Definition at line 37 of file GrandCanonicalConditions.cc.

void CASM::GrandCanonicalConditions::set_param_chem_pot ( const Eigen::VectorXd &  in_chem_pot)

Set all the parametric chemical potentials of the current grand canonical condition.

Definition at line 78 of file GrandCanonicalConditions.cc.

void CASM::GrandCanonicalConditions::set_param_chem_pot ( Index  ind,
double  in_chem_pot 
)

Set a single parametric chemical potential by specifying an index and a value.

Definition at line 97 of file GrandCanonicalConditions.cc.

void CASM::GrandCanonicalConditions::set_temperature ( double  in_temp)

Set the temperature of the current grand canonical condition.

Definition at line 72 of file GrandCanonicalConditions.cc.

double CASM::GrandCanonicalConditions::temperature ( ) const

Definition at line 41 of file GrandCanonicalConditions.cc.

double CASM::GrandCanonicalConditions::tolerance ( ) const

Definition at line 65 of file GrandCanonicalConditions.cc.

Member Data Documentation

double CASM::GrandCanonicalConditions::m_beta
protected

Inverse temperature. Includes Boltzmann term.

Definition at line 100 of file GrandCanonicalConditions.hh.

Eigen::VectorXd CASM::GrandCanonicalConditions::m_chem_pot
protected

Vector of the 'atomic' chemical potentials for each species. Ordered as primclex.get_param_comp().get_components()

Definition at line 103 of file GrandCanonicalConditions.hh.

Eigen::MatrixXd CASM::GrandCanonicalConditions::m_exchange_chem_pot
protected

Matrix(i,j) of chem_pot(i) - chem_pot(j)

Definition at line 109 of file GrandCanonicalConditions.hh.

Eigen::VectorXd CASM::GrandCanonicalConditions::m_param_chem_pot
protected

Vector of the parametric chemical potentials conjugate to the parametric compositions.

Definition at line 106 of file GrandCanonicalConditions.hh.

const PrimClex* CASM::GrandCanonicalConditions::m_primclex
protected

Definition at line 94 of file GrandCanonicalConditions.hh.

double CASM::GrandCanonicalConditions::m_temperature
protected

Temperature.

Definition at line 97 of file GrandCanonicalConditions.hh.

double CASM::GrandCanonicalConditions::m_tolerance
protected

Tolerance for comparison operators == and !=.

Definition at line 112 of file GrandCanonicalConditions.hh.


The documentation for this class was generated from the following files: