CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::SubspaceSymCompare< Element, SymApply > Class Template Reference

#include <VectorSymCompare.hh>

+ Inheritance diagram for CASM::SubspaceSymCompare< Element, SymApply >:

Detailed Description

template<typename Element, typename SymApply>
class CASM::SubspaceSymCompare< Element, SymApply >

Definition at line 187 of file VectorSymCompare.hh.

Public Types

using Base = EigenSymCompare< SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > >> >
 
using MostDerived = typename Base::MostDerived
 
using Element = typename traits< MostDerived >::Element
 
using SymApply = typename traits< MostDerived >::SymApply
 
using InvariantsType = typename traits< MostDerived >::InvariantsType
 type InvariantsType is used to screen elements for equivalence and sort orbits More...
 

Public Member Functions

template<typename... Args>
 SubspaceSymCompare (Args &&... args)
 Constructor. More...
 
double tol () const
 Return tolerance. More...
 
Element copy_apply (SymOp const &op, Element obj) const
 Applies SymOp to Element. More...
 
Element spatial_prepare (Element obj) const
 Prepare an element for comparison via an isometric affine transformation. More...
 
Element representation_prepare (Element obj) const
 Prepare an element for comparison via transformation of its internal representation. More...
 
Element prepare (Element obj) const
 Prepare an element for comparison via representation_prepare(), followed by spatial_prepare() More...
 
bool compare (const Element &A, const Element &B) const
 Orders 'prepared' elements. More...
 
bool equal (const Element &A, const Element &B) const
 Check equivalence of 'prepared' elements. More...
 
InvariantsType make_invariants (const Element &element) const
 Make orbit invariants from one element in the orbit. More...
 
bool invariants_compare (const InvariantsType &A, const InvariantsType &B) const
 Defines an order for orbits that have different invariants. More...
 
bool invariants_equal (const InvariantsType &A, const InvariantsType &B) const
 Check equivalence of invariants. More...
 
bool inter_orbit_compare (const Element &A, const InvariantsType &A_invariants, const Element &B, const InvariantsType &B_invariants) const
 Orders orbit prototypes, breaking invariants_compare ties. More...
 
bool inter_orbit_equal (const Element &A, const InvariantsType &A_invariants, const Element &B, const InvariantsType &B_invariants) const
 Check equivalence of prototypes in different orbit. More...
 
std::unique_ptr< SymOpRepresentationcanonical_transform (Element const &obj) const
 Access transform that took cluster from unprepared to prepared state. More...
 
SymOp const & spatial_transform () const
 Access spatial transform that was used during most recent spatial preparation of an element. More...
 

Protected Member Functions

Element representation_prepare_impl (Element obj) const
 Prepare an element for comparison by rotating, sorting, and changing sign of column vectors. More...
 
InvariantsType make_invariants_impl (Element const &obj) const
 Make orbit invariants from one element in the orbit. More...
 
bool invariants_compare_impl (InvariantsType const &A_invariants, InvariantsType const &B_invariants) const
 Orders 'prepared' elements in the same orbit. More...
 
bool compare_impl (const Element &A, const Element &B) const
 Compares 'prepared' elements. More...
 
std::unique_ptr< SymOpRepresentationcanonical_transform_impl (Element const &obj) const
 Returns transformation that takes 'obj' to its prepared (canonical) form. More...
 
Element copy_apply_impl (SymOp const &op, Element obj) const
 
Element spatial_prepare_impl (Element obj) const
 Spatial prepare does not apply – element is returned unchanged. More...
 
SymOp const & spatial_transform_impl () const
 Spatial prepare does not apply – transform is always identity. More...
 
bool inter_orbit_compare_impl (const Element &A, const InvariantsType &A_invariants, const Element &B, const InvariantsType &B_invariants) const
 Orders orbit prototypes, breaking invariants_compare ties. More...
 

Protected Attributes

friend _Base
 

Private Attributes

double m_tol
 
SymApply m_apply
 
SymOp m_spatial_transform
 

Friends

class EigenSymCompare< SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > > >
 
class SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > >
 

Member Typedef Documentation

◆ Base

template<typename Element , typename SymApply >
using CASM::SubspaceSymCompare< Element, SymApply >::Base = EigenSymCompare< SymCompare<CRTPBase<SubspaceSymCompare<Element, SymApply> >> >

Definition at line 191 of file VectorSymCompare.hh.

◆ Element

Definition at line 94 of file VectorSymCompare.hh.

◆ InvariantsType

template<typename Base >
using CASM::SymCompare< Base >::InvariantsType = typename traits<MostDerived>::InvariantsType
inherited

type InvariantsType is used to screen elements for equivalence and sort orbits

Definition at line 82 of file SymCompare.hh.

◆ MostDerived

◆ SymApply

Definition at line 95 of file VectorSymCompare.hh.

Constructor & Destructor Documentation

◆ SubspaceSymCompare()

template<typename Element , typename SymApply >
template<typename... Args>
CASM::SubspaceSymCompare< Element, SymApply >::SubspaceSymCompare ( Args &&...  args)
inline

Constructor.

Parameters
tolTolerance for invariants_compare of site-to-site distances

Definition at line 199 of file VectorSymCompare.hh.

Member Function Documentation

◆ canonical_transform()

template<typename Base >
std::unique_ptr< SymOpRepresentation > CASM::SymCompare< Base >::canonical_transform ( Element const &  obj) const
inherited

Access transform that took cluster from unprepared to prepared state.

Definition at line 244 of file SymCompare.hh.

◆ canonical_transform_impl()

std::unique_ptr< SymOpRepresentation > CASM::EigenSymCompare< Base >::canonical_transform_impl ( Element const &  obj) const
protectedinherited

Returns transformation that takes 'obj' to its prepared (canonical) form.

  • For now returns pointer to SymPermutation object that encodes permutation due to sorting elements

Definition at line 126 of file VectorSymCompare_impl.hh.

◆ compare()

template<typename Base >
bool CASM::SymCompare< Base >::compare ( const Element A,
const Element B 
) const
inherited

Orders 'prepared' elements.

  • Returns 'true' to indicate A < B
  • Assumes elements are 'prepared' before being compared

Definition at line 173 of file SymCompare.hh.

◆ compare_impl()

bool CASM::EigenSymCompare< Base >::compare_impl ( const Element A,
const Element B 
) const
protectedinherited

Compares 'prepared' elements.

  • Returns 'true' to indicate B < A
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)
    bool compare(const Element &A, const Element &B) const
    Orders 'prepared' elements.
    Definition: SymCompare.hh:173
  • Assumes elements are 'prepared' before being compared

Definition at line 121 of file VectorSymCompare_impl.hh.

◆ copy_apply()

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::copy_apply ( SymOp const &  op,
Element  obj 
) const
inherited

Applies SymOp to Element.

Applies SymOp to Element. Default performs standalone copy_apply.

Definition at line 123 of file SymCompare.hh.

◆ copy_apply_impl()

Element CASM::EigenSymCompare< SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > > >::copy_apply_impl ( SymOp const &  op,
Element  obj 
) const
inlineprotectedinherited

Definition at line 129 of file VectorSymCompare.hh.

◆ equal()

template<typename Base >
bool CASM::SymCompare< Base >::equal ( const Element A,
const Element B 
) const
inherited

Check equivalence of 'prepared' elements.

Returns
!compare(A,B) && !compare(B,A)
  • Assumes elements are 'prepared' before being compared

Definition at line 183 of file SymCompare.hh.

◆ inter_orbit_compare()

template<typename Base >
bool CASM::SymCompare< Base >::inter_orbit_compare ( const Element A,
const InvariantsType A_invariants,
const Element B,
const InvariantsType B_invariants 
) const
inherited

Orders orbit prototypes, breaking invariants_compare ties.

Definition at line 222 of file SymCompare.hh.

◆ inter_orbit_compare_impl()

template<typename Base >
bool CASM::SymCompare< Base >::inter_orbit_compare_impl ( const Element A,
const InvariantsType A_invariants,
const Element B,
const InvariantsType B_invariants 
) const
protectedinherited

Orders orbit prototypes, breaking invariants_compare ties.

  • Returns 'true' to indicate A < B
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)

Implementation:

  • First, check invariants_compare
  • Break ties with, compare(A, B)

Definition at line 265 of file SymCompare.hh.

◆ inter_orbit_equal()

template<typename Base >
bool CASM::SymCompare< Base >::inter_orbit_equal ( const Element A,
const InvariantsType A_invariants,
const Element B,
const InvariantsType B_invariants 
) const
inherited

Check equivalence of prototypes in different orbit.

Returns
  • Assumes elements are in canonical form

Definition at line 235 of file SymCompare.hh.

◆ invariants_compare()

template<typename Base >
bool CASM::SymCompare< Base >::invariants_compare ( const InvariantsType A,
const InvariantsType B 
) const
inherited

Defines an order for orbits that have different invariants.

Defines an order for elements that have different invariants.

Definition at line 201 of file SymCompare.hh.

◆ invariants_compare_impl()

bool CASM::EigenSymCompare< Base >::invariants_compare_impl ( InvariantsType const &  A_invariants,
InvariantsType const &  B_invariants 
) const
protectedinherited

Orders 'prepared' elements in the same orbit.

  • Returns 'true' to indicate A < B
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)
  • Assumes elements are 'prepared' before being compared Implementation:
  • First compares by number of sites in cluster
  • Then compare all displacements, from longest to shortest

Definition at line 117 of file VectorSymCompare_impl.hh.

◆ invariants_equal()

template<typename Base >
bool CASM::SymCompare< Base >::invariants_equal ( const InvariantsType A,
const InvariantsType B 
) const
inherited

Check equivalence of invariants.

Returns

Definition at line 210 of file SymCompare.hh.

◆ make_invariants()

template<typename Base >
SymCompare< Base >::InvariantsType CASM::SymCompare< Base >::make_invariants ( const Element element) const
inherited

Make orbit invariants from one element in the orbit.

Get orbit invariants from one element in the orbit.

Definition at line 189 of file SymCompare.hh.

◆ make_invariants_impl()

EigenSymCompare< Base >::InvariantsType CASM::EigenSymCompare< Base >::make_invariants_impl ( Element const &  obj) const
protectedinherited

Make orbit invariants from one element in the orbit.

Definition at line 114 of file VectorSymCompare_impl.hh.

◆ prepare()

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::prepare ( Element  obj) const
inherited

Prepare an element for comparison via representation_prepare(), followed by spatial_prepare()

Definition at line 163 of file SymCompare.hh.

◆ representation_prepare()

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::representation_prepare ( Element  obj) const
inherited

Prepare an element for comparison via transformation of its internal representation.

  • For instance, sort sites of a cluster so comparison may be performed more efficiently

Definition at line 154 of file SymCompare.hh.

◆ representation_prepare_impl()

template<typename Element , typename SymApply >
Element CASM::SubspaceSymCompare< Element, SymApply >::representation_prepare_impl ( Element  obj) const
protected

Prepare an element for comparison by rotating, sorting, and changing sign of column vectors.

Prepare an element for comparison.

  • Attempts to find a sparse set of spanning vectors, and sort them so that subspace matrix is nearly upper triangular (if possible)
  • Also enures that first nonzero element of each row (if there is one) is positive

Definition at line 117 of file VectorSymCompare_impl.hh.

◆ spatial_prepare()

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::spatial_prepare ( Element  obj) const
inherited

Prepare an element for comparison via an isometric affine transformation.

  • For instance, translate a cluster so comparison may be performed more efficiently.
  • The transformation that is applied is stored and available as spatial_transform
  • The spatial_transform is also included in the symmetry operations stored in the Orbit equivalence_map (i.e. equivalence_map_element = spatial_transform * generating_group_op)
  • Returns pair such that pair.first = apply_sym(pair.second, obj)

Definition at line 142 of file SymCompare.hh.

◆ spatial_prepare_impl()

EigenSymCompare< Base >::Element CASM::EigenSymCompare< Base >::spatial_prepare_impl ( Element  obj) const
protectedinherited

Spatial prepare does not apply – element is returned unchanged.

Definition at line 134 of file VectorSymCompare_impl.hh.

◆ spatial_transform()

template<typename Base >
SymOp const & CASM::SymCompare< Base >::spatial_transform
inherited

Access spatial transform that was used during most recent spatial preparation of an element.

Definition at line 252 of file SymCompare.hh.

◆ spatial_transform_impl()

SymOp const & CASM::EigenSymCompare< Base >::spatial_transform_impl
protectedinherited

Spatial prepare does not apply – transform is always identity.

Spatial prepare does not apply – always identity.

Definition at line 137 of file VectorSymCompare_impl.hh.

◆ tol()

double CASM::EigenSymCompare< Base >::tol
inherited

Return tolerance.

Definition at line 100 of file VectorSymCompare_impl.hh.

Friends And Related Function Documentation

◆ EigenSymCompare< SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > > >

template<typename Element , typename SymApply >
friend class EigenSymCompare< SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > > >
friend

Definition at line 199 of file VectorSymCompare.hh.

◆ SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > >

template<typename Element , typename SymApply >
friend class SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > >
friend

Definition at line 199 of file VectorSymCompare.hh.

Member Data Documentation

◆ _Base

◆ m_apply

Definition at line 142 of file VectorSymCompare.hh.

◆ m_spatial_transform

SymOp CASM::EigenSymCompare< SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > > >::m_spatial_transform
privateinherited

Not applicable to VectorSymCompare – always identity

  • Default SymOp constructor initializes to identity

Definition at line 146 of file VectorSymCompare.hh.

◆ m_tol

double CASM::EigenSymCompare< SymCompare< CRTPBase< SubspaceSymCompare< Element, SymApply > > > >::m_tol
privateinherited

Definition at line 140 of file VectorSymCompare.hh.


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