eigendecomposition Class Reference

Eigen decomposition of a square matrix. More...

Public Member Functions

 eigendecomposition (const scalarSquareMatrix &A)
 Construct the eigen decomposition of matrix A. More...
 
const scalarFieldd () const
 Return the real part of the eigenvalues. More...
 
const scalarFielde () const
 Return the imaginary part of the eigenvalues. More...
 
void D (scalarSquareMatrix &D) const
 Return the block diagonal eigenvalue matrix in D. More...
 
const scalarSquareMatrixV () const
 Return the eigenvector matrix. More...
 

Detailed Description

Eigen decomposition of a square matrix.

Calculates the eigenvalues and eigenvectors of a square scalar matrix matrix.

If the matrix $ A $ is symmetric, then $ A = VDV^-1 $ where the eigenvalue matrix $ D $ is diagonal and the eigenvector matrix $ V $ is orthogonal. That is, the diagonal values of $ D $ are the eigenvalues, and $ VV^-1 = I $, where $ I $ is the identity matrix. The columns of V represent the eigenvectors in the sense that $ AV = VD $.

If $ A $ is not symmetric, then the eigenvalue matrix $ D $ is block diagonal with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, $ a + ib $, in 2-by-2 blocks, $ [a, b; -b, a] $. That is, if the complex eigenvalues look like

      u + iv     .        .          .      .    .
        .      u - iv     .          .      .    .
        .        .      a + ib       .      .    .
        .        .        .        a - ib   .    .
        .        .        .          .      x    .
        .        .        .          .      .    y

then $ D $ looks like

        u        v        .          .      .    .
       -v        u        .          .      .    .
        .        .        a          b      .    .
        .        .       -b          a      .    .
        .        .        .          .      x    .
        .        .        .          .      .    y

This keeps $ V $ a real matrix in both symmetric and non-symmetric cases, and $ AV = VD $.

The matrix $ V $ may be badly conditioned, or even singular, so the validity of the equation $ A = VDV^-1 $ depends upon the condition number of $ V $.

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.
Source files

Definition at line 95 of file eigendecomposition.H.

Constructor & Destructor Documentation

◆ eigendecomposition()

Construct the eigen decomposition of matrix A.

Definition at line 1050 of file eigendecomposition.C.

References Foam::saturationModels::A, n, and List< T >::setSize().

Here is the call graph for this function:

Member Function Documentation

◆ d()

const scalarField& d ( ) const
inline

Return the real part of the eigenvalues.

Definition at line 157 of file eigendecomposition.H.

◆ e()

const scalarField& e ( ) const
inline

Return the imaginary part of the eigenvalues.

Definition at line 163 of file eigendecomposition.H.

◆ D()

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().

Here is the call graph for this function:

◆ V()

const scalarSquareMatrix& V ( ) const
inline

Return the eigenvector matrix.

Definition at line 172 of file eigendecomposition.H.


The documentation for this class was generated from the following files: