Eigen decomposition of a square matrix. More...
Public Member Functions | |
| eigendecomposition (const scalarSquareMatrix &A) | |
| Construct the eigen decomposition of matrix A. More... | |
| const scalarField & | d () const |
| Return the real part of the eigenvalues. More... | |
| const scalarField & | e () const |
| Return the imaginary part of the eigenvalues. More... | |
| void | D (scalarSquareMatrix &D) const |
| Return the block diagonal eigenvalue matrix in D. More... | |
| const scalarSquareMatrix & | V () const |
| Return the eigenvector matrix. More... | |
Eigen decomposition of a square matrix.
Calculates the eigenvalues and eigenvectors of a square scalar matrix matrix.
If the matrix
is symmetric, then
where the eigenvalue matrix
is diagonal and the eigenvector matrix
is orthogonal. That is, the diagonal values of
are the eigenvalues, and
, where
is the identity matrix. The columns of V represent the eigenvectors in the sense that
.
If
is not symmetric, then the eigenvalue matrix
is block diagonal with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues,
, in 2-by-2 blocks,
. That is, if the complex eigenvalues look like
u + iv . . . . .
. u - iv . . . .
. . a + ib . . .
. . . a - ib . .
. . . . x .
. . . . . y
then
looks like
u v . . . .
-v u . . . .
. . a b . .
. . -b a . .
. . . . x .
. . . . . y
This keeps
a real matrix in both symmetric and non-symmetric cases, and
.
The matrix
may be badly conditioned, or even singular, so the validity of the equation
depends upon the condition number of
.
Adapted from the TNT C++ implementation (http://math.nist.gov/tnt) of the JAMA Java implementation (http://math.nist.gov/javanumerics/jama) of the algorithms in:
Wilkinson, J. H., & Reinsch, C. (1971).
Handbook for Automatic Computation: Volume II:
Linear Algebra (Vol. 186). Springer-Verlag.
Definition at line 95 of file eigendecomposition.H.
| eigendecomposition | ( | const scalarSquareMatrix & | A | ) |
Construct the eigen decomposition of matrix A.
Definition at line 1050 of file eigendecomposition.C.
References Foam::saturationModels::A, n, and List< T >::setSize().

|
inline |
Return the real part of the eigenvalues.
Definition at line 157 of file eigendecomposition.H.
|
inline |
Return the imaginary part of the eigenvalues.
Definition at line 163 of file eigendecomposition.H.
| void D | ( | scalarSquareMatrix & | D | ) | const |
Return the block diagonal eigenvalue matrix in D.
Definition at line 1107 of file eigendecomposition.C.
References n, and SquareMatrix< Type >::setSize().

|
inline |
Return the eigenvector matrix.
Definition at line 172 of file eigendecomposition.H.