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

#include <ConfigDoFIsEquivalent.hh>

+ Inheritance diagram for CASM::ConfigDoFIsEquivalent::Local:

Detailed Description

Compare continuous site DoF values

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_dof_A' and 'm_new_dof_B' store the DoF 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 334 of file ConfigDoFIsEquivalent.hh.

Public Member Functions

 Local (ConfigDoF const &_configdof, DoFKey const &_key, double _tol)
 
 Local (Configuration const &_config, DoFKey const &_key, double _tol)
 
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...
 
DoFKey const & key () const
 
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

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

Protected Attributes

bool m_less
 

Private Member Functions

LocalContinuousConfigDoFValues const & _values () const
 
void _update_A (PermuteIterator const &A, LocalContinuousConfigDoFValues const &before) const
 
void _update_B (PermuteIterator const &B, LocalContinuousConfigDoFValues const &before) const
 
double new_dof_A (Index i, Index j) const
 
double new_dof_B (Index i, Index j) const
 
template<typename F , typename G >
bool _for_each (F f, G g) const
 
Base_clone () const override
 
double tol () const
 

Private Attributes

LocalContinuousConfigDoFValues const * m_values_ptr
 
bool m_tmp_valid
 
LocalContinuousConfigDoFValues m_zeros
 
Index m_fg_index_A
 
LocalContinuousConfigDoFValues m_new_dof_A
 
Index m_fg_index_B
 
LocalContinuousConfigDoFValues m_new_dof_B
 
const double m_tol
 
const DoFKey m_key
 

Constructor & Destructor Documentation

◆ Local() [1/2]

CASM::ConfigDoFIsEquivalent::Local::Local ( ConfigDoF const &  _configdof,
DoFKey const &  _key,
double  _tol 
)
inline

Definition at line 336 of file ConfigDoFIsEquivalent.hh.

◆ Local() [2/2]

CASM::ConfigDoFIsEquivalent::Local::Local ( Configuration const &  _config,
DoFKey const &  _key,
double  _tol 
)
inline

Definition at line 348 of file ConfigDoFIsEquivalent.hh.

Member Function Documentation

◆ _check()

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

Definition at line 298 of file ConfigDoFIsEquivalent.hh.

◆ _clone()

Base* CASM::ConfigDoFIsEquivalent::Local::_clone ( ) const
inlineoverrideprivatevirtual

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 475 of file ConfigDoFIsEquivalent.hh.

◆ _for_each()

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

Definition at line 463 of file ConfigDoFIsEquivalent.hh.

◆ _update_A()

void CASM::ConfigDoFIsEquivalent::Local::_update_A ( PermuteIterator const &  A,
LocalContinuousConfigDoFValues const &  before 
) const
inlineprivate

Definition at line 427 of file ConfigDoFIsEquivalent.hh.

◆ _update_B()

void CASM::ConfigDoFIsEquivalent::Local::_update_B ( PermuteIterator const &  B,
LocalContinuousConfigDoFValues const &  before 
) const
inlineprivate

Definition at line 440 of file ConfigDoFIsEquivalent.hh.

◆ _values()

LocalContinuousConfigDoFValues const& CASM::ConfigDoFIsEquivalent::Local::_values ( ) const
inlineprivate

Definition at line 423 of file ConfigDoFIsEquivalent.hh.

◆ clone()

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

Definition at line 55 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.

◆ key()

DoFKey const& CASM::ConfigDoFIsEquivalent::Float::key ( ) const
inlineinherited

Definition at line 294 of file ConfigDoFIsEquivalent.hh.

◆ new_dof_A()

double CASM::ConfigDoFIsEquivalent::Local::new_dof_A ( Index  i,
Index  j 
) const
inlineprivate

Definition at line 454 of file ConfigDoFIsEquivalent.hh.

◆ new_dof_B()

double CASM::ConfigDoFIsEquivalent::Local::new_dof_B ( Index  i,
Index  j 
) const
inlineprivate

Definition at line 458 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [1/6]

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

Return config == other, store config < other.

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 352 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::Local::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 376 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [4/6]

bool CASM::ConfigDoFIsEquivalent::Local::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 405 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [5/6]

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

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

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 366 of file ConfigDoFIsEquivalent.hh.

◆ operator()() [6/6]

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

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

Implements CASM::ConfigDoFIsEquivalent::Base.

Definition at line 387 of file ConfigDoFIsEquivalent.hh.

◆ tol()

double CASM::ConfigDoFIsEquivalent::Float::tol ( ) const
inlineprivateinherited

Definition at line 315 of file ConfigDoFIsEquivalent.hh.

Member Data Documentation

◆ m_fg_index_A

Index CASM::ConfigDoFIsEquivalent::Local::m_fg_index_A
mutableprivate

Definition at line 490 of file ConfigDoFIsEquivalent.hh.

◆ m_fg_index_B

Index CASM::ConfigDoFIsEquivalent::Local::m_fg_index_B
mutableprivate

Definition at line 493 of file ConfigDoFIsEquivalent.hh.

◆ m_key

const DoFKey CASM::ConfigDoFIsEquivalent::Float::m_key
privateinherited

Definition at line 319 of file ConfigDoFIsEquivalent.hh.

◆ m_less

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

Definition at line 60 of file ConfigDoFIsEquivalent.hh.

◆ m_new_dof_A

LocalContinuousConfigDoFValues CASM::ConfigDoFIsEquivalent::Local::m_new_dof_A
mutableprivate

Definition at line 491 of file ConfigDoFIsEquivalent.hh.

◆ m_new_dof_B

LocalContinuousConfigDoFValues CASM::ConfigDoFIsEquivalent::Local::m_new_dof_B
mutableprivate

Definition at line 494 of file ConfigDoFIsEquivalent.hh.

◆ m_tmp_valid

bool CASM::ConfigDoFIsEquivalent::Local::m_tmp_valid
mutableprivate

Definition at line 483 of file ConfigDoFIsEquivalent.hh.

◆ m_tol

const double CASM::ConfigDoFIsEquivalent::Float::m_tol
privateinherited

Definition at line 317 of file ConfigDoFIsEquivalent.hh.

◆ m_values_ptr

LocalContinuousConfigDoFValues const* CASM::ConfigDoFIsEquivalent::Local::m_values_ptr
private

Definition at line 479 of file ConfigDoFIsEquivalent.hh.

◆ m_zeros

LocalContinuousConfigDoFValues CASM::ConfigDoFIsEquivalent::Local::m_zeros
mutableprivate

Definition at line 486 of file ConfigDoFIsEquivalent.hh.


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