Module ppm_module_util_eigen_2sym

This module provides the routines that compute Eigenvalues and Eigenvectors of symmetric 2x2 matrices.

Defined Types

name description

no types

Defined Module Interfaces

name description

ppm_util_eigen_2sym

Defined Module Subroutines

name description

no subroutines

Interface ppm_util_eigen_2sym

Subroutines contained in this interface:

name description

ppm_util_eigen_2sym_s

This routine computes the Eigenvalues and

ppm_util_eigen_2sym_d

This routine computes the Eigenvalues and

Subroutine ppm_util_eigen_2sym_d

This routine computes the Eigenvalues and orthonormal Eigenvectors of a symmetric, REAL 2x2 matrix.

[Note]Note

This routine uses explicit formulas for the coefficients of the characteristic polynomial and solves the resulting quadratic equation using the routine ppm_util_quadeq_real.

[Note]Note

This routine only handles symmetric matrices, since in this case, all Eigenvalues are REAL and all Eigenvectors are pairwise orthogonal.

[Tip]Tip

For ppm_debug > 1 the routine checks its own result. Maybe - after some time - this can be removed.

Arguments

name type dimension intent optional description

am

real array

(2,2)

(IN)

The 2x2 matrix stored in row-major order (i.e. first index is row

eval

real array

(2)

(OUT)

Eigenvectors. Evec(:,1) is the first vector (to Eval(1)),

evec

real array

(2,2)

(OUT)

Eigenvalues. Sorted with the largest value first.

info

integer

(OUT)

Return status, 0 on success

am

real array, (2,2), (IN)

The 2x2 matrix stored in row-major order (i.e. first index is row number, 2nd is column number).

eval

real array, (2), (OUT)

Eigenvectors. Evec(:,1) is the first vector (to Eval(1)), Evec(:,2) the second. Eigenvectors are orthogonal and normalized (i.e. of length one) when returned.

evec

real array, (2,2), (OUT)

Eigenvalues. Sorted with the largest value first.

info

integer, , (OUT)

Return status, 0 on success

Used Modules

ppm_module_data, ppm_module_error, ppm_module_substop, ppm_module_write, ppm_module_substart, ppm_module_util_quadeq_real

Subroutine ppm_util_eigen_2sym_s

This routine computes the Eigenvalues and orthonormal Eigenvectors of a symmetric, REAL 2x2 matrix.

[Note]Note

This routine uses explicit formulas for the coefficients of the characteristic polynomial and solves the resulting quadratic equation using the routine ppm_util_quadeq_real.

[Note]Note

This routine only handles symmetric matrices, since in this case, all Eigenvalues are REAL and all Eigenvectors are pairwise orthogonal.

[Tip]Tip

For ppm_debug > 1 the routine checks its own result. Maybe - after some time - this can be removed.

Arguments

name type dimension intent optional description

am

real array

(2,2)

(IN)

The 2x2 matrix stored in row-major order (i.e. first index is row

eval

real array

(2)

(OUT)

Eigenvectors. Evec(:,1) is the first vector (to Eval(1)),

evec

real array

(2,2)

(OUT)

Eigenvalues. Sorted with the largest value first.

info

integer

(OUT)

Return status, 0 on success

am

real array, (2,2), (IN)

The 2x2 matrix stored in row-major order (i.e. first index is row number, 2nd is column number).

eval

real array, (2), (OUT)

Eigenvectors. Evec(:,1) is the first vector (to Eval(1)), Evec(:,2) the second. Eigenvectors are orthogonal and normalized (i.e. of length one) when returned.

evec

real array, (2,2), (OUT)

Eigenvalues. Sorted with the largest value first.

info

integer, , (OUT)

Return status, 0 on success

Used Modules

ppm_module_data, ppm_module_error, ppm_module_substop, ppm_module_write, ppm_module_substart, ppm_module_util_quadeq_real

Defined Module Variables

name type dimension description

no variables

Used Modules

has no uses