10
1
mirror of https://github.com/pfloos/quack synced 2025-05-06 15:14:55 +02:00

changed DIIS extrapolation

This commit is contained in:
Loris Burth 2025-04-15 16:17:42 +02:00
parent 78dea2819a
commit 7e10d0a01d

View File

@ -45,15 +45,10 @@ subroutine complex_DIIS_extrapolation(rcond,n_err,n_e,n_diis,error,e,error_in,e_
b(1:n_diis) = cmplx(+0d0,0d0,kind=8)
b(n_diis+1) = cmplx(-1d0,0d0,kind=8)
! Solve linear system
! Solve linear system
call complex_linear_solve(n_diis+1,A,b,w,rcond)
! Check condition number
if (rcond < 1.0d-10) then
!write(*,*) "!!! DIIS system ill-conditioned: rcond = ", rcond, " - Skipping DIIS update !!!"
else
! Perform extrapolation only if the system is well-conditioned
e_inout(:) = matmul(w(1:n_diis),transpose(e(:,1:n_diis)))
end if
! Perform extrapolation only if the system is well-conditioned
e_inout(:) = matmul(w(1:n_diis),transpose(e(:,1:n_diis)))
! Extrapolate