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

#include <PermuteIterator.hh>

+ Inheritance diagram for CASM::PermuteIterator:

Detailed Description

Iterate over all combined factor group and translation permutations for a Supercell

The sequence:

SupercellSymInfo sym_info = ...
for(it = sym_info.permute_begin(); it != sym_info.permute_end(); ++it) {
after_array = it->permute(before_array);
}
SupercellSymInfo const & sym_info() const
Reference the SupercellSymInfo containing the operations being pointed at.
permute_const_iterator permute_end() const
permute_const_iterator permute_begin() const

Replicates this sequence of permutations:

SupercellSymInfo sym_info = ...
for( f=0; f<sym_info.factor_group().size(); f++) {
for( t=0; t<sym_info.translation_permutations().size(); t++) {
after_array =
sym_info.translation_permute(t).permute(sym_info.factor_group_permute(f).permute(before_array));
}
}
Container permute(const Container &_before) const
Generate permuted copy of indexed container.
Definition: Permutation.hh:124
const Permutation & factor_group_permute(Index supercell_factor_group_index) const
Site permutation corresponding to supercell factor group operation.
SymGroup const & factor_group() const
Subgroup of primitive-cell factor group operations that leave supercell lattice invariant.
const std::vector< Permutation > & translation_permutations() const
Permutations describing reordering of sites of supercell due to a lattice translation of the primitiv...

Bidirectional iterators are supposed to be input/output iterators, but this is actually only an input iterator (meaning operator* returns by value).

Definition at line 43 of file PermuteIterator.hh.

Public Types

typedef Base::MostDerived MostDerived
 

Public Member Functions

 PermuteIterator ()
 
 PermuteIterator (const PermuteIterator &iter)
 
 PermuteIterator (SupercellSymInfo const &_sym_info, Index _factor_group_index, Index _translation_index)
 
PermuteIteratoroperator= (PermuteIterator iter)
 
const PermuteIteratoroperator* () const
 Returns a reference to this. More...
 
const PermuteIteratoroperator-> () const
 Returns a pointer to this. More...
 
Permutation combined_permute () const
 
SymGroup const & factor_group () const
 Reference the SupercellSymInfo::factor_group() More...
 
SupercellSymInfo const & sym_info () const
 Reference the SupercellSymInfo containing the operations being pointed at. More...
 
Index factor_group_index () const
 Return the supercell factor group index. More...
 
Index prim_factor_group_index () const
 Return the prim factor group index. More...
 
Index translation_index () const
 Return the index into the supercell translation permutations. More...
 
const Permutationfactor_group_permute () const
 Return the factor group permutation being pointed at. More...
 
const Permutationtranslation_permute () const
 Return the translation permutation being pointed at. More...
 
SymOpRepresentation const & occ_rep (Index b) const
 
SymOpRepresentation const & local_dof_rep (DoFKey const &_key, Index b) const
 
SymOpRepresentation const & global_dof_rep (DoFKey const &_key) const
 
SymOp sym_op () const
 
Index permute_ind (Index i) const
 
bool operator< (const PermuteIterator &iter) const
 
PermuteIteratoroperator++ ()
 
PermuteIterator operator++ (int)
 
PermuteIteratoroperator-- ()
 
PermuteIterator operator-- (int)
 
PermuteIterator begin_next_fg_op () const
 
PermuteIterator inverse () const
 
PermuteIterator operator* (const PermuteIterator &RHS) const
 
bool is_compatible (const PermuteIterator &other_permute_iterator) 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
 
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

bool eq_impl (const PermuteIterator &iter) const
 

Private Attributes

SupercellSymInfo const * m_sym_info
 
std::vector< Permutation > const * m_trans_permute
 
Index m_factor_group_index
 
Index m_translation_index
 
friend Comparisons< CRTPBase< PermuteIterator > >
 

Friends

void swap (PermuteIterator &a, PermuteIterator &b)
 

Member Typedef Documentation

◆ MostDerived

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

Definition at line 27 of file Comparisons.hh.

Constructor & Destructor Documentation

◆ PermuteIterator() [1/3]

CASM::PermuteIterator::PermuteIterator ( )

Definition at line 14 of file PermuteIterator.cc.

◆ PermuteIterator() [2/3]

CASM::PermuteIterator::PermuteIterator ( const PermuteIterator iter)

Definition at line 16 of file PermuteIterator.cc.

◆ PermuteIterator() [3/3]

CASM::PermuteIterator::PermuteIterator ( SupercellSymInfo const &  _sym_info,
Index  _factor_group_index,
Index  _translation_index 
)

Definition at line 22 of file PermuteIterator.cc.

Member Function Documentation

◆ begin_next_fg_op()

PermuteIterator CASM::PermuteIterator::begin_next_fg_op ( ) const

Iterator to next beginning of next factor group operation skipping all of the intervening operations that differ only by a translation

Definition at line 175 of file PermuteIterator.cc.

◆ combined_permute()

Permutation CASM::PermuteIterator::combined_permute ( ) const

Returns the combination of factor_group permutation and translation permutation

Definition at line 43 of file PermuteIterator.cc.

◆ eq_impl() [1/2]

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

Definition at line 40 of file Comparisons.hh.

◆ eq_impl() [2/2]

bool CASM::PermuteIterator::eq_impl ( const PermuteIterator iter) const
private

Definition at line 133 of file PermuteIterator.cc.

◆ factor_group()

SymGroup const & CASM::PermuteIterator::factor_group ( ) const

Reference the SupercellSymInfo::factor_group()

Reference the supercell factor group (SupercellSymInfo::factor_group())

Definition at line 53 of file PermuteIterator.cc.

◆ factor_group_index()

Index CASM::PermuteIterator::factor_group_index ( ) const

Return the supercell factor group index.

Return the supercell factor group index

Index into SupercellSymInfo::factor_group() of the factor group op being pointed at

Definition at line 61 of file PermuteIterator.cc.

◆ factor_group_permute()

const Permutation & CASM::PermuteIterator::factor_group_permute ( ) const

Return the factor group permutation being pointed at.

Definition at line 80 of file PermuteIterator.cc.

◆ global_dof_rep()

SymOpRepresentation const & CASM::PermuteIterator::global_dof_rep ( DoFKey const &  _key) const

Returns representation of current operation corresponding to global DoF specified by _key

Definition at line 106 of file PermuteIterator.cc.

◆ inverse()

PermuteIterator CASM::PermuteIterator::inverse ( ) const

Definition at line 184 of file PermuteIterator.cc.

◆ is_compatible()

bool CASM::PermuteIterator::is_compatible ( const PermuteIterator other_permute_iterator) const
inline

Returns true if the two PermuteIterators share the same instance of sym_info. This is meant to be used if you want to check that a particular range of PermuteIterators are referring to the same supercell, to ensure your iterating over a consistent set of permutations.

Definition at line 152 of file PermuteIterator.hh.

◆ local_dof_rep()

SymOpRepresentation const & CASM::PermuteIterator::local_dof_rep ( DoFKey const &  _key,
Index  b 
) const

Returns representation of current operation corresponding to local DoF specified by _key on sublattice b

Definition at line 99 of file PermuteIterator.cc.

◆ ne_impl()

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

Definition at line 44 of file Comparisons.hh.

◆ occ_rep()

SymOpRepresentation const & CASM::PermuteIterator::occ_rep ( Index  b) const

Returns representation of current operation corresponding to species transformation on sublattice b

Definition at line 93 of file PermuteIterator.cc.

◆ operator!=()

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

Definition at line 37 of file Comparisons.hh.

◆ operator*() [1/2]

const PermuteIterator & CASM::PermuteIterator::operator* ( ) const

Returns a reference to this.

Returns a reference to this – allows PermuteIterator to be treated as an iterator to PermuteIterator object

Definition at line 36 of file PermuteIterator.cc.

◆ operator*() [2/2]

PermuteIterator CASM::PermuteIterator::operator* ( const PermuteIterator RHS) const

Return the PermuteIterator product (equivalent to first applying RHS and then applying *this).

Definition at line 206 of file PermuteIterator.cc.

◆ operator++() [1/2]

PermuteIterator & CASM::PermuteIterator::operator++ ( )

Definition at line 142 of file PermuteIterator.cc.

◆ operator++() [2/2]

PermuteIterator CASM::PermuteIterator::operator++ ( int  )

Definition at line 152 of file PermuteIterator.cc.

◆ operator--() [1/2]

PermuteIterator & CASM::PermuteIterator::operator-- ( )

Definition at line 159 of file PermuteIterator.cc.

◆ operator--() [2/2]

PermuteIterator CASM::PermuteIterator::operator-- ( int  )

Definition at line 169 of file PermuteIterator.cc.

◆ operator->()

const PermuteIterator * CASM::PermuteIterator::operator-> ( ) const

Returns a pointer to this.

Returns a pointer to this – allows PermuteIterator to be treated as an iterator to PermuteIterator object

Definition at line 39 of file PermuteIterator.cc.

◆ operator<()

bool CASM::PermuteIterator::operator< ( const PermuteIterator iter) const

Definition at line 126 of file PermuteIterator.cc.

◆ operator<=()

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

Definition at line 31 of file Comparisons.hh.

◆ operator=()

PermuteIterator & CASM::PermuteIterator::operator= ( PermuteIterator  iter)

Definition at line 30 of file PermuteIterator.cc.

◆ 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.

◆ permute_ind()

Index CASM::PermuteIterator::permute_ind ( Index  i) const

Index-wise permutation defined via: after_permutation[i] = before_permutation[permute_iterator.permute_ind(i)];

Definition at line 122 of file PermuteIterator.cc.

◆ prim_factor_group_index()

Index CASM::PermuteIterator::prim_factor_group_index ( ) const

Return the prim factor group index.

Return the prim factor group index

Index into Structure::factor_group() of the factor group op being pointed at

Definition at line 69 of file PermuteIterator.cc.

◆ sym_info()

SupercellSymInfo const & CASM::PermuteIterator::sym_info ( ) const

Reference the SupercellSymInfo containing the operations being pointed at.

Definition at line 48 of file PermuteIterator.cc.

◆ sym_op()

SymOp CASM::PermuteIterator::sym_op ( ) const

gets the SymOp for the current operation, defined by translation_op[trans_index]*factor_group_op[fg_index] i.e, equivalent to application of the factor group operation, FOLLOWED BY application of the translation operation

Definition at line 111 of file PermuteIterator.cc.

◆ translation_index()

Index CASM::PermuteIterator::translation_index ( ) const

Return the index into the supercell translation permutations.

Return the index into the supercell translation permutations

Index into SupercellSymInfo::translation_permutations() of the translation being pointed at

Definition at line 77 of file PermuteIterator.cc.

◆ translation_permute()

const Permutation & CASM::PermuteIterator::translation_permute ( ) const

Return the translation permutation being pointed at.

Definition at line 87 of file PermuteIterator.cc.

Friends And Related Function Documentation

◆ swap

void swap ( PermuteIterator a,
PermuteIterator b 
)
friend

Definition at line 315 of file PermuteIterator.cc.

Member Data Documentation

◆ Comparisons< CRTPBase< PermuteIterator > >

friend CASM::PermuteIterator::Comparisons< CRTPBase< PermuteIterator > >
private

Definition at line 157 of file PermuteIterator.hh.

◆ m_factor_group_index

Index CASM::PermuteIterator::m_factor_group_index
private

Definition at line 52 of file PermuteIterator.hh.

◆ m_sym_info

SupercellSymInfo const* CASM::PermuteIterator::m_sym_info
private

Definition at line 46 of file PermuteIterator.hh.

◆ m_trans_permute

std::vector<Permutation> const* CASM::PermuteIterator::m_trans_permute
private

Pointer to the vector<Permutation> of translation permutations inside of m_sym_info (to provide faster access)

Definition at line 50 of file PermuteIterator.hh.

◆ m_translation_index

Index CASM::PermuteIterator::m_translation_index
private

Definition at line 53 of file PermuteIterator.hh.


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