mirror of https://gitlab.com/QEF/q-e.git
Revert: it looks like n=3 actually *is* the most common choice
LP git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4953 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
7478e02134
commit
947832c6d8
|
@ -36,15 +36,15 @@ subroutine invmat (n, a, a_inv, da)
|
|||
call DGETRI (n, a_inv, lda, ipiv, work, lwork, info)
|
||||
call errore ('invmat', 'error in DGETRI', abs (info) )
|
||||
!
|
||||
if (n /= 3) then
|
||||
da = 0.d0
|
||||
return
|
||||
else
|
||||
if (n == 3) then
|
||||
da = a(1,1)*(a(2,2)*a(3,3)-a(2,3)*a(3,2)) + &
|
||||
a(1,2)*(a(2,3)*a(3,1)-a(2,1)*a(3,3)) + &
|
||||
a(1,3)*(a(2,1)*a(3,2)-a(3,1)*a(2,2))
|
||||
IF (ABS(da) < 1.d-10) CALL errore(' invmat ',' singular matrix ', 1)
|
||||
else
|
||||
da = 0.d0
|
||||
end if
|
||||
|
||||
return
|
||||
end subroutine invmat
|
||||
|
||||
|
|
Loading…
Reference in New Issue