CASM
AClustersApproachtoStatisticalMechanics
|
#include <ConfigDoF.hh>
A container class for the different degrees of freedom a Configuration might have.
Contains an id, an Array<int> that tells you the current occupant of each site, an Eigen::MatrixXd that tells you the displacements at each site, and a LatticeStrain that tells you the strain of the Configuration. Everything is public.
Definition at line 27 of file ConfigDoF.hh.
Public Types | |
typedef Eigen::MatrixXd | displacement_matrix_t |
typedef displacement_matrix_t::ColXpr | displacement_t |
typedef displacement_matrix_t::ConstColXpr | const_displacement_t |
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ConfigDoF (Index N=0, double _tol=TOL) |
fixes alignment of m_deformation More... | |
ConfigDoF (const Array< int > &_occupation, double _tol=TOL) | |
Initialize with explicit occupation. More... | |
ConfigDoF (const Array< int > &_occupation, const Eigen::MatrixXd &_displacement, const Eigen::Matrix3d &_deformation, double _tol=TOL) | |
Initialize with explicit properties. More... | |
Index | size () const |
*** ACCESSORS *** More... | |
double | tol () const |
int & | occ (Index i) |
const int & | occ (Index i) const |
const Array< int > & | occupation () const |
displacement_t | disp (Index i) |
const_displacement_t | disp (Index i) const |
const displacement_matrix_t & | displacement () const |
const Eigen::Matrix3d & | deformation () const |
const double & | F (Index i, Index j) const |
double & | F (Index i, Index j) |
bool | has_deformation () const |
bool | has_displacement () const |
bool | has_occupation () const |
void | set_occupation (const Array< int > &_occupation) |
void | set_displacement (const displacement_matrix_t &_displacement) |
void | set_deformation (const Eigen::Matrix3d &_deformation) |
set_deformation sets ConfigDoF::has_deformation() to true More... | |
void | clear () |
void | clear_occupation () |
void | clear_displacement () |
void | clear_deformation () |
void | swap (ConfigDoF &RHS) |
jsonParser & | to_json (jsonParser &json) const |
void | from_json (const jsonParser &json) |
Private Member Functions | |
Array< int > & | _occupation () |
displacement_matrix_t & | _displacement () |
Eigen::Matrix3d & | _deformation () |
Private Attributes | |
Index | m_N |
Number of sites in the Configuration. More... | |
Array< int > | m_occupation |
With one value for each site in the Configuration, this Array describes which occupant is at each of the 'N' sites of the configuration. More... | |
displacement_matrix_t | m_displacement |
Eigen::Matrix3d | m_deformation |
bool | m_has_deformation |
double | m_tol |
typedef displacement_matrix_t::ConstColXpr CASM::ConfigDoF::const_displacement_t |
Definition at line 36 of file ConfigDoF.hh.
typedef Eigen::MatrixXd CASM::ConfigDoF::displacement_matrix_t |
Definition at line 32 of file ConfigDoF.hh.
typedef displacement_matrix_t::ColXpr CASM::ConfigDoF::displacement_t |
Definition at line 35 of file ConfigDoF.hh.
fixes alignment of m_deformation
Initialize with number of sites – defaults to zero
Definition at line 13 of file ConfigDoF.cc.
Initialize with explicit occupation.
Definition at line 23 of file ConfigDoF.cc.
CASM::ConfigDoF::ConfigDoF | ( | const Array< int > & | _occupation, |
const Eigen::MatrixXd & | _displacement, | ||
const Eigen::Matrix3d & | _deformation, | ||
double | _tol = TOL |
||
) |
Initialize with explicit properties.
Definition at line 33 of file ConfigDoF.cc.
|
inlineprivate |
Definition at line 170 of file ConfigDoF.hh.
|
inlineprivate |
Definition at line 166 of file ConfigDoF.hh.
|
inlineprivate |
Definition at line 162 of file ConfigDoF.hh.
void CASM::ConfigDoF::clear | ( | ) |
Definition at line 51 of file ConfigDoF.cc.
void CASM::ConfigDoF::clear_deformation | ( | ) |
Definition at line 66 of file ConfigDoF.cc.
void CASM::ConfigDoF::clear_displacement | ( | ) |
Definition at line 62 of file ConfigDoF.cc.
void CASM::ConfigDoF::clear_occupation | ( | ) |
Definition at line 58 of file ConfigDoF.cc.
|
inline |
Definition at line 85 of file ConfigDoF.hh.
|
inline |
Definition at line 73 of file ConfigDoF.hh.
|
inline |
Definition at line 77 of file ConfigDoF.hh.
|
inline |
Definition at line 81 of file ConfigDoF.hh.
Definition at line 89 of file ConfigDoF.hh.
Definition at line 93 of file ConfigDoF.hh.
void CASM::ConfigDoF::from_json | ( | const jsonParser & | json | ) |
Definition at line 139 of file ConfigDoF.cc.
|
inline |
Definition at line 98 of file ConfigDoF.hh.
|
inline |
Definition at line 102 of file ConfigDoF.hh.
|
inline |
Definition at line 106 of file ConfigDoF.hh.
|
inline |
Definition at line 61 of file ConfigDoF.hh.
|
inline |
Definition at line 65 of file ConfigDoF.hh.
|
inline |
Definition at line 69 of file ConfigDoF.hh.
void CASM::ConfigDoF::set_deformation | ( | const Eigen::Matrix3d & | _deformation | ) |
set_deformation sets ConfigDoF::has_deformation() to true
Definition at line 119 of file ConfigDoF.cc.
void CASM::ConfigDoF::set_displacement | ( | const displacement_matrix_t & | _displacement | ) |
set_displacement ensures that ConfigDoF::size() is compatible with _displacement.cols() (i.e., number of sites) or if ConfigDoF::size()==0, sets ConfigDoF::size() to _displacement.cols()
Definition at line 102 of file ConfigDoF.cc.
void CASM::ConfigDoF::set_occupation | ( | const Array< int > & | _occupation | ) |
set_occupation ensures that ConfigDoF::size() is compatible with _occupation.size() or if ConfigDoF::size()==0, sets ConfigDoF::size() to _occupation.size()
Definition at line 84 of file ConfigDoF.cc.
|
inline |
*** ACCESSORS ***
Definition at line 53 of file ConfigDoF.hh.
void CASM::ConfigDoF::swap | ( | ConfigDoF & | RHS | ) |
Definition at line 73 of file ConfigDoF.cc.
jsonParser & CASM::ConfigDoF::to_json | ( | jsonParser & | json | ) | const |
Definition at line 126 of file ConfigDoF.cc.
|
inline |
Definition at line 57 of file ConfigDoF.hh.
|
private |
Describes possible strains that may have been applied to the Configuration – This is the matrix that relates the reference lattice vectors to the deformed lattice vectors via L_deformed = m_deformation * L_reference – (L is a 3x3 matrix whose columns are the lattice vectors)
Definition at line 152 of file ConfigDoF.hh.
|
private |
A VectorXd for each site in the Configuration to describe displacements condensed in matrix form – This a 3xN matrix whose columns are the displacement of each of the N sites of the configuration
Definition at line 148 of file ConfigDoF.hh.
|
private |
Definition at line 154 of file ConfigDoF.hh.
|
private |
Number of sites in the Configuration.
Definition at line 141 of file ConfigDoF.hh.
|
private |
With one value for each site in the Configuration, this Array describes which occupant is at each of the 'N' sites of the configuration.
Definition at line 144 of file ConfigDoF.hh.
|
mutableprivate |
Tolerance used for transformation to canonical form – used also for comparisons, since Since comparisons are only meaningful to within the tolerance used for finding the canonical form (This is relevant only for displacement and deformation degrees of freedom
Definition at line 159 of file ConfigDoF.hh.