CASM  1.1.0
A Clusters Approach to Statistical Mechanics
SymTools.hh
Go to the documentation of this file.
1 #ifndef SYMTOOLS_HH
2 #define SYMTOOLS_HH
3 
4 #include <vector>
5 
6 namespace CASM {
7 class SymGroup;
8 class SymOp;
9 namespace xtal {
10 class Lattice;
11 class UnitCellCoord;
12 } // namespace xtal
13 
14 namespace sym {
16 SymGroup invariant_subgroup(const SymGroup &super_group,
17  const xtal::Lattice &lat);
18 
19 template <typename OutputIt>
20 OutputIt invariant_subgroup(const std::vector<SymOp> &super_group,
21  const xtal::Lattice &lat, OutputIt result);
22 
23 // TODO: Do we keep passing by reference or do we want to change our ways here
24 // and start passing by pointer?
25 // it could just be:
26 // sym::apply(op, my_ucc, args) // returns new value
27 // sym::apply(op, &my_ucc, args) // modifies value
29 template <typename Transform, typename Object, typename... Args>
30 Object &apply(const Transform &transformation, Object &obj,
31  const Args &... args);
32 
34 template <typename Transform, typename Object, typename... Args>
35 Object copy_apply(const Transform &transformation, Object obj_copy,
36  const Args &... args) {
37  sym::apply(transformation, obj_copy, args...);
38  return obj_copy;
39 }
40 } // namespace sym
41 } // namespace CASM
42 
43 #endif
xtal::Coordinate copy_apply(const xtal::SymOp &op, xtal::Coordinate coord)
Copy and apply SymOp to a Coordinate.
Definition: Coordinate.cc:354
xtal::Coordinate & apply(const xtal::SymOp &op, xtal::Coordinate &coord)
apply SymOp to a Coordinate
Definition: Coordinate.cc:347
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
Main CASM namespace.
Definition: APICommand.hh:8