matrix_module Module

Various matrix routines


Uses

  • module~~matrix_module~~UsesGraph module~matrix_module matrix_module module~kind_module kind_module module~matrix_module->module~kind_module module~numbers_module numbers_module module~matrix_module->module~numbers_module iso_fortran_env iso_fortran_env module~kind_module->iso_fortran_env module~numbers_module->module~kind_module

Used by

  • module~~matrix_module~~UsedByGraph module~matrix_module matrix_module module~fortran_astrodynamics_toolkit fortran_astrodynamics_toolkit module~fortran_astrodynamics_toolkit->module~matrix_module proc~compute_monodromy_matrix_eigenvalues halo_orbit_module::compute_monodromy_matrix_eigenvalues proc~compute_monodromy_matrix_eigenvalues->module~matrix_module

Functions

public pure recursive function matrix_determinant(n, a) result(det)

Matrix determinant of an matrix (recursive formulation).

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

size of a matrix

real(kind=wp), intent(in), dimension(n,n) :: a

the matrix

Return Value real(kind=wp)

the determinant of a matrix

public pure function matrix_cofactor(n, a) result(c)

Compute the cofactors matrix (the transpose of the adjugate matrix).

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

size of a matrix

real(kind=wp), intent(in), dimension(n,n) :: a

the matrix

Return Value real(kind=wp), dimension(n,n)

the cofactors of a matrix

public pure function matrix_trace(n, mat) result(trace)

Compute the matrix trace (sum of the diagonal elements).

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

size of the matrix

real(kind=wp), intent(in), dimension(n,n) :: mat

the matrix

Return Value real(kind=wp)

the matrix trace


Subroutines

public subroutine print_matrix(mat, unit)

Print a matrix to the console.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:,:) :: mat

the matrix to print

integer, intent(in), optional :: unit

unit number (assumed to be an open file). if not present, then the standard output is used.