Skip to content

ENH: improve analytic eigen for small off-diagonals

Kutalmış Berçin requested to merge feature-analytic-eigen-small-offdiag into develop

WIP for Clang9 scratch-compilation.

Summary

The analytic eigendecomposition methods were further improved and tested for small off-diagonal entries.

Numerical diagonalisation of 2x2 or 3x3 matrices with analytic methods are, like the methods currently being used in OpenFOAM, inherently error prone. Despite its speed, the analytic methods may becomes inaccurate or may even fail completely if the matrix entries differ greatly in magnitude, particularly with large off-diagonal elements.

Accordingly, there will always be a combination of value-set that the considerably improved eigendecomposition suite will fail.

The remedy is to sacrifice the speed by using iterative methods (like LAPACK, GNU-Sci, MATLAB, NumPy etc. etc. no matter what the size of matrix is), or hybrid analytic/iterative methods like the publication below: (Kopp, 2008) arXiv.org: physics/0610206 https://www.mpi-hd.mpg.de/personalhomes/globes/3x3/index.htm

Might to consider to look for funding to incorporate such slow-yet-more-stable methods for small eigendecompositions.

Otherwise, we will need to live with it, I'm afraid, by covering the corner cases as they appear in the course of time.

Caveats

  • Will always be a value-set combination for eigendecompositions will fail
  • Single- or mixed-precision computation of eigendecompositions will likely and noisily fail as double-precision computation was the only intention

Tests

Clang9 = PASS: log.linux64ClangDPInt32Opt.gz with HEAD~1 = a456e9ae92 - (origin/develop, develop)

Alltest-TUT = PASS: testLoopReport.gz

The logs of the below were not attached due to their sizes, yet the return log was given.

Test-SymmTensor = PASS: #### Passed all 10010170 tests ####

Test-SymmTensor2D = PASS: #### Passed all 1260123 tests ####

Test-Tensor = PASS: #### Passed all 8030254 tests ####

Test-Tensor2D = PASS: #### Passed all 4380204 tests ####

Edited by Kutalmış Berçin

Merge request reports