Go to the source code of this file.
Functions | |
double | det (const dsymat2 &A) |
dsymat2 | inv (const dsymat2 &A) |
dsymat2 | rotate (const dsymat2 &m, const double &theta) |
double | det (const dsymat3 &A) |
dsymat3 | inv (const dsymat3 &A) |
dsymat3 | rotate (const dsymat3 &m, const dquater &q) |
double det | ( | const dsymat2 & | A | ) | [inline] |
calculate determinant
Definition at line 3 of file dsymatrix_small-specialized.hpp.
{VERBOSE_REPORT;
return A(0,0)*A(1,1) -A(1,0)*A(1,0);
}
dsymat2 inv | ( | const dsymat2 & | A | ) | [inline] |
calculate inverse
Definition at line 10 of file dsymatrix_small-specialized.hpp.
References det().
{VERBOSE_REPORT; const double Adet( det(A) ); dsymat2 Ainv; Ainv(0,0)= A(1,1)/Adet; Ainv(1,0)=-A(1,0)/Adet; Ainv(1,1)= A(0,0)/Adet; return Ainv; }
dsymat2 rotate | ( | const dsymat2 & | m, |
const double & | theta | ||
) | [inline] |
return 2x2 rotated tensor
Definition at line 21 of file dsymatrix_small-specialized.hpp.
{VERBOSE_REPORT; double c(cos(theta)), s(sin(theta)); double cc(c*c), cs(c*s), ss(s*s); dsymat2 mat; mat(0,0) =m(0,0)*cc -2.*m(1,0)*cs +m(1,1)*ss; mat(1,0) =m(1,0)*cc +(m(0,0)-m(1,1))*cs -m(1,0)*ss; mat(1,1) =m(1,1)*cc +2.*m(1,0)*cs +m(0,0)*ss; return mat; }
double det | ( | const dsymat3 & | A | ) | [inline] |
calculate determinant
Definition at line 44 of file dsymatrix_small-specialized.hpp.
{VERBOSE_REPORT;
return
+A(0,0)*A(1,1)*A(2,2) -A(0,0)*A(2,1)*A(2,1)
+A(1,0)*A(2,1)*A(2,0) -A(1,0)*A(1,0)*A(2,2)
+A(2,0)*A(1,0)*A(2,1) -A(2,0)*A(1,1)*A(2,0);
}
dsymat3 inv | ( | const dsymat3 & | A | ) | [inline] |
calculate inverse
Definition at line 54 of file dsymatrix_small-specialized.hpp.
References det().
{VERBOSE_REPORT; const double Adet( det(A) ); dsymat3 Ainv; Ainv(0,0) =(A(1,1)*A(2,2)-A(2,1)*A(2,1))/Adet; Ainv(1,0) =(A(2,1)*A(2,0)-A(1,0)*A(2,2))/Adet; Ainv(1,1) =(A(0,0)*A(2,2)-A(2,0)*A(2,0))/Adet; Ainv(2,0) =(A(1,0)*A(2,1)-A(1,1)*A(2,0))/Adet; Ainv(2,1) =(A(1,0)*A(2,0)-A(0,0)*A(2,1))/Adet; Ainv(2,2) =(A(0,0)*A(1,1)-A(1,0)*A(1,0))/Adet; return Ainv; }
dsymat3 rotate | ( | const dsymat3 & | m, |
const dquater & | q | ||
) | [inline] |
Definition at line 69 of file dsymatrix_small-specialized.hpp.