-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eigenvalues/eigenvectors for small matrix sizes #326
Comments
I think would this beneficial, even if I am more interested in the simpler solution to Would it to be responsibility of the user to assure the eigenvalue problem is consistent? (Meaning that I once wrote my own Broyden's method to solve a small system of 3 nonlinear equations. The iteration involved solving a 3x3 system of linear equation for the update vector which involves the Jacobian matrix. At the time I was still new to Fortran, and a procedure like this would have saved me some trouble. |
One could also use this as quick solver for the (real) roots of a third order polynomial. E.g. for the polynomial
Edit: just noticed this requires a non-symmetric eigenvalue solver. |
I feel like the answer should be yes, passing a general 4×4 matrix to a
Symmetric linear equations would be in-scope. So far I was using those routines to find principal axes for Cartesian geometries, which requires the eigenvectors of a 3×3 symmetric eigenvalue problem (preferably in |
Following your usage description, I see this can be used in (solid) mechanics to calculate the principal stresses and stress invariants. Given a displacement vector field (and its gradient), one could use this routine to compute the scalar von Mises stress. 👍 |
Addressed by #816 |
Sometimes I have need for calculating eigenvalues or eigenvectors for small symmetric matrices, usually 3×3, which feels a bit overkill to depend on LAPACK for such a project, especially given the complications of correctly linking tuned libraries like MKL.
For this purpose I implemented the analytical formula of the eigenvalues and an algorithm based on cross products to determine the eigenvectors as well and released the implemented to the public domain: https://github.com/awvwgk/diag3x3.
If there is interest I can contribute this version to stdlib. I'm using this in quite a few projects and also have some tests for the implementation rather than just the single file.
The text was updated successfully, but these errors were encountered: