## Module ppm_module_util_eigen_2sym

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

name description

no types

### Defined Module Interfaces

name description

ppm_util_eigen_2sym

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 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 This routine only handles symmetric matrices, since in this case, all Eigenvalues are REAL and all Eigenvectors are pairwise orthogonal.
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

### Subroutine ppm_util_eigen_2sym_s

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

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 This routine only handles symmetric matrices, since in this case, all Eigenvalues are REAL and all Eigenvectors are pairwise orthogonal.
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

### Defined Module Variables

name type dimension description

no variables

has no uses