8#include "SpaceSymmetry.tpp"
27 std::cout <<
"Determinant (1D symmetry) =" << det << std::endl;
28 UTIL_THROW(
"Invalid SpaceSymmetry<1>: |det| != 1");
42 {
return (R_(0,0)*R(1,1) - R(0,1)*R(1,0)); }
48 int det = determinant();
50 UTIL_THROW(
"Invalid SpaceSymmetry<2>: |det| != 1");
57 A(0,1) = -R_(0,1)/det;
58 A(1,0) = -R_(1,0)/det;
69 det += R_(0,0)*(R(1,1)*R(2,2) - R(1,2)*R(2,1));
70 det += R_(0,1)*(R(1,2)*R(2,0) - R(1,0)*R(2,2));
71 det += R_(0,2)*(R(1,0)*R(2,1) - R(1,1)*R(2,0));
79 int det = determinant();
81 UTIL_THROW(
"Invalid SpaceSymmetry<3>: |det| != 1");
86 A(0,0) = (R_(1,1)*R(2,2) - R(1,2)*R(2,1))/det;
87 A(1,0) = (R_(1,2)*R(2,0) - R(1,0)*R(2,2))/det;
88 A(2,0) = (R_(1,0)*R(2,1) - R(1,1)*R(2,0))/det;
90 A(0,1) = (R_(2,1)*R(0,2) - R(2,2)*R(0,1))/det;
91 A(1,1) = (R_(2,2)*R(0,0) - R(2,0)*R(0,2))/det;
92 A(2,1) = (R_(2,0)*R(0,1) - R(2,1)*R(0,0))/det;
94 A(0,2) = (R_(0,1)*R(1,2) - R(0,2)*R(1,1))/det;
95 A(1,2) = (R_(0,2)*R(1,0) - R(0,0)*R(1,2))/det;
96 A(2,2) = (R_(0,0)*R(1,1) - R(0,1)*R(1,0))/det;
103 template class SpaceSymmetry<1>;
104 template class SpaceSymmetry<2>;
105 template class SpaceSymmetry<3>;
int determinant() const
Compute and return the determinant of the rotation matrix.
SpaceSymmetry< D >::Rotation inverseRotation() const
Compute and return the inverse of the rotation matrix.
FMatrix< int, D, D > Rotation
Typedef for matrix used to represent point group operation.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.