45 real(dl),
dimension(:,:),
intent(inout) :: A
46 integer ,
intent(out) :: error_code
50 real(dl),
dimension(size(A,1)) :: work
51 integer ,
dimension(size(A,1)) :: ipiv
63 call dgetrf(n, n, a, n, ipiv, info)
67 write(*,*)
'Matrix is numerically singular!'
73 call dgetri(n, a, n, ipiv, work, n, info)
77 write(*,*)
'Matrix inversion failed!'
89 real(dl),
dimension(:,:),
intent(in) :: A
90 real(dl),
intent(out) :: det
91 integer ,
intent(out) :: error_code
93 integer :: N, i, info, AllocateStatus
95 integer ,
dimension(:),
allocatable :: ipiv
102 allocate( ipiv(n), stat = allocatestatus )
103 if (allocatestatus /= 0) stop
"matrix_determinant: allocation failed. Not enough memory."
109 call dgetrf(n, n, a, n, ipiv, info)
113 write(*,*)
'Matrix is numerically singular!'
143 real(dl),
dimension(:,:),
intent(in) :: A
144 real(dl),
dimension(:) ,
intent(out) :: eigenvalues
145 real(dl),
dimension(:,:),
intent(out) :: eigenvectors
146 integer ,
intent(out) :: error_code
152 stop
'matrix_eigenvalues_eigenvectors_sym not yet implemented.'
subroutine, public sym_matrix_inversion(A, error_code)
This subroutine computes the inverse of a square symmetric matrix by means of LAPACK LU decomposition...
subroutine, public matrix_determinant(A, det, error_code)
This subroutine computes the determinant of a matrix.
subroutine, public matrix_eigenvalues_eigenvectors_sym(A, eigenvalues, eigenvectors, error_code)
This subroutine computes the eigenvalues and eigenvectors of a matrix.
This module contains the subroutine and functions to manipulate and modify matrices.