CASM
1.1.0
A Clusters Approach to Statistical Mechanics
SymPermutation.cc
Go to the documentation of this file.
1
#include "
casm/symmetry/SymPermutation.hh
"
2
3
#include "
casm/container/Permutation.hh
"
4
#include "
casm/container/io/PermutationIO.hh
"
5
6
namespace
CASM
{
7
8
double
SymPermutation::character
()
const
{
9
int
n_fix(0);
10
for
(
Index
i = 0; i <
m_permute
.
size
(); i++) {
11
n_fix += int(i ==
m_permute
[i]);
12
}
13
return
n_fix;
14
}
15
16
//*******************************************************************************************
17
18
// Makes permutation matrix from m_permute
19
// Permute matrix P reorders elements of a column vector v via
20
// v' = P*v
21
// Therefore, we loop over m_permute and assign ones to the
22
// appropriate row/column
23
24
void
SymPermutation::_calc_mat
()
const
{
25
m_mat
.resize(
m_permute
.
size
(),
m_permute
.
size
());
26
m_mat
.setZero();
27
for
(
Index
i = 0; i <
m_permute
.
size
(); i++)
m_mat
(i,
m_permute
[i]) = 1;
28
return
;
29
}
30
}
// namespace CASM
Permutation.hh
PermutationIO.hh
SymPermutation.hh
CASM::Permutation::size
Index size() const
Definition:
Permutation.hh:60
CASM::SymPermutation::character
double character() const override
Calculates character of the representation (if well-defined)
Definition:
SymPermutation.cc:8
CASM::SymPermutation::m_mat
Eigen::MatrixXd m_mat
Definition:
SymPermutation.hh:77
CASM::SymPermutation::m_permute
Permutation m_permute
Definition:
SymPermutation.hh:70
CASM::SymPermutation::_calc_mat
void _calc_mat() const
Generate the matrix of permutation, when m_permute is known.
Definition:
SymPermutation.cc:24
CASM
Main CASM namespace.
Definition:
APICommand.hh:8
CASM::Index
INDEX_TYPE Index
For long integer indexing:
Definition:
definitions.hh:39
src
casm
symmetry
SymPermutation.cc
Generated on Tue Mar 23 2021 14:16:48 for CASM by
1.9.1