2020-04-10 16:22:27 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @brief Fortran interfaces for LAPACK routines
|
|
|
|
!> @details https://www.netlib.org/lapack/
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
module LAPACK_interface
|
|
|
|
interface
|
|
|
|
|
2021-12-29 11:39:52 +05:30
|
|
|
pure subroutine dgeev(jobvl,jobvr,n,a,lda,wr,wi,vl,ldvl,vr,ldvr,work,lwork,info)
|
2020-04-10 16:22:27 +05:30
|
|
|
use prec
|
2022-06-22 02:16:54 +05:30
|
|
|
implicit none(type,external)
|
2022-05-28 02:04:33 +05:30
|
|
|
|
2020-04-10 16:22:27 +05:30
|
|
|
character, intent(in) :: jobvl,jobvr
|
|
|
|
integer, intent(in) :: n,lda,ldvl,ldvr,lwork
|
|
|
|
real(pReal), intent(inout), dimension(lda,n) :: a
|
|
|
|
real(pReal), intent(out), dimension(n) :: wr,wi
|
|
|
|
real(pReal), intent(out), dimension(ldvl,n) :: vl
|
|
|
|
real(pReal), intent(out), dimension(ldvr,n) :: vr
|
|
|
|
real(pReal), intent(out), dimension(max(1,lwork)) :: work
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine dgeev
|
|
|
|
|
2021-12-29 11:39:52 +05:30
|
|
|
pure subroutine dgesv(n,nrhs,a,lda,ipiv,b,ldb,info)
|
2020-04-10 16:22:27 +05:30
|
|
|
use prec
|
2022-06-22 02:16:54 +05:30
|
|
|
implicit none(type,external)
|
2022-05-28 02:04:33 +05:30
|
|
|
|
2020-04-10 16:22:27 +05:30
|
|
|
integer, intent(in) :: n,nrhs,lda,ldb
|
|
|
|
real(pReal), intent(inout), dimension(lda,n) :: a
|
|
|
|
integer, intent(out), dimension(n) :: ipiv
|
2021-12-29 11:30:28 +05:30
|
|
|
real(pReal), intent(inout), dimension(ldb,nrhs) :: b
|
2020-04-10 16:22:27 +05:30
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine dgesv
|
|
|
|
|
2021-12-29 11:39:52 +05:30
|
|
|
pure subroutine dgetrf(m,n,a,lda,ipiv,info)
|
2020-04-10 16:22:27 +05:30
|
|
|
use prec
|
2022-06-22 02:16:54 +05:30
|
|
|
implicit none(type,external)
|
2022-05-28 02:04:33 +05:30
|
|
|
|
2020-04-10 16:22:27 +05:30
|
|
|
integer, intent(in) :: m,n,lda
|
|
|
|
real(pReal), intent(inout), dimension(lda,n) :: a
|
|
|
|
integer, intent(out), dimension(min(m,n)) :: ipiv
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine dgetrf
|
|
|
|
|
2021-12-29 11:39:52 +05:30
|
|
|
pure subroutine dgetri(n,a,lda,ipiv,work,lwork,info)
|
2020-04-10 16:22:27 +05:30
|
|
|
use prec
|
2022-06-22 02:16:54 +05:30
|
|
|
implicit none(type,external)
|
2022-05-28 02:04:33 +05:30
|
|
|
|
2020-04-10 16:22:27 +05:30
|
|
|
integer, intent(in) :: n,lda,lwork
|
|
|
|
real(pReal), intent(inout), dimension(lda,n) :: a
|
2021-12-29 11:30:28 +05:30
|
|
|
integer, intent(in), dimension(n) :: ipiv
|
2020-04-10 16:22:27 +05:30
|
|
|
real(pReal), intent(out), dimension(max(1,lwork)) :: work
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine dgetri
|
|
|
|
|
2021-12-29 11:39:52 +05:30
|
|
|
pure subroutine dsyev(jobz,uplo,n,a,lda,w,work,lwork,info)
|
2020-04-10 16:22:27 +05:30
|
|
|
use prec
|
2022-06-22 02:16:54 +05:30
|
|
|
implicit none(type,external)
|
2022-05-28 02:04:33 +05:30
|
|
|
|
2020-04-10 16:22:27 +05:30
|
|
|
character, intent(in) :: jobz,uplo
|
|
|
|
integer, intent(in) :: n,lda,lwork
|
|
|
|
real(pReal), intent(inout), dimension(lda,n) :: a
|
|
|
|
real(pReal), intent(out), dimension(n) :: w
|
|
|
|
real(pReal), intent(out), dimension(max(1,lwork)) :: work
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine dsyev
|
|
|
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
end module LAPACK_interface
|