NLESC-JCER / Fortran_Davidson

Davidson eigensolver implemented in Fortran
Apache License 2.0
16 stars 4 forks source link

removed unused ritz_vectors and optimize DPR_free #35

Closed felipeZ closed 4 years ago

felipeZ commented 4 years ago

fixed #34

lopeztarifa commented 4 years ago

Thanks @felipeZ!

The only thing missed is passing/using the residues in the correction vectors:

This is how it is implemented in Champ:

correction= compute_DPR( rs, parameters, eigenvalues_sub, diag_mtx, diag_stx)

Then in the compute_DPR function:

    diag = 0.0_dp
    do j = 1, parameters%basis_size 
     diag= eye( m , m, eigenvalues( j))
     correction( :, j)= rs( :, j) 

     do ii= 1, size( correction, 1)
       correction( ii, j)= correction( ii, j)/( eigenvalues( j)* diag_stx( ii)- diag_mtx( ii))
     end do

    end do