9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-13 07:03:29 +01:00

CSF-based davidson as an option0

This commit is contained in:
Anthony Scemama 2021-06-16 09:49:53 +02:00
parent b636fbfee9
commit 3a71cf0dc6
4 changed files with 10 additions and 6 deletions

View File

@ -34,6 +34,12 @@ doc: If |true|, a memory-mapped file may be used to store the W and S2 vectors i
default: True
interface: ezfio,provider,ocaml
[csf_based]
type: logical
doc: If |true|, use the CSF-based algorithm
default: False
interface: ezfio,provider,ocaml
[distributed_davidson]
type: logical
doc: If |true|, use the distributed algorithm

View File

@ -56,9 +56,7 @@ END_PROVIDER
enddo
enddo
! Deactivated temporarily: bug in N_csf
! do_csf = s2_eig .and. only_expected_s2 .and. (expected_s2 == 0.d0)
do_csf = .False.
do_csf = s2_eig .and. only_expected_s2 .and. csf_based
if (diag_algorithm == "Davidson") then

View File

@ -46,7 +46,7 @@ subroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
do i=1,N_st
norm = u_dot_u(u_0(1,i),n)
if (norm /= 0.d0) then
e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),n)
e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),n) / dsqrt(norm)
else
e_0(i) = 0.d0
endif

View File

@ -75,8 +75,8 @@ subroutine u_0_HS2_u_0(e_0,s_0,u_0,n,keys_tmp,Nint,N_st,sze)
do i=1,N_st
norm = u_dot_u(u_0(1,i),n)
if (norm /= 0.d0) then
e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),n)
s_0(i) = u_dot_v(s_vec(1,i),u_0(1,i),n)
e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),n)/norm
s_0(i) = u_dot_v(s_vec(1,i),u_0(1,i),n)/norm
else
e_0(i) = 0.d0
s_0(i) = 0.d0