CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::DiscreteDoF Class Referenceabstract

#include <DoF.hh>

+ Inheritance diagram for CASM::DiscreteDoF:

Detailed Description

Definition at line 180 of file DoF.hh.

Public Types

using Base = DoF::Base
 
using BasicTraits = DoF::BasicTraits
 
using RemoteHandle = DoF::RemoteHandle
 

Public Member Functions

 DiscreteDoF ()
 
 DiscreteDoF (BasicTraits const &_traits, std::string const &_var_name, Index _dof_ID=-1, int _current_state=0, SymGroupRepID _id=SymGroupRepID::identity(0))
 
virtual ~DiscreteDoF ()
 
SymGroupRepID symrep_ID () const
 
void set_symrep_ID (SymGroupRepID _id)
 
bool is_specified () const
 
void invalidate ()
 
int value () const
 
int remote_value () const
 
int const * remote_ptr () const
 
void register_remote (RemoteHandle const &handle) const
 
std::unique_ptr< DiscreteDoFclone () const
 
virtual Index size () const =0
 
virtual void set_value (int new_state)
 
virtual bool operator== (DiscreteDoF const &RHS) const
 
void print (std::ostream &out) const
 
BasicTraits const & traits () const
 
std::string type_name () const
 Const access of DoF type name. More...
 
std::string var_name () const
 Const access of variable name. More...
 
Index ID () const
 Const access of integer ID. More...
 
RemoteHandle handle () const
 Create a RemoteHandle that refers to this DoF. More...
 
bool is_locked () const
 true if ID is locked More...
 
void set_ID (Index new_ID)
 mutator to set integer ID if it is unlocked More...
 
void lock_ID ()
 mutator to lock integer ID More...
 
void unlock_ID ()
 mutator to unlock integer ID More...
 

Protected Attributes

int m_current_state
 index into domain of the current state, -1 if unspecified More...
 
int const * m_remote_state
 Allows DoF to point to a remote value for faster/easier evaluation. More...
 
SymGroupRepID m_symrep_ID
 ID for the permutation representation for occupants. More...
 

Private Member Functions

virtual DiscreteDoF_clone () const =0
 

Private Attributes

BasicTraits m_traits
 
std::string m_var_name
 
Index m_dof_ID
 
bool m_ID_lock
 Locks the ID so that it can't be updated. Is used for global DoF's. More...
 

Member Typedef Documentation

◆ Base

Definition at line 182 of file DoF.hh.

◆ BasicTraits

Definition at line 183 of file DoF.hh.

◆ RemoteHandle

Definition at line 121 of file DoF.hh.

Constructor & Destructor Documentation

◆ DiscreteDoF() [1/2]

CASM::DiscreteDoF::DiscreteDoF ( )
inline

Definition at line 184 of file DoF.hh.

◆ DiscreteDoF() [2/2]

CASM::DiscreteDoF::DiscreteDoF ( BasicTraits const &  _traits,
std::string const &  _var_name,
Index  _dof_ID = -1,
int  _current_state = 0,
SymGroupRepID  _id = SymGroupRepID::identity(0) 
)
inline

Definition at line 190 of file DoF.hh.

◆ ~DiscreteDoF()

virtual CASM::DiscreteDoF::~DiscreteDoF ( )
inlinevirtual

Definition at line 198 of file DoF.hh.

Member Function Documentation

◆ _clone()

virtual DiscreteDoF* CASM::DiscreteDoF::_clone ( ) const
privatepure virtual

Implemented in CASM::OccupantDoF< T >.

◆ clone()

std::unique_ptr<DiscreteDoF> CASM::DiscreteDoF::clone ( ) const
inline

Definition at line 225 of file DoF.hh.

◆ handle()

RemoteHandle CASM::DoF::Base::handle ( ) const
inlineinherited

Create a RemoteHandle that refers to this DoF.

Definition at line 143 of file DoF.hh.

◆ ID()

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

Const access of integer ID.

Definition at line 140 of file DoF.hh.

◆ invalidate()

void CASM::DiscreteDoF::invalidate ( )
inline

Definition at line 206 of file DoF.hh.

◆ is_locked()

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

true if ID is locked

Definition at line 148 of file DoF.hh.

◆ is_specified()

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

Definition at line 204 of file DoF.hh.

◆ lock_ID()

void CASM::DoF::Base::lock_ID ( )
inlineinherited

mutator to lock integer ID

Definition at line 159 of file DoF.hh.

◆ operator==()

virtual bool CASM::DiscreteDoF::operator== ( DiscreteDoF const &  RHS) const
inlinevirtual

Definition at line 236 of file DoF.hh.

◆ print()

void CASM::DiscreteDoF::print ( std::ostream &  out) const
inline

Definition at line 244 of file DoF.hh.

◆ register_remote()

void CASM::DiscreteDoF::register_remote ( RemoteHandle const &  handle) const
inline

Definition at line 218 of file DoF.hh.

◆ remote_ptr()

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

Definition at line 216 of file DoF.hh.

◆ remote_value()

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

Definition at line 210 of file DoF.hh.

◆ set_ID()

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

mutator to set integer ID if it is unlocked

Definition at line 151 of file DoF.hh.

◆ set_symrep_ID()

void CASM::DiscreteDoF::set_symrep_ID ( SymGroupRepID  _id)
inline

Definition at line 202 of file DoF.hh.

◆ set_value()

virtual void CASM::DiscreteDoF::set_value ( int  new_state)
inlinevirtual

Reimplemented in CASM::OccupantDoF< T >.

Definition at line 231 of file DoF.hh.

◆ size()

virtual Index CASM::DiscreteDoF::size ( ) const
pure virtual

Implemented in CASM::OccupantDoF< T >.

◆ symrep_ID()

SymGroupRepID CASM::DiscreteDoF::symrep_ID ( ) const
inline

Definition at line 200 of file DoF.hh.

◆ traits()

BasicTraits const& CASM::DoF::Base::traits ( ) const
inlineinherited

Definition at line 131 of file DoF.hh.

◆ type_name()

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

Const access of DoF type name.

Definition at line 134 of file DoF.hh.

◆ unlock_ID()

void CASM::DoF::Base::unlock_ID ( )
inlineinherited

mutator to unlock integer ID

Definition at line 162 of file DoF.hh.

◆ value()

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

Definition at line 208 of file DoF.hh.

◆ var_name()

std::string CASM::DoF::Base::var_name ( ) const
inlineinherited

Const access of variable name.

Definition at line 137 of file DoF.hh.

Member Data Documentation

◆ m_current_state

int CASM::DiscreteDoF::m_current_state
protected

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

Definition at line 248 of file DoF.hh.

◆ m_dof_ID

Index CASM::DoF::Base::m_dof_ID
privateinherited

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 172 of file DoF.hh.

◆ m_ID_lock

bool CASM::DoF::Base::m_ID_lock
privateinherited

Locks the ID so that it can't be updated. Is used for global DoF's.

Definition at line 175 of file DoF.hh.

◆ m_remote_state

int const* CASM::DiscreteDoF::m_remote_state
mutableprotected

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

Definition at line 251 of file DoF.hh.

◆ m_symrep_ID

SymGroupRepID CASM::DiscreteDoF::m_symrep_ID
protected

ID for the permutation representation for occupants.

Definition at line 254 of file DoF.hh.

◆ m_traits

BasicTraits CASM::DoF::Base::m_traits
privateinherited

Definition at line 165 of file DoF.hh.

◆ m_var_name

std::string CASM::DoF::Base::m_var_name
privateinherited

Definition at line 166 of file DoF.hh.


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