ordschur Interface

public interface ordschur

Given the Schur factorization and basis of a matrix, reorders it to have the selected eigenvalues in the upper left block.

Description

This interface provides methods to re-order the Schur factorization of a real or complex square matrix. Note that, if is real, it returns the real Schur form.

Syntax

call ordschur(T, Q, selected)

Arguments

T: real or complex square array containing the Schur factorization of a matrix. On exit, it is overwritten with its re-ordered counterpart. It is an intent(inout) argument.

Q: Two-dimensional square array of the same size, type and kind as A. It contains the original Schur basis on entry and the re-ordered one on exit. It is an intent(inout) argument.

selected: logical rank-1 array selecting which eigenvalues need to be moved in the upper left block of the Schur factorization. It is an intent(in) arguement.


Module Procedures

private subroutine ordschur_rsp(T, Q, selected)

Re-order the Schur factorization from schur such that the selected eigenvalues are in the upper-left block.

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(inout) :: T(:,:)

Schur matrix to be re-ordered.

real(kind=sp), intent(inout) :: Q(:,:)

Schur vectors to be re-ordered.

logical, intent(in) :: selected(:)

Boolean array defining the selected eigenvalues.

private subroutine ordschur_rdp(T, Q, selected)

Re-order the Schur factorization from schur such that the selected eigenvalues are in the upper-left block.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: T(:,:)

Schur matrix to be re-ordered.

real(kind=dp), intent(inout) :: Q(:,:)

Schur vectors to be re-ordered.

logical, intent(in) :: selected(:)

Boolean array defining the selected eigenvalues.

private subroutine ordschur_csp(T, Q, selected)

Re-order the Schur factorization from schur such that the selected eigenvalues are in the upper-left block.

Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(inout) :: T(:,:)

Schur matrix to be re-ordered.

complex(kind=sp), intent(inout) :: Q(:,:)

Schur vectors to be re-ordered.

logical, intent(in) :: selected(:)

Boolean array defining the selected eigenvalues.

private subroutine ordschur_cdp(T, Q, selected)

Re-order the Schur factorization from schur such that the selected eigenvalues are in the upper-left block.

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(inout) :: T(:,:)

Schur matrix to be re-ordered.

complex(kind=dp), intent(inout) :: Q(:,:)

Schur vectors to be re-ordered.

logical, intent(in) :: selected(:)

Boolean array defining the selected eigenvalues.