1 New TFEL/Math features

1.1 tiny matrices product

The product of two tiny matrices has been implemented:

const auto m1 = tmatrix<2u, 2u, int>{0, 1,  //
                                     2, 3};
const auto m2 = tmatrix<2u, 2u, int>{4, -1,  //
                                     5, 2};
const auto m3 = m1 * m2;

1.2 Symmetric tensor eigen values and eigen vectors

1.2.1 New eigen solvers

New eigen solver based on Harari analytical solution have been introduced for symmetric tensors. The computation of eigen values is done with Harari’s algorithm [1] and the computation of eigen vectors is done with the default eigen solver for symmetric tensors of TFEL. Such computations are more efficient and more accurate than the default TFEL algorithm.

Those algorithms are available in 3D. For 2D symmetric tensors, we fall back to some default algorithm as described below.

Table 1: List of available eigen solvers.
Name Algorithm in 3D Algorithm in 2D
TFELEIGENSOLVER Analytical (TFEL) Analytical (TFEL)
FSESJACOBIEIGENSOLVER Jacobi Analytical (FSES)
FSESQLEIGENSOLVER QL with implicit shifts Analytical (FSES)
FSESCUPPENEIGENSOLVER Cuppen’s Divide & Conquer Analytical (FSES)
FSESANALYTICALEIGENSOLVER Analytical Analytical (FSES)
FSESHYBRIDEIGENSOLVER Hybrid Analytical (FSES)
GTESYMMETRICQREIGENSOLVER Symmetric QR Analytical (TFEL)
HARARIEIGENSOLVER Analytical (Harari) Analytical (TFEL)

The various eigen solvers available are enumerated in Table 1.

The eigen solver is passed as a template argument of the computeEigenValues or the computeEigenVectors methods as illustrated in the code below:

tmatrix<3u,3u,real> m2;
tvector<3u,real>    vp2;
std::tie(vp,m)=s.computeEigenVectors<stensor::HARARIEIGENSOLVER>();

1.2.1.1 Some benchmarks

Table 2: Test on \(10^{6}\) random symmetric tensors in single precision (float).
Algorithm Failure ratio \(\Delta_{\infty}\) Times (ns) Time ratio
TFELEIGENSOLVER 0.000557 2.37e-05 129452335 1
GTESYMMETRICQREIGENSOLVER 0 9.57e-07 236544828 1.83
FSESJACOBIEIGENSOLVER 0 4.61e-07 241131631 1.86
FSESQLEIGENSOLVER 0.000173 1.67e-06 155435496 1.20
FSESCUPPENEIGENSOLVER 0.018223 2.87e-06 151727321 1.17
FSESHYBRIDEIGENSOLVER 0.068411 3.90e-03 80039266 0.62
FSESANALYTICALEIGENSOLVER 0.102626 6.21e-02 76865961 0.59
HARARIEIGENSOLVER 0.000018 2.46e-06 110028802 0.85
Table 3: Test on \(10^{6}\) random symmetric tensors in double precision (double).
Algorithm Failure ratio \(\Delta_{\infty}\) Times (ns) Time ratio
TFELEIGENSOLVER 0.00058 6.94e-14 137752068 1
GTESYMMETRICQREIGENSOLVER 1e-06 2.30e-15 315593552 2.29
FSESJACOBIEIGENSOLVER 0 9.08e-16 256285090 1.86
FSESQLEIGENSOLVER 0.000202 3.04e-15 214537012 1.56
FSESCUPPENEIGENSOLVER 0.019251 5.58e-15 219113965 1.59
FSESHYBRIDEIGENSOLVER 0.081586 1.29e-10 81861668 0.59
FSESANALYTICALEIGENSOLVER 0.103935 4.11e-10 79701256 0.58
HARARIEIGENSOLVER 0.000037 2.27e-14 116977683 0.85
Table 4: Test on \(10^{6}\) random symmetric tensors in extended precision (long double).
Algorithm Failure ratio \(\Delta_{\infty}\) Times (ns) Time ratio
TFELEIGENSOLVER 0.000578 1.76e-17 304165023 1
GTESYMMETRICQREIGENSOLVER 0 1.01e-18 558605772 1.84
FSESJACOBIEIGENSOLVER 0 5.11e-19 408584703 1.34
FSESQLEIGENSOLVER 0.00045 1.83e-18 311028180 1.02
FSESCUPPENEIGENSOLVER 0.009134 3.23e-18 485590150 1.60
FSESHYBRIDEIGENSOLVER 0.99959 4.01e-10 187308886 0.62
FSESANALYTICALEIGENSOLVER 0.999669 1.36e-11 211710377 0.70
HARARIEIGENSOLVER 0.000046 4.62e-18 338589049 1.11

We have compared the available algorithm on \(10^{6}\) random symmetric tensors whose components are in \([-1:1]\).

For a given symmetric tensor, we consider that the computation of the eigenvalues and eigenvectors failed if: \[ \Delta_{\infty}=\max_{i\in[1,2,3]}\left\|\tenseur{s}\,\cdot\,\vec{v}_{i}-\lambda_{i}\,\vec{v}_{i}\right\|>10\,\varepsilon \] where \(\varepsilon\) is the accuracy of the floatting point considered.

The results of those tests are reported on Tables 2, 3 and 4:

2 Issues fixed

2.1 Issue 526: The @UseQt keyword is not mentioned in the MaterialLaw’s keywords help page

For more details, see https://github.com/thelfer/tfel/issues/526

1.
Harari, Isaac and Albocher, Uri. Computation of eigenvalues of a real, symmetric 3 x 3 matrix with particular reference to the pernicious case of two nearly equal eigenvalues. International Journal for Numerical Methods in Engineering. 2023. Vol. 124, no. 5, p. 1089–1110. DOI https://doi.org/10.1002/nme.7153. Available from: https://onlinelibrary.wiley.com/doi/abs/10.1002/nme.7153