OpenWalnut
1.4.0
|
Test class for some tensor functions. More...
#include <WTensorFunctions_test.h>
Public Member Functions | |
void | testSpecialSymMatrixEigenvalueTestCaseNumericalStability (void) |
The eigenvalue of the symmetrical matrix: 0.000179516, 2.09569e-05, 2.76557e-06, 0.000170189, -5.52619e-07, 0.00015239 (0.000196397;0.000155074;0.000150625) | |
void | testJacobiEigenvectors () |
Test the jacobi eigenvector calculation. | |
void | testCardanoEigenvalues () |
Test the cardano eigenvalue calculation. | |
void | testLogAndExp () |
Test if tensor log and exp functions behave correctly. | |
Private Member Functions | |
template<std::size_t dim, typename Data_T > | |
WTensorSym< 2, dim, Data_T > | similarity_rotate_givens (WTensorSym< 2, dim, Data_T > const &m, std::size_t i, std::size_t j, double angle) |
A helper function performing a similarity transform using a givens rotation. | |
template<std::size_t dim, typename Data_T > | |
void | compare_results (WTensorSym< 2, dim, Data_T > const &m, RealEigenSystem const &sys) |
Test if the given vectors are eigenvectors to the given eigenvalues of a symmetric matrix. |
Test class for some tensor functions.
Definition at line 42 of file WTensorFunctions_test.h.
void WTensorFunctionsTest::compare_results | ( | WTensorSym< 2, dim, Data_T > const & | m, |
RealEigenSystem const & | sys | ||
) | [inline, private] |
Test if the given vectors are eigenvectors to the given eigenvalues of a symmetric matrix.
m | A symmetric matrix. |
sys | The eigen system ( eigenvalues and eigenvectors ) |
Definition at line 552 of file WTensorFunctions_test.h.
Referenced by testJacobiEigenvectors().
WTensorSym< 2, dim, Data_T > WTensorFunctionsTest::similarity_rotate_givens | ( | WTensorSym< 2, dim, Data_T > const & | m, |
std::size_t | i, | ||
std::size_t | j, | ||
double | angle | ||
) | [inline, private] |
A helper function performing a similarity transform using a givens rotation.
m | The symmetric tensor to transform. |
i | A row index. |
j | A column index. |
angle | The rotation angle (in radians). |
Definition at line 506 of file WTensorFunctions_test.h.
Referenced by testCardanoEigenvalues(), and testJacobiEigenvectors().
void WTensorFunctionsTest::testCardanoEigenvalues | ( | ) | [inline] |
Test the cardano eigenvalue calculation.
Definition at line 307 of file WTensorFunctions_test.h.
References similarity_rotate_givens().
void WTensorFunctionsTest::testJacobiEigenvectors | ( | ) | [inline] |
Test the jacobi eigenvector calculation.
Definition at line 70 of file WTensorFunctions_test.h.
References compare_results(), and similarity_rotate_givens().
void WTensorFunctionsTest::testLogAndExp | ( | ) | [inline] |
Test if tensor log and exp functions behave correctly.
Definition at line 471 of file WTensorFunctions_test.h.
void WTensorFunctionsTest::testSpecialSymMatrixEigenvalueTestCaseNumericalStability | ( | void | ) | [inline] |
The eigenvalue of the symmetrical matrix: 0.000179516, 2.09569e-05, 2.76557e-06, 0.000170189, -5.52619e-07, 0.00015239 (0.000196397;0.000155074;0.000150625)
Definition at line 50 of file WTensorFunctions_test.h.