CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::ConfigDoFIsEquivalent::AnisoOccupation Class Reference

#include <ConfigDoFIsEquivalent.hh>

+ Inheritance diagram for CASM::ConfigDoFIsEquivalent::AnisoOccupation:

Detailed Description

Compare anisotropic occupation values

  • The protected '_check' method provides for both checking equality and if not equivalent, storing the 'less than' result

Method:

  • To improve efficiency when comparisons are being made repeatedly under transformation by the same factor group operation but different translations, temporary vectors 'm_new_occ_A' and 'm_new_occ_B' store the occupation values under transformation by factor group operation only, not site permutation. The factor group operation used last is stored in 'm_fg_index_A' and 'm_fg_index_B'. The 'm_tmp_valid' is set to false if comparison is made against an "other" ConfigDoF to force update of the transformed variables in the temporary vectors the next time the functor is called because it cannot be guaranteed that the "other" is the same.

Definition at line 155 of file ConfigDoFIsEquivalent.hh.

Public Member Functions

 AnisoOccupation (ConfigDoF const &_configdof)
 
bool operator() (ConfigDoF const &other) const override
 Return config == other, store config < other. More...
 
bool operator() (PermuteIterator const &B) const override
 Return config == B*config, store config < B*config. More...
 
bool operator() (PermuteIterator const &A, PermuteIterator const &B) const override
 Return A*config == B*config, store A*config < B*config. More...
 
bool operator() (PermuteIterator const &B, ConfigDoF const &other) const override
 Return config == B*other, store config < B*other. More...
 
bool operator() (PermuteIterator const &A, PermuteIterator const &B, ConfigDoF const &other) const override
 Return A*config == B*other, store A*config < B*other. More...
 
bool is_less () const
 Returns less than comparison. More...
 
bool operator() (Configuration const &other) const
 Return config == other. More...
 
std::unique_ptr< Baseclone () const
 

Protected Member Functions

ConfigDoF const & configdof () const
 
template<typename F , typename G >
bool _for_each (F f, G g) const
 
void _update_A (PermuteIterator const &A, ConfigDoF const &before) const
 
void _update_B (PermuteIterator const &B, ConfigDoF const &before) const
 

Protected Attributes

bool m_less
 

Private Member Functions

AnisoOccupation_clone () const override
 
template<typename T >
bool _check (const T &A, const T &B) const
 

Private Attributes

ConfigDoF const * m_configdof_ptr
 
bool m_tmp_valid
 
Index m_fg_index_A
 
Eigen::VectorXi m_new_occ_A
 
Index m_fg_index_B
 
Eigen::VectorXi m_new_occ_B
 

Constructor & Destructor Documentation

◆ AnisoOccupation()

CASM::ConfigDoFIsEquivalent::AnisoOccupation::AnisoOccupation ( ConfigDoF const &  _configdof)
inline

Definition at line 157 of file ConfigDoFIsEquivalent.hh.

Member Function Documentation

◆ _check()

template<typename T >
bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::_check ( const T &  A,
const T &  B 
) const
inlineprivate

Definition at line 261 of file ConfigDoFIsEquivalent.hh.

◆ _clone()

AnisoOccupation* CASM::ConfigDoFIsEquivalent::AnisoOccupation::_clone ( ) const
inlineoverrideprivatevirtual

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 256 of file ConfigDoFIsEquivalent.hh.

◆ _for_each()

template<typename F , typename G >
bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::_for_each ( f,
g 
) const
inlineprotected

Definition at line 220 of file ConfigDoFIsEquivalent.hh.

◆ _update_A()

void CASM::ConfigDoFIsEquivalent::AnisoOccupation::_update_A ( PermuteIterator const &  A,
ConfigDoF const &  before 
) const
inlineprotected

Definition at line 231 of file ConfigDoFIsEquivalent.hh.

◆ _update_B()

void CASM::ConfigDoFIsEquivalent::AnisoOccupation::_update_B ( PermuteIterator const &  B,
ConfigDoF const &  before 
) const
inlineprotected

Definition at line 243 of file ConfigDoFIsEquivalent.hh.

◆ clone()

std::unique_ptr<Base> CASM::ConfigDoFIsEquivalent::Base::clone ( ) const
inlineinherited

Definition at line 55 of file ConfigDoFIsEquivalent.hh.

◆ configdof()

ConfigDoF const& CASM::ConfigDoFIsEquivalent::AnisoOccupation::configdof ( ) const
inlineprotected

Definition at line 217 of file ConfigDoFIsEquivalent.hh.

◆ is_less()

bool CASM::ConfigDoFIsEquivalent::Base::is_less ( ) const
inlineinherited

Returns less than comparison.

  • Only valid after call operator returns false

Definition at line 30 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [1/6]

bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::operator() ( ConfigDoF const &  other) const
inlineoverridevirtual

Return config == other, store config < other.

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 166 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [2/6]

bool CASM::ConfigDoFIsEquivalent::Base::operator() ( Configuration const &  other) const
inlineinherited

Return config == other.

Definition at line 33 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [3/6]

bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::operator() ( PermuteIterator const &  A,
PermuteIterator const &  B 
) const
inlineoverridevirtual

Return A*config == B*config, store A*config < B*config.

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 182 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [4/6]

bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::operator() ( PermuteIterator const &  A,
PermuteIterator const &  B,
ConfigDoF const &  other 
) const
inlineoverridevirtual

Return A*config == B*other, store A*config < B*other.

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 205 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [5/6]

bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::operator() ( PermuteIterator const &  B) const
inlineoverridevirtual

Return config == B*config, store config < B*config.

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 172 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [6/6]

bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::operator() ( PermuteIterator const &  B,
ConfigDoF const &  other 
) const
inlineoverridevirtual

Return config == B*other, store config < B*other.

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 194 of file ConfigDoFIsEquivalent.hh.

Member Data Documentation

◆ m_configdof_ptr

ConfigDoF const* CASM::ConfigDoFIsEquivalent::AnisoOccupation::m_configdof_ptr
private

Definition at line 270 of file ConfigDoFIsEquivalent.hh.

◆ m_fg_index_A

Index CASM::ConfigDoFIsEquivalent::AnisoOccupation::m_fg_index_A
mutableprivate

Definition at line 278 of file ConfigDoFIsEquivalent.hh.

◆ m_fg_index_B

Index CASM::ConfigDoFIsEquivalent::AnisoOccupation::m_fg_index_B
mutableprivate

Definition at line 281 of file ConfigDoFIsEquivalent.hh.

◆ m_less

bool CASM::ConfigDoFIsEquivalent::Base::m_less
mutableprotectedinherited

Definition at line 60 of file ConfigDoFIsEquivalent.hh.

◆ m_new_occ_A

Eigen::VectorXi CASM::ConfigDoFIsEquivalent::AnisoOccupation::m_new_occ_A
mutableprivate

Definition at line 279 of file ConfigDoFIsEquivalent.hh.

◆ m_new_occ_B

Eigen::VectorXi CASM::ConfigDoFIsEquivalent::AnisoOccupation::m_new_occ_B
mutableprivate

Definition at line 282 of file ConfigDoFIsEquivalent.hh.

◆ m_tmp_valid

bool CASM::ConfigDoFIsEquivalent::AnisoOccupation::m_tmp_valid
mutableprivate

Definition at line 274 of file ConfigDoFIsEquivalent.hh.


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