mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Davidson without diagonal option
This commit is contained in:
parent
2ef1e128e1
commit
66baf49ca6
@ -58,3 +58,8 @@ doc: Maximum number of determinants where |H| is fully diagonalized
|
|||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
default: 1000
|
default: 1000
|
||||||
|
|
||||||
|
[without_diagonal]
|
||||||
|
type: logical
|
||||||
|
doc: If |true|, don't use denominator
|
||||||
|
default: False
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
@ -447,14 +447,24 @@ subroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
|
|||||||
! Compute residual vector and davidson step
|
! Compute residual vector and davidson step
|
||||||
! -----------------------------------------
|
! -----------------------------------------
|
||||||
|
|
||||||
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i,k)
|
if (without_diagonal) then
|
||||||
do k=1,N_st_diag
|
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i,k)
|
||||||
do i=1,sze
|
do k=1,N_st_diag
|
||||||
U(i,k) = (lambda(k) * U(i,k) - W(i,k) ) &
|
do i=1,sze
|
||||||
/max(H_jj(i) - lambda (k),1.d-2)
|
U(i,k) = (lambda(k) * U(i,k) - W(i,k) ) &
|
||||||
|
/max(H_jj(i) - lambda (k),1.d-2)
|
||||||
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
!$OMP END PARALLEL DO
|
||||||
!$OMP END PARALLEL DO
|
else
|
||||||
|
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i,k)
|
||||||
|
do k=1,N_st_diag
|
||||||
|
do i=1,sze
|
||||||
|
U(i,k) = (lambda(k) * U(i,k) - W(i,k) )
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
!$OMP END PARALLEL DO
|
||||||
|
endif
|
||||||
|
|
||||||
do k=1,N_st
|
do k=1,N_st
|
||||||
residual_norm(k) = u_dot_u(U(1,k),sze)
|
residual_norm(k) = u_dot_u(U(1,k),sze)
|
||||||
|
Loading…
Reference in New Issue
Block a user