CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::Orbit< _SymCompareType > Class Template Reference

#include <Orbit.hh>

+ Inheritance diagram for CASM::Orbit< _SymCompareType >:

Detailed Description

template<typename _SymCompareType>
class CASM::Orbit< _SymCompareType >

An Orbit of Element.

Provides prototype Element, orbit of equivalent elements, and equivalence map giving symmetry operations that map the prototype onto the equivalents.

Element and orbit comparison is done via a SymCompareType functor, which includes any necessary tolerance for floating point comparison. See SymCompare for how to implement the necessary methods.

The following relationships will be valid: element(i) = sym_compare.copy_apply(equivalence_map()[i][j], prototype()), for all j < equivalence_map()[i].size() equivalence_map()[i][j] = t * g; where g is a generating group element, and t is the "spatial_transform" defined by the SymCompareType for equivalent elements such that: sym_compare.representation_prepare(element(i)) == copy_apply(t, sym_compare.representation_prepare(copy_apply(g, prototype)))

Definition at line 43 of file Orbit.hh.

Public Types

using size_type = unsigned int
 
using Element = typename _SymCompareType::Element
 
using InvariantsType = typename _SymCompareType::InvariantsType
 
using SymCompareType = _SymCompareType
 
using const_iterator = typename std::vector< Element >::const_iterator
 
using const_symop_iterator = typename std::vector< SymOp >::const_iterator
 
typedef Base::MostDerived MostDerived
 

Public Member Functions

 Orbit (Element generating_element, SymGroup const &generating_group, SymCompareType const &sym_compare)
 Construct an Orbit from a generating_element Element, using provided symmetry group. More...
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
size_type size () const
 
const Elementprototype () const
 Identical to element(0) More...
 
const Elementoperator[] (size_type index) const
 Return Element at index, without bounds checking. More...
 
const Elementelement (size_type index) const
 Equivalent to operator[](size_type index) const. More...
 
const std::vector< Element > & elements () const
 const Access vector of Element More...
 
const multivector< SymOp >::X< 2 > & equivalence_map () const
 Return the equivalence map. More...
 
std::pair< const_symop_iterator, const_symop_iteratorequivalence_map (size_type index) const
 Return the equivalence map for element[index]. More...
 
SymGroupRepID canonization_rep_ID () const
 Return the canonization symmetry representation ID. More...
 
const_iterator find (const Element &e) const
 Find element in Orbit. More...
 
bool contains (const Element &e) const
 Check if element is in Orbit. More...
 
const SymGroupgenerating_group () const
 Return the generating SymGroup. More...
 
const SymCompareTypesym_compare () const
 Return the SymCompare functor reference. More...
 
InvariantsType const & invariants () const
 
Orbitapply_sym (const SymOp &op)
 Apply symmetry to Orbit. More...
 
bool operator< (const Orbit &B) const
 Compare orbits, using SymCompareType::inter_orbit_compare. More...
 
bool operator> (const MostDerived &B) const
 
bool operator<= (const MostDerived &B) const
 
bool operator>= (const MostDerived &B) const
 
bool operator== (const MostDerived &B) const
 
bool operator!= (const MostDerived &B) const
 

Protected Member Functions

bool eq_impl (const MostDerived &B) const
 
bool ne_impl (const MostDerived &B) const
 

Private Member Functions

void _construct_canonization_rep () const
 
template<typename SymOpIterator >
void _construct (Element generating_element, SymOpIterator begin, SymOpIterator end)
 Construct an Orbit from a generating_element Element, using provided symmetry rep. More...
 

Private Attributes

std::vector< Elementm_element
 All symmetrically equivalent elements (excluding those that SymCompare equivalent) More...
 
multivector< SymOp >::X< 2 > m_equivalence_map
 element(i) compares equivalent to prototype().copy_apply(m_equivalence_map[i][j]) for all j More...
 
SymGroup m_generating_group
 Group used to generate the orbit. More...
 
SymGroupRepID m_canonization_rep_ID
 ID of symmetry representation that describes the effect of each SymOp with respect to the canonical equivalent. More...
 
SymCompareType m_sym_compare
 Functor used to check compare Element, including symmetry rules, and make canonical forms. More...
 
InvariantsType m_invariants
 Orbit invariants. More...
 

Member Typedef Documentation

◆ const_iterator

template<typename _SymCompareType >
using CASM::Orbit< _SymCompareType >::const_iterator = typename std::vector<Element>::const_iterator

Definition at line 49 of file Orbit.hh.

◆ const_symop_iterator

template<typename _SymCompareType >
using CASM::Orbit< _SymCompareType >::const_symop_iterator = typename std::vector<SymOp>::const_iterator

Definition at line 50 of file Orbit.hh.

◆ Element

template<typename _SymCompareType >
using CASM::Orbit< _SymCompareType >::Element = typename _SymCompareType::Element

Definition at line 46 of file Orbit.hh.

◆ InvariantsType

template<typename _SymCompareType >
using CASM::Orbit< _SymCompareType >::InvariantsType = typename _SymCompareType::InvariantsType

Definition at line 47 of file Orbit.hh.

◆ MostDerived

template<typename Base >
typedef Base::MostDerived notstd::Comparisons< Base >::MostDerived
inherited

Definition at line 27 of file Comparisons.hh.

◆ size_type

template<typename _SymCompareType >
using CASM::Orbit< _SymCompareType >::size_type = unsigned int

Definition at line 45 of file Orbit.hh.

◆ SymCompareType

template<typename _SymCompareType >
using CASM::Orbit< _SymCompareType >::SymCompareType = _SymCompareType

Definition at line 48 of file Orbit.hh.

Constructor & Destructor Documentation

◆ Orbit()

template<typename _SymCompareType >
CASM::Orbit< _SymCompareType >::Orbit ( Element  generating_element,
SymGroup const &  generating_group,
SymCompareType const &  sym_compare 
)

Construct an Orbit from a generating_element Element, using provided symmetry group.

Construct an Orbit from a generating_element Element, using provided Group.

Parameters
generating_elementThe element used to generate equivalents
generating_groupThe group used for generating the orbit
sym_compareBinary functor that implements symmetry properties

find the best equivalence map out of all possible (lowest lexicographical sorting columnwise) ties are resolved by virtue of fact that 'tmp_element' is already sorted by m_sym_compare.compare

copy results

Definition at line 91 of file Orbit_impl.hh.

Member Function Documentation

◆ _construct()

template<typename _SymCompareType >
template<typename SymOpIterator >
void CASM::Orbit< _SymCompareType >::_construct ( Element  generating_element,
SymOpIterator  begin,
SymOpIterator  end 
)
private

Construct an Orbit from a generating_element Element, using provided symmetry rep.

◆ _construct_canonization_rep()

template<typename _SymCompareType >
void CASM::Orbit< _SymCompareType >::_construct_canonization_rep
private

Definition at line 252 of file Orbit_impl.hh.

◆ apply_sym()

template<typename _SymCompareType >
Orbit< _SymCompareType > & CASM::Orbit< _SymCompareType >::apply_sym ( const SymOp op)

Apply symmetry to Orbit.

Definition at line 224 of file Orbit_impl.hh.

◆ begin()

template<typename _SymCompareType >
const_iterator CASM::Orbit< _SymCompareType >::begin ( ) const
inline

Definition at line 57 of file Orbit.hh.

◆ canonization_rep_ID()

template<typename _SymCompareType >
SymGroupRepID CASM::Orbit< _SymCompareType >::canonization_rep_ID ( ) const
inline

Return the canonization symmetry representation ID.

Definition at line 105 of file Orbit.hh.

◆ cbegin()

template<typename _SymCompareType >
const_iterator CASM::Orbit< _SymCompareType >::cbegin ( ) const
inline

Definition at line 61 of file Orbit.hh.

◆ cend()

template<typename _SymCompareType >
const_iterator CASM::Orbit< _SymCompareType >::cend ( ) const
inline

Definition at line 63 of file Orbit.hh.

◆ contains()

template<typename _SymCompareType >
bool CASM::Orbit< _SymCompareType >::contains ( const Element e) const
inline

Check if element is in Orbit.

  • Assumes 'e' is 'prepared', uses SymCompare<Element>::intra_orbit_equal to check equivalence

Definition at line 124 of file Orbit.hh.

◆ element()

template<typename _SymCompareType >
const Element& CASM::Orbit< _SymCompareType >::element ( size_type  index) const
inline

Equivalent to operator[](size_type index) const.

  • May not be prepared

Definition at line 78 of file Orbit.hh.

◆ elements()

template<typename _SymCompareType >
const std::vector<Element>& CASM::Orbit< _SymCompareType >::elements ( ) const
inline

const Access vector of Element

  • May not be prepared

Definition at line 83 of file Orbit.hh.

◆ end()

template<typename _SymCompareType >
const_iterator CASM::Orbit< _SymCompareType >::end ( ) const
inline

Definition at line 59 of file Orbit.hh.

◆ eq_impl()

template<typename Base >
bool notstd::Comparisons< Base >::eq_impl ( const MostDerived B) const
inlineprotectedinherited

Definition at line 40 of file Comparisons.hh.

◆ equivalence_map() [1/2]

template<typename _SymCompareType >
const multivector<SymOp>::X<2>& CASM::Orbit< _SymCompareType >::equivalence_map ( ) const
inline

Return the equivalence map.

Returns
element(i) compares equivalent to prototype().copy_apply(equivalence_map[i][j]) for all j

Definition at line 90 of file Orbit.hh.

◆ equivalence_map() [2/2]

template<typename _SymCompareType >
std::pair<const_symop_iterator, const_symop_iterator> CASM::Orbit< _SymCompareType >::equivalence_map ( size_type  index) const
inline

Return the equivalence map for element[index].

Returns
a pair of const_iterators, begin and end, over SymOp such that element(index) compares equivalent to prototype().copy_apply(op)

Definition at line 98 of file Orbit.hh.

◆ find()

template<typename _SymCompareType >
const_iterator CASM::Orbit< _SymCompareType >::find ( const Element e) const
inline

Find element in Orbit.

  • Assumes 'e' is 'prepared', uses SymCompare<Element>::intra_orbit_equal to check equivalence

Definition at line 114 of file Orbit.hh.

◆ generating_group()

template<typename _SymCompareType >
const SymGroup& CASM::Orbit< _SymCompareType >::generating_group ( ) const
inline

Return the generating SymGroup.

Definition at line 127 of file Orbit.hh.

◆ invariants()

template<typename _SymCompareType >
InvariantsType const& CASM::Orbit< _SymCompareType >::invariants ( ) const
inline

Definition at line 134 of file Orbit.hh.

◆ ne_impl()

template<typename Base >
bool notstd::Comparisons< Base >::ne_impl ( const MostDerived B) const
inlineprotectedinherited

Definition at line 44 of file Comparisons.hh.

◆ operator!=()

template<typename Base >
bool notstd::Comparisons< Base >::operator!= ( const MostDerived B) const
inlineinherited

Definition at line 37 of file Comparisons.hh.

◆ operator<()

template<typename _SymCompareType >
bool CASM::Orbit< _SymCompareType >::operator< ( const Orbit< _SymCompareType > &  B) const

Compare orbits, using SymCompareType::inter_orbit_compare.

Definition at line 246 of file Orbit_impl.hh.

◆ operator<=()

template<typename Base >
bool notstd::Comparisons< Base >::operator<= ( const MostDerived B) const
inlineinherited

Definition at line 31 of file Comparisons.hh.

◆ operator==()

template<typename Base >
bool notstd::Comparisons< Base >::operator== ( const MostDerived B) const
inlineinherited

Definition at line 35 of file Comparisons.hh.

◆ operator>()

template<typename Base >
bool notstd::Comparisons< Base >::operator> ( const MostDerived B) const
inlineinherited

Definition at line 29 of file Comparisons.hh.

◆ operator>=()

template<typename Base >
bool notstd::Comparisons< Base >::operator>= ( const MostDerived B) const
inlineinherited

Definition at line 33 of file Comparisons.hh.

◆ operator[]()

template<typename _SymCompareType >
const Element& CASM::Orbit< _SymCompareType >::operator[] ( size_type  index) const
inline

Return Element at index, without bounds checking.

  • May not be prepared

Definition at line 73 of file Orbit.hh.

◆ prototype()

template<typename _SymCompareType >
const Element& CASM::Orbit< _SymCompareType >::prototype ( ) const
inline

Identical to element(0)

Definition at line 68 of file Orbit.hh.

◆ size()

template<typename _SymCompareType >
size_type CASM::Orbit< _SymCompareType >::size ( ) const
inline

Definition at line 65 of file Orbit.hh.

◆ sym_compare()

template<typename _SymCompareType >
const SymCompareType& CASM::Orbit< _SymCompareType >::sym_compare ( ) const
inline

Return the SymCompare functor reference.

  • implements symmetry properties of this orbit

Definition at line 132 of file Orbit.hh.

Member Data Documentation

◆ m_canonization_rep_ID

template<typename _SymCompareType >
SymGroupRepID CASM::Orbit< _SymCompareType >::m_canonization_rep_ID
mutableprivate

ID of symmetry representation that describes the effect of each SymOp with respect to the canonical equivalent.

Definition at line 165 of file Orbit.hh.

◆ m_element

template<typename _SymCompareType >
std::vector<Element> CASM::Orbit< _SymCompareType >::m_element
private

All symmetrically equivalent elements (excluding those that SymCompare equivalent)

Definition at line 154 of file Orbit.hh.

◆ m_equivalence_map

template<typename _SymCompareType >
multivector<SymOp>::X<2> CASM::Orbit< _SymCompareType >::m_equivalence_map
private

element(i) compares equivalent to prototype().copy_apply(m_equivalence_map[i][j]) for all j

Definition at line 158 of file Orbit.hh.

◆ m_generating_group

template<typename _SymCompareType >
SymGroup CASM::Orbit< _SymCompareType >::m_generating_group
private

Group used to generate the orbit.

Definition at line 161 of file Orbit.hh.

◆ m_invariants

template<typename _SymCompareType >
InvariantsType CASM::Orbit< _SymCompareType >::m_invariants
private

Orbit invariants.

Definition at line 172 of file Orbit.hh.

◆ m_sym_compare

template<typename _SymCompareType >
SymCompareType CASM::Orbit< _SymCompareType >::m_sym_compare
private

Functor used to check compare Element, including symmetry rules, and make canonical forms.

Definition at line 169 of file Orbit.hh.


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