29 cout <<
"DEBUG UnitCell::skew_matrix: Calculating the fractionalization matrix" << endl;
42 double sterm = sqrt(1.0 - cterm*cterm);
46 skew[0][2] = -(cos(
gamma())*sin(
beta())*cterm+
49 skew[1][1] = 1.0/(sin(
gamma())*
b());
50 skew[1][2] = cterm/(sterm*sin(
gamma())*
b());
51 skew[2][2] = 1.0/(sin(
beta())*sterm*
c());
53 for (
size_t i=0; i<3; i++ )
54 for (
size_t j=0; j<3; j++ )
55 if ( skew[i][j] < 1e-6 ) skew[i][j] = 0;
58 cout <<
"DEBUG UnitCell::skew_matrix: Fractionalization matrix: " << endl;
70 mat[0][0] = skew[0][0]*
a();
71 mat[0][1] = skew[0][1]*
a();
72 mat[0][2] = skew[0][2]*
a();
73 mat[1][1] = skew[1][1]*
b();
74 mat[1][2] = skew[1][2]*
b();
75 mat[2][2] = skew[2][2]*
c();
78 mat[0][0] = 1/mat[0][0];
79 mat[1][1] = 1/mat[1][1];
80 mat[2][2] = 1/mat[2][2];
81 mat[0][1] = -mat[0][1]*mat[0][0]*mat[1][1];
82 mat[1][2] = -mat[1][2]*mat[1][1]*mat[2][2];
83 mat[0][2] = mat[0][1]*mat[1][2]/mat[1][1] - mat[0][0]*mat[2][2]*mat[0][2];