CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::Monte::SiteMod< T > Class Template Reference

#include <DoFMod.hh>

Detailed Description

template<class T>
class CASM::Monte::SiteMod< T >

Describes the modification of a variable on a basis site.

SiteMod has information about the occupational change on a single site. It holds only an index corresponding to the site in the ConfigDoF and the final value a variable on that site will have after the modification takes place.

Definition at line 14 of file DoFMod.hh.

Public Types

typedef Index size_type
 

Public Member Functions

 SiteMod ()
 Default constructor. More...
 
 SiteMod (size_type _site_linear_index, size_type _sublat, const T &_to_value)
 Construct a SiteMod. More...
 
size_type site_index () const
 Returns the linear index corresponding to site in ConfigDoF. More...
 
size_type sublat () const
 Returns the sublattice index of site being modified. More...
 
const T & to_value () const
 Returns the value the variable on the site being modified will change to. More...
 
void set (size_type _site_linear_index, size_type _sublat, const T &_to_value)
 Set the values of a SiteMod. More...
 

Private Attributes

size_type m_site_index
 
size_type m_sublat
 
m_to_value
 

Member Typedef Documentation

◆ size_type

template<class T >
typedef Index CASM::Monte::SiteMod< T >::size_type

Definition at line 16 of file DoFMod.hh.

Constructor & Destructor Documentation

◆ SiteMod() [1/2]

template<class T >
CASM::Monte::SiteMod< T >::SiteMod ( )
inline

Default constructor.

Definition at line 19 of file DoFMod.hh.

◆ SiteMod() [2/2]

template<class T >
CASM::Monte::SiteMod< T >::SiteMod ( size_type  _site_linear_index,
size_type  _sublat,
const T &  _to_value 
)
inline

Construct a SiteMod.

Parameters
_site_linear_indexindex into the unrolled array of sites in the ConfigDoF of site being modified
_sublatSublattice index of site being modified
_to_valueValue the variable on the site being modified will change to

Definition at line 28 of file DoFMod.hh.

Member Function Documentation

◆ set()

template<class T >
void CASM::Monte::SiteMod< T >::set ( size_type  _site_linear_index,
size_type  _sublat,
const T &  _to_value 
)
inline

Set the values of a SiteMod.

Parameters
_site_linear_indexindex into the unrolled array of sites in the ConfigDoF of site being modified
_sublatSublattice index of site being modified
_to_valueValue the variable on the site being modified will change to

Definition at line 49 of file DoFMod.hh.

◆ site_index()

template<class T >
size_type CASM::Monte::SiteMod< T >::site_index ( ) const
inline

Returns the linear index corresponding to site in ConfigDoF.

Definition at line 33 of file DoFMod.hh.

◆ sublat()

template<class T >
size_type CASM::Monte::SiteMod< T >::sublat ( ) const
inline

Returns the sublattice index of site being modified.

Definition at line 36 of file DoFMod.hh.

◆ to_value()

template<class T >
const T& CASM::Monte::SiteMod< T >::to_value ( ) const
inline

Returns the value the variable on the site being modified will change to.

Definition at line 40 of file DoFMod.hh.

Member Data Documentation

◆ m_site_index

template<class T >
size_type CASM::Monte::SiteMod< T >::m_site_index
private

Definition at line 58 of file DoFMod.hh.

◆ m_sublat

template<class T >
size_type CASM::Monte::SiteMod< T >::m_sublat
private

Definition at line 59 of file DoFMod.hh.

◆ m_to_value

template<class T >
T CASM::Monte::SiteMod< T >::m_to_value
private

Definition at line 60 of file DoFMod.hh.


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