Numerical diagonalization of 3x3 matrices
A common scientific problem is the numerical calculation of the eigensystem of symmetric or hermitian 3x3 matrices. If this calculation has to be performed many times, standard packages like LAPACK, the GNU Scientific Library, and the Numerical Recipes Library may not be the optimal choice because they are optimized mainly for large matrices.
This website offers C and FORTRAN implementations of several algorithms which were specifically optimized for 3x3 problems. All algorithms are discussed in detail in the following paper:Joachim Kopp
Efficient numerical diagonalization of hermitian 3x3 matrices
Int. J. Mod. Phys. C 19 (2008) 523-548
Download and Installation
All algorithms are released as C and FORTRAN code. The tarballs contain the respective source code including all dependencies and header files. You have the following download options:
The complete package (including Makefile to generate a shared library)
Algorithms for real symmetric matrices
Algorithms for complex hermitian matrices
This software cannot be used as a standalone program. Instead, it is intended to be used as a dynamically linked library, or copied directly into your own programs, as is fit for your purposes. Make sure that you also include all required header files and dependencies.
The C code follows the C99 standard, which includes the data type double complex to support complex numbers. For the GNU compiler this requires usage of the option -std=c99.
For optimum performance we recommend switching on all optimizations provided by your compiler. For the GNU compilers, this is done by the option -O3.
Bug reports / Contact
Although this software has been thoroughly tested, we cannot guarantee that it is free of bugs. Therefore, bug reports, comments, and suggestions are always welcome. If you want to contact the author, you can do so under the following email address:jkopp [at] fnal.gov
12 March 2012
|Last modified: 12 Mar 2012 04:55:26 CDT