CASM  1.1.0
A Clusters Approach to Statistical Mechanics
SymTools_impl.hh
Go to the documentation of this file.
1 #ifndef SYMTOOLS_IMPL_HH
2 #define SYMTOOLS_IMPL_HH
3 
7 
8 namespace CASM {
9 namespace sym {
10 template <typename OutputIt>
11 OutputIt invariant_subgroup(const std::vector<SymOp> &super_group,
12  const xtal::Lattice &lat, OutputIt result) {
13  auto subgroup_operation_indices =
14  xtal::invariant_subgroup_indices(lat, super_group);
15  for (auto ix : subgroup_operation_indices) {
16  auto it = super_group.begin();
17  std::advance(it, ix);
18  *result = *it;
19  ++result;
20  }
21  return result;
22 }
23 } // namespace sym
24 } // namespace CASM
25 
26 #endif
SymGroup invariant_subgroup(const SymGroup &super_group, const xtal::Lattice &lat)
Returns the subgroup of the given group that keeps the lattice invariant.
Definition: SymTools.cc:34
std::vector< Index > invariant_subgroup_indices(const Lattice &lat, SymOpVector const &super_grp)
Construct indices of the subgroup that leaves a lattice unchanged.
Main CASM namespace.
Definition: APICommand.hh:8