CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::LatticeEnumEquivalents Class Reference

#include <LatticeEnumEquivalents.hh>

+ Inheritance diagram for CASM::LatticeEnumEquivalents:

Detailed Description

Enumerate equivalent Lattics, given a SymGroup.

  • The 'begin' Lattice is always the canonical form, with respect to the specified SymGroup
  • Currently requires super_g to have a valid MasterSymGroup. This requirement could be relaxed if the comparison function is changed.

Definition at line 32 of file LatticeEnumEquivalents.hh.

Public Types

typedef InputEnumIterator< ValueType, IsConst > iterator
 
typedef ValueType value_type
 
typedef CASM_TMP::ConstSwitch< IsConst, ValueType > & reference
 
typedef long step_type
 

Public Member Functions

 LatticeEnumEquivalents (const xtal::Lattice &lat, const SymGroup &super_g)
 Constructor. More...
 
std::string name () const override
 Derived enumerators must implement name, via ENUM_MEMBERS. More...
 
const xtal::Latticegenerator () const
 
const CASM::SymOpsym_op () const
 
const std::vector< CASM::SymOp > & invariant_subgroup () const
 
iterator begin ()
 
iterator end ()
 
reference current () const
 Access the current ObjectType by reference. More...
 
virtual std::string name () const =0
 Derived enumerators must implement name, via ENUM_MEMBERS. More...
 
virtual jsonParser source (step_type step) const
 
virtual jsonParser source (step_type step) const
 
step_type step () const
 Increments with each enumerated object. More...
 
step_type step () const
 Increments with each enumerated object. More...
 
bool valid () const
 Returns false if enumeration is complete. More...
 
bool valid () const
 Returns false if enumeration is complete. More...
 

Static Public Attributes

static const std::string enumerator_name
 

Protected Member Functions

void _initialize (CASM_TMP::ConstSwitch< IsConst, value_type > *_initial)
 
void _initialize ()
 
void _set_current_ptr (CASM_TMP::ConstSwitch< IsConst, value_type > *_new)
 Change the pointer. More...
 
void _decrement_step ()
 Decrement current step value. More...
 
void _increment_step ()
 Increment current step value. More...
 
void _invalidate ()
 Call if enumeration complete. More...
 
void _set_step (step_type val)
 Set current step value. More...
 
void _set_step (step_type val)
 Set current step value. More...
 
void _validate ()
 Used if random access enumerator step is moved into valid range. More...
 

Private Member Functions

void increment () override
 Implement increment. More...
 
bool _check (const CASM::SymOp &X) const
 

Private Attributes

notstd::cloneable_ptr< xtal::Latticem_initial
 
notstd::cloneable_ptr< xtal::Latticem_current
 
std::vector< CASM::SymOp >::const_iterator m_symop_it
 
std::vector< CASM::SymOp >::const_iterator m_symop_end
 
std::vector< CASM::SymOpm_invariant_subgroup
 
SymRepIndexCompare m_compare
 
friend InputEnumIteratorBase< ValueType, IsConst >
 
CASM_TMP::ConstSwitch< IsConst, value_type > * m_current_ptr
 
bool m_valid
 
step_type m_step
 

Member Typedef Documentation

◆ iterator

template<typename ValueType , bool IsConst = true>
typedef InputEnumIterator<ValueType, IsConst> CASM::InputEnumeratorBase< ValueType, IsConst >::iterator
inherited

Definition at line 204 of file InputEnumerator.hh.

◆ reference

typedef CASM_TMP::ConstSwitch<IsConst, ValueType>& CASM::ValEnumerator< ValueType, IsConst >::reference
inherited

Definition at line 174 of file Enumerator.hh.

◆ step_type

typedef long CASM::EnumeratorBase::step_type
inherited

Definition at line 175 of file Enumerator.hh.

◆ value_type

typedef ValueType CASM::ValEnumerator< ValueType, IsConst >::value_type
inherited

Definition at line 173 of file Enumerator.hh.

Constructor & Destructor Documentation

◆ LatticeEnumEquivalents()

CASM::LatticeEnumEquivalents::LatticeEnumEquivalents ( const xtal::Lattice lat,
const SymGroup super_g 
)

Constructor.

Parameters
latLattice to generate equivalents of
super_gThe super group to use to generate equivalents. Must have a valid MasterSymGroup.
tolTolerance used for checking equivalence
Exceptions
std::runtime_errorif super_g does not have a MasterSymGroup

Definition at line 37 of file LatticeEnumEquivalents.cc.

Member Function Documentation

◆ _check()

bool CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::_check ( const CASM::SymOp X) const
inlineprivateinherited

Returns true for one element (the "minimum" SymOp) of the left cosets of the invariant subgroup

Definition at line 122 of file EnumEquivalents.hh.

◆ _decrement_step()

void CASM::EnumeratorBase::_decrement_step
inlineprotectedinherited

Decrement current step value.

Definition at line 202 of file Enumerator.hh.

◆ _increment_step()

void CASM::EnumeratorBase::_increment_step
inlineprotectedinherited

Increment current step value.

Definition at line 203 of file Enumerator.hh.

◆ _initialize() [1/2]

void CASM::EnumeratorBase::_initialize
inlineprotectedinherited

Initialize

  • Sets step to 0
  • Sets valid to true

Definition at line 190 of file Enumerator.hh.

◆ _initialize() [2/2]

void CASM::ValEnumerator< ValueType, IsConst >::_initialize ( CASM_TMP::ConstSwitch< IsConst, value_type > *  _initial)
inlineprotectedinherited

Initialize

  • Sets current to point at _initial
  • Sets step to 0
  • Sets valid to true

Definition at line 197 of file Enumerator.hh.

◆ _invalidate()

void CASM::EnumeratorBase::_invalidate
inlineprotectedinherited

Call if enumeration complete.

Definition at line 204 of file Enumerator.hh.

◆ _set_current_ptr()

void CASM::ValEnumerator< ValueType, IsConst >::_set_current_ptr ( CASM_TMP::ConstSwitch< IsConst, value_type > *  _new)
inlineprotectedinherited

Change the pointer.

Definition at line 215 of file Enumerator.hh.

◆ _set_step() [1/2]

void CASM::EnumeratorBase::_set_step ( step_type  val)
inlineprotectedinherited

Set current step value.

Definition at line 150 of file Enumerator.hh.

◆ _set_step() [2/2]

void CASM::EnumeratorBase::_set_step
inlineprotectedinherited

Set current step value.

Definition at line 205 of file Enumerator.hh.

◆ _validate()

void CASM::EnumeratorBase::_validate ( )
inlineprotectedinherited

Used if random access enumerator step is moved into valid range.

Definition at line 162 of file Enumerator.hh.

◆ begin()

template<typename ValueType , bool IsConst = true>
iterator CASM::InputEnumeratorBase< ValueType, IsConst >::begin ( )
inlineinherited

Definition at line 216 of file InputEnumerator.hh.

◆ current()

reference CASM::ValEnumerator< ValueType, IsConst >::current ( ) const
inlineinherited

Access the current ObjectType by reference.

Definition at line 211 of file Enumerator.hh.

◆ end()

template<typename ValueType , bool IsConst = true>
iterator CASM::InputEnumeratorBase< ValueType, IsConst >::end ( )
inlineinherited

Definition at line 220 of file InputEnumerator.hh.

◆ generator()

const xtal::Lattice & CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::generator ( ) const
inlineinherited

Definition at line 91 of file EnumEquivalents.hh.

◆ increment()

void CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::increment ( )
inlineoverrideprivatevirtualinherited

Implement increment.

Implements CASM::InputEnumeratorBase< ValueType, IsConst >.

Definition at line 103 of file EnumEquivalents.hh.

◆ invariant_subgroup()

const std::vector<CASM::SymOp >& CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::invariant_subgroup ( ) const
inlineinherited

Definition at line 95 of file EnumEquivalents.hh.

◆ name() [1/2]

virtual std::string CASM::EnumeratorBase::name
inherited

Derived enumerators must implement name, via ENUM_MEMBERS.

◆ name() [2/2]

std::string CASM::LatticeEnumEquivalents::name ( ) const
inlineoverridevirtual

Derived enumerators must implement name, via ENUM_MEMBERS.

Implements CASM::EnumeratorBase.

Definition at line 39 of file LatticeEnumEquivalents.hh.

◆ source() [1/2]

virtual jsonParser CASM::EnumeratorBase::source ( step_type  step) const
inlinevirtualinherited

Default Object source just uses step#

Returns:

{
"enumerated_by": "<enumerator_type>",
"step": <step #>
}
step_type step() const
Increments with each enumerated object.
Definition: Enumerator.hh:115

Definition at line 129 of file Enumerator.hh.

◆ source() [2/2]

virtual jsonParser CASM::EnumeratorBase::source
inlineinherited

Default Object source just uses step#

Returns:

{
"enumerated_by": "<enumerator_type>",
"step": <step #>
}

Definition at line 185 of file Enumerator.hh.

◆ step() [1/2]

step_type CASM::EnumeratorBase::step ( ) const
inlineinherited

Increments with each enumerated object.

Definition at line 115 of file Enumerator.hh.

◆ step() [2/2]

step_type CASM::EnumeratorBase::step
inlineinherited

Increments with each enumerated object.

Definition at line 186 of file Enumerator.hh.

◆ sym_op()

const CASM::SymOp & CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::sym_op ( ) const
inlineinherited

Definition at line 93 of file EnumEquivalents.hh.

◆ valid() [1/2]

bool CASM::EnumeratorBase::valid ( ) const
inlineinherited

Returns false if enumeration is complete.

Definition at line 118 of file Enumerator.hh.

◆ valid() [2/2]

bool CASM::EnumeratorBase::valid
inlineinherited

Returns false if enumeration is complete.

Definition at line 187 of file Enumerator.hh.

Member Data Documentation

◆ enumerator_name

const std::string CASM::LatticeEnumEquivalents::enumerator_name
static
Initial value:
=
"LatticeEnumEquivalents"

Definition at line 41 of file LatticeEnumEquivalents.hh.

◆ InputEnumIteratorBase< ValueType, IsConst >

template<typename ValueType , bool IsConst = true>
friend CASM::InputEnumeratorBase< ValueType, IsConst >::InputEnumIteratorBase< ValueType, IsConst >
privateinherited

Definition at line 198 of file InputEnumerator.hh.

◆ m_compare

SymRepIndexCompare CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::m_compare
privateinherited

Definition at line 133 of file EnumEquivalents.hh.

◆ m_current

notstd::cloneable_ptr<xtal::Lattice > CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::m_current
privateinherited

Definition at line 129 of file EnumEquivalents.hh.

◆ m_current_ptr

CASM_TMP::ConstSwitch<IsConst, value_type>* CASM::ValEnumerator< ValueType, IsConst >::m_current_ptr
privateinherited

Definition at line 220 of file Enumerator.hh.

◆ m_initial

notstd::cloneable_ptr<xtal::Lattice > CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::m_initial
privateinherited

Definition at line 128 of file EnumEquivalents.hh.

◆ m_invariant_subgroup

std::vector<CASM::SymOp > CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::m_invariant_subgroup
privateinherited

Definition at line 132 of file EnumEquivalents.hh.

◆ m_step

step_type CASM::EnumeratorBase::m_step
privateinherited

Definition at line 167 of file Enumerator.hh.

◆ m_symop_end

std::vector< CASM::SymOp >::const_iterator CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::m_symop_end
privateinherited

Definition at line 131 of file EnumEquivalents.hh.

◆ m_symop_it

std::vector< CASM::SymOp >::const_iterator CASM::EnumEquivalents< xtal::Lattice , std::vector< CASM::SymOp >::const_iterator , CASM::SymOp , SymRepIndexCompare >::m_symop_it
privateinherited

Definition at line 130 of file EnumEquivalents.hh.

◆ m_valid

bool CASM::EnumeratorBase::m_valid
privateinherited

Definition at line 165 of file Enumerator.hh.


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