The Elk Code
 
Loading...
Searching...
No Matches
rminv.f90
Go to the documentation of this file.
1
2! Copyright (C) 2019 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine rminv(n,a)
7implicit none
8! arguments
9integer, intent(in) :: n
10real(8), intent(inout) :: a(n,n)
11! local variables
12integer info
13! automatic arrays
14integer ipiv(n)
15real(8) work(n)
16call dgetrf(n,n,a,n,ipiv,info)
17if (info /= 0) then
18 write(*,*)
19 write(*,'("Error(rminv): unable to invert matrix")')
20 write(*,'(" DGETRF returned INFO = ",I8)') info
21 write(*,*)
22 stop
23end if
24call dgetri(n,a,n,ipiv,work,n,info)
25if (info /= 0) then
26 write(*,*)
27 write(*,'("Error(rminv): unable to invert matrix")')
28 write(*,'(" DGETRI returned INFO = ",I8)') info
29 write(*,*)
30 stop
31end if
32end subroutine
33
subroutine rminv(n, a)
Definition rminv.f90:7