CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::OccupantDoF< T > Singleton Reference

#include <DoF.hh>

+ Inheritance diagram for CASM::OccupantDoF< T >:

Detailed Description

template<typename T>
singleton CASM::OccupantDoF< T >

Definition at line 200 of file DoF.hh.

Public Member Functions

 OccupantDoF ()
 
 OccupantDoF (const std::string &_name, const Array< T > &_domain, int _current_state=0)
 
 OccupantDoF (const Array< T > &_domain, int _current_state=0)
 
 OccupantDoF (std::initializer_list< T > _domain, int _current_state=0)
 
const T & get_occ () const
 
DiscreteDoFcopy () const override
 
void set_value (int new_state) override
 
void set_current_state (const T &new_state)
 
bool compare (const OccupantDoF &RHS, bool compare_value) const
 
bool operator== (const OccupantDoF &RHS) const
 
void set_domain (const Array< T > &new_dom)
 
const Array< T > & get_domain () const
 
T & operator[] (Index i)
 
const T & operator[] (Index i) const
 
Index size () const override
 
void print (std::ostream &out) const
 
void print_occ (std::ostream &out) const
 
jsonParserto_json (jsonParser &json) const override
 
template<>
jsonParserto_json (jsonParser &json) const
 
template<>
jsonParserto_json (jsonParser &json) const
 
SymGroupRepID sym_rep_ID () const
 
void set_sym_rep_ID (SymGroupRepID _id)
 
bool is_specified () const
 
void invalidate ()
 
int value () const
 
int remote_value () const
 
int const * remote_ptr () const
 
void register_remote (const RemoteHandle &handle)
 
virtual bool operator== (const DiscreteDoF &RHS) const
 
const std::string & type_name () const
 
std::string type_name_prefix () const
 
std::string type_name_suffix () const
 
Index ID () const
 
void set_ID (Index new_ID)
 
bool is_locked () const
 
void lock_ID ()
 
void unlock_ID ()
 

Protected Attributes

int m_current_state
 index into domain of the current state, -1 if unspecified More...
 
const int * m_remote_state
 Allows DoF to point to a remote value for faster/easier evaluation. More...
 
SymGroupRepID m_sym_rep_ID
 
std::string m_type_name
 
Index m_dof_ID
 
bool m_ID_lock
 

Private Attributes

Array< T > m_domain
 Allowed values, assume class T has member 'T.name'. More...
 

Constructor & Destructor Documentation

template<typename T>
CASM::OccupantDoF< T >::OccupantDoF ( )
inline

Definition at line 213 of file DoF.hh.

template<typename T>
CASM::OccupantDoF< T >::OccupantDoF ( const std::string &  _name,
const Array< T > &  _domain,
int  _current_state = 0 
)
inline

Definition at line 214 of file DoF.hh.

template<typename T>
CASM::OccupantDoF< T >::OccupantDoF ( const Array< T > &  _domain,
int  _current_state = 0 
)
inline

Definition at line 217 of file DoF.hh.

template<typename T>
CASM::OccupantDoF< T >::OccupantDoF ( std::initializer_list< T >  _domain,
int  _current_state = 0 
)
inline

Definition at line 220 of file DoF.hh.

Member Function Documentation

template<typename T>
bool CASM::OccupantDoF< T >::compare ( const OccupantDoF< T > &  RHS,
bool  compare_value 
) const
inline

Definition at line 257 of file DoF.hh.

template<typename T>
DiscreteDoF* CASM::OccupantDoF< T >::copy ( ) const
inlineoverridevirtual

Implements CASM::DiscreteDoF.

Definition at line 229 of file DoF.hh.

template<typename T>
const Array<T>& CASM::OccupantDoF< T >::get_domain ( ) const
inline

Definition at line 285 of file DoF.hh.

template<typename T>
const T& CASM::OccupantDoF< T >::get_occ ( ) const
inline

Definition at line 225 of file DoF.hh.

Index CASM::DoF::ID ( ) const
inlineinherited

Definition at line 71 of file DoF.hh.

void CASM::DiscreteDoF::invalidate ( )
inlineinherited

Definition at line 144 of file DoF.hh.

bool CASM::DoF::is_locked ( ) const
inlineinherited

Definition at line 82 of file DoF.hh.

bool CASM::DiscreteDoF::is_specified ( ) const
inlineinherited

Definition at line 140 of file DoF.hh.

void CASM::DoF::lock_ID ( )
inlineinherited

Definition at line 86 of file DoF.hh.

virtual bool CASM::DiscreteDoF::operator== ( const DiscreteDoF RHS) const
inlinevirtualinherited

Definition at line 180 of file DoF.hh.

template<typename T>
bool CASM::OccupantDoF< T >::operator== ( const OccupantDoF< T > &  RHS) const
inline

Definition at line 272 of file DoF.hh.

template<typename T>
T& CASM::OccupantDoF< T >::operator[] ( Index  i)
inline

Definition at line 289 of file DoF.hh.

template<typename T>
const T& CASM::OccupantDoF< T >::operator[] ( Index  i) const
inline

Definition at line 293 of file DoF.hh.

template<typename T>
void CASM::OccupantDoF< T >::print ( std::ostream &  out) const
inline

Definition at line 301 of file DoF.hh.

template<typename T>
void CASM::OccupantDoF< T >::print_occ ( std::ostream &  out) const
inline

Definition at line 310 of file DoF.hh.

void CASM::DiscreteDoF::register_remote ( const RemoteHandle handle)
inlineinherited

Definition at line 162 of file DoF.hh.

int const* CASM::DiscreteDoF::remote_ptr ( ) const
inlineinherited

Definition at line 158 of file DoF.hh.

int CASM::DiscreteDoF::remote_value ( ) const
inlineinherited

Definition at line 153 of file DoF.hh.

template<typename T>
void CASM::OccupantDoF< T >::set_current_state ( const T &  new_state)
inline

Definition at line 246 of file DoF.hh.

template<typename T>
void CASM::OccupantDoF< T >::set_domain ( const Array< T > &  new_dom)
inline

Definition at line 276 of file DoF.hh.

void CASM::DoF::set_ID ( Index  new_ID)
inlineinherited

Definition at line 75 of file DoF.hh.

void CASM::DiscreteDoF::set_sym_rep_ID ( SymGroupRepID  _id)
inlineinherited

Definition at line 136 of file DoF.hh.

template<typename T>
void CASM::OccupantDoF< T >::set_value ( int  new_state)
inlineoverridevirtual

Reimplemented from CASM::DiscreteDoF.

Definition at line 236 of file DoF.hh.

template<typename T>
Index CASM::OccupantDoF< T >::size ( ) const
inlineoverridevirtual

Implements CASM::DiscreteDoF.

Definition at line 297 of file DoF.hh.

SymGroupRepID CASM::DiscreteDoF::sym_rep_ID ( ) const
inlineinherited

Definition at line 132 of file DoF.hh.

template<>
jsonParser & CASM::OccupantDoF< int >::to_json ( jsonParser json) const
virtual

Implements CASM::DiscreteDoF.

Definition at line 15 of file DoF.cc.

template<>
jsonParser & CASM::OccupantDoF< Molecule >::to_json ( jsonParser json) const
virtual

Implements CASM::DiscreteDoF.

Definition at line 44 of file DoF.cc.

template<typename T>
jsonParser& CASM::OccupantDoF< T >::to_json ( jsonParser json) const
overridevirtual

Implements CASM::DiscreteDoF.

const std::string& CASM::DoF::type_name ( ) const
inlineinherited

Definition at line 49 of file DoF.hh.

std::string CASM::DoF::type_name_prefix ( ) const
inlineinherited

Definition at line 53 of file DoF.hh.

std::string CASM::DoF::type_name_suffix ( ) const
inlineinherited

Definition at line 62 of file DoF.hh.

void CASM::DoF::unlock_ID ( )
inlineinherited

Definition at line 90 of file DoF.hh.

int CASM::DiscreteDoF::value ( ) const
inlineinherited

Definition at line 149 of file DoF.hh.

Member Data Documentation

int CASM::DiscreteDoF::m_current_state
protectedinherited

index into domain of the current state, -1 if unspecified

Definition at line 112 of file DoF.hh.

Index CASM::DoF::m_dof_ID
protectedinherited

dof_ID is a way to distinguish between DoFs with the same name but different identities dof_ID for now usually refers to the site index of a cluster (e.g., 0, 1, 2 of a triplet) or an index into the primitive cell neighbor list. Other usage cases may be introduced later

Definition at line 27 of file DoF.hh.

template<typename T>
Array<T> CASM::OccupantDoF< T >::m_domain
private

Allowed values, assume class T has member 'T.name'.

Definition at line 210 of file DoF.hh.

bool CASM::DoF::m_ID_lock
protectedinherited

Definition at line 28 of file DoF.hh.

const int* CASM::DiscreteDoF::m_remote_state
protectedinherited

Allows DoF to point to a remote value for faster/easier evaluation.

Definition at line 115 of file DoF.hh.

SymGroupRepID CASM::DiscreteDoF::m_sym_rep_ID
protectedinherited

Definition at line 117 of file DoF.hh.

std::string CASM::DoF::m_type_name
protectedinherited

Definition at line 23 of file DoF.hh.


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