|
MiniTensor Version of the Day
|
Givens rotations, Cholesky, symmetric eigendecomposition, SVD, polar decompositions and condition numbers. More...
Functions | |
| template<typename T , Index N> | |
| KOKKOS_INLINE_FUNCTION void | minitensor::givens_left (T const &c, T const &s, Index i, Index k, Tensor< T, N > &A) |
| template<typename T , Index N> | |
| KOKKOS_INLINE_FUNCTION void | minitensor::givens_right (T const &c, T const &s, Index i, Index k, Tensor< T, N > &A) |
| template<typename T , Index N> | |
| std::pair< Vector< T, N >, Tensor< T, N > > | minitensor::sort_permutation (Vector< T, N > const &u) |
| template<typename T , Index N> | |
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > | minitensor::svd (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| KOKKOS_INLINE_FUNCTION Tensor< T, N > | minitensor::polar_rotation (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, Tensor< T, N > > | minitensor::polar_left (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, Tensor< T, N > > | minitensor::polar_right (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, Tensor< T, N > > | minitensor::polar_left_eig (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, Tensor< T, N > > | minitensor::polar_right_eig (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > | minitensor::polar_left_logV (Tensor< T, N > const &F) |
| template<typename T , Index N> | |
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > | minitensor::polar_left_logV_eig (Tensor< T, N > const &F) |
| template<typename T , Index N> | |
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > | minitensor::polar_left_logV_lame (Tensor< T, N > const &F) |
| template<typename T > | |
| std::pair< T, T > | minitensor::schur_sym (const T f, const T g, const T h) |
| template<typename T > | |
| std::pair< T, T > | minitensor::givens (T const &a, T const &b) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, Tensor< T, N > > | minitensor::eig_sym (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, Tensor< T, N > > | minitensor::eig_spd (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, Tensor< T, N > > | minitensor::eig_spd_cos (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| std::pair< Tensor< T, N >, bool > | minitensor::cholesky (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| T | minitensor::cond (Tensor< T, N > const &A) |
| template<typename T , Index N> | |
| T | minitensor::inv_cond (Tensor< T, N > const &A) |
Givens rotations, Cholesky, symmetric eigendecomposition, SVD, polar decompositions and condition numbers.
| KOKKOS_INLINE_FUNCTION void minitensor::givens_left | ( | T const & | c, |
| T const & | s, | ||
| Index | i, | ||
| Index | k, | ||
| Tensor< T, N > & | A | ||
| ) |
Apply Givens-Jacobi rotation on the left in place.
| c | cosine defining the rotation G in form [c, s; -s, c] |
| s | sine defining the rotation G in form [c, s; -s, c] |
| i | row index where the rotation is applied |
| k | column index where the rotation is applied |
| A | tensor to rotate |
Definition at line 261 of file MiniTensor_Factorizations.h.
| KOKKOS_INLINE_FUNCTION void minitensor::givens_right | ( | T const & | c, |
| T const & | s, | ||
| Index | i, | ||
| Index | k, | ||
| Tensor< T, N > & | A | ||
| ) |
Apply Givens-Jacobi rotation on the right in place.
| c | cosine defining the rotation G in form [c, s; -s, c] |
| s | sine defining the rotation G in form [c, s; -s, c] |
| i | row index where the rotation is applied |
| k | column index where the rotation is applied |
| A | tensor to rotate |
Definition at line 281 of file MiniTensor_Factorizations.h.
| std::pair< Vector< T, N >, Tensor< T, N > > minitensor::sort_permutation | ( | Vector< T, N > const & | u | ) |
Sort and index. Useful for ordering singular values and eigenvalues and corresponding vectors in the respective decompositions.
| u | vector to sort |
Definition at line 227 of file MiniTensor_Factorizations.h.
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > minitensor::svd | ( | Tensor< T, N > const & | A | ) |
Singular value decomposition (SVD)
Definition at line 546 of file MiniTensor_Factorizations.h.
| KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::polar_rotation | ( | Tensor< T, N > const & | A | ) |
Project to O(N) (Orthogonal Group) using a Newton-type algorithm. See Higham's Functions of Matrices p210 [2008]
| A | tensor (often a deformation-gradient-like tensor) |
Definition at line 606 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, Tensor< T, N > > minitensor::polar_left | ( | Tensor< T, N > const & | A | ) |
Left polar decomposition
| A | tensor (often a deformation-gradient-like tensor) |
Definition at line 688 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, Tensor< T, N > > minitensor::polar_right | ( | Tensor< T, N > const & | A | ) |
Right polar decomposition
| A | tensor (often a deformation-gradient-like tensor) |
Definition at line 704 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, Tensor< T, N > > minitensor::polar_left_eig | ( | Tensor< T, N > const & | A | ) |
Left polar decomposition computed with eigenvalue decomposition
| A | tensor (often a deformation-gradient-like tensor) |
Definition at line 720 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, Tensor< T, N > > minitensor::polar_right_eig | ( | Tensor< T, N > const & | A | ) |
R^3 right polar decomposition
| A | tensor (often a deformation-gradient-like tensor) |
Definition at line 780 of file MiniTensor_Factorizations.h.
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > minitensor::polar_left_logV | ( | Tensor< T, N > const & | F | ) |
Left polar decomposition with matrix logarithm for V
| F | tensor (often a deformation-gradient-like tensor) |
Definition at line 845 of file MiniTensor_Factorizations.h.
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > minitensor::polar_left_logV_eig | ( | Tensor< T, N > const & | F | ) |
R^N left polar decomposition with eigenvalue decomposition, returning also \( \log V \).
Definition at line 879 of file MiniTensor_Factorizations.h.
| std::tuple< Tensor< T, N >, Tensor< T, N >, Tensor< T, N > > minitensor::polar_left_logV_lame | ( | Tensor< T, N > const & | F | ) |
Left polar decomposition with matrix logarithm for V using eig_spd_cos
| F | tensor (often a deformation-gradient-like tensor) |
Definition at line 922 of file MiniTensor_Factorizations.h.
| std::pair< T, T > minitensor::schur_sym | ( | const T | f, |
| const T | g, | ||
| const T | h | ||
| ) |
Symmetric Schur algorithm for R^2.
| f | component of \( A = [f, g; g, h] \in S(2) \) |
| g | component of \( A = [f, g; g, h] \in S(2) \) |
| h | component of \( A = [f, g; g, h] \in S(2) \) |
Definition at line 970 of file MiniTensor_Factorizations.h.
| std::pair< T, T > minitensor::givens | ( | T const & | a, |
| T const & | b | ||
| ) |
Givens rotation. [c, -s; s, c] [a; b] = [r; 0]
Definition at line 994 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, Tensor< T, N > > minitensor::eig_sym | ( | Tensor< T, N > const & | A | ) |
Eigenvalue decomposition for symmetric 2nd-order tensor
Definition at line 1211 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, Tensor< T, N > > minitensor::eig_spd | ( | Tensor< T, N > const & | A | ) |
Eigenvalue decomposition for SPD 2nd-order tensor
Definition at line 1239 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, Tensor< T, N > > minitensor::eig_spd_cos | ( | Tensor< T, N > const & | A | ) |
Eigenvalue decomposition for SPD 2nd-order tensor
Definition at line 1249 of file MiniTensor_Factorizations.h.
| std::pair< Tensor< T, N >, bool > minitensor::cholesky | ( | Tensor< T, N > const & | A | ) |
Cholesky decomposition, rank-1 update algorithm (Matrix Computations 3rd ed., Golub & Van Loan, p145)
| A | assumed symmetric tensor |
Definition at line 1503 of file MiniTensor_Factorizations.h.
Condition number: ratio of largest to smalest singular values.
Definition at line 195 of file MiniTensor_Factorizations.h.
Reciprocal condition number: ratio of smallest to largest singular values.
Definition at line 210 of file MiniTensor_Factorizations.h.