mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 12:55:37 +01:00
moved the block diagonalization in utils/block_diag_degen.irp.f
This commit is contained in:
parent
861f0f9461
commit
39d770686f
@ -75,7 +75,6 @@ subroutine diagonalize_dm_per_fock_degen(fock_diag,mat_ref,n,thr_deg,leigvec,rei
|
|||||||
list_same_degen(icount) = list_degen(index_degen,m)
|
list_same_degen(icount) = list_degen(index_degen,m)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
print*,'icount = ',icount
|
|
||||||
print*,'list of elements '
|
print*,'list of elements '
|
||||||
do icount = 1, size_mat
|
do icount = 1, size_mat
|
||||||
print*,icount,list_same_degen(icount)
|
print*,icount,list_same_degen(icount)
|
||||||
@ -103,18 +102,20 @@ subroutine diagonalize_dm_per_fock_degen(fock_diag,mat_ref,n,thr_deg,leigvec,rei
|
|||||||
deallocate(mat_tmp,list_same_degen)
|
deallocate(mat_tmp,list_same_degen)
|
||||||
deallocate(eigval_tmp,leigvec_tmp,reigvec_tmp)
|
deallocate(eigval_tmp,leigvec_tmp,reigvec_tmp)
|
||||||
enddo
|
enddo
|
||||||
|
if(icount.ne.n)then
|
||||||
|
print*,'pb !! (icount.ne.n)'
|
||||||
print*,'icount,n',icount,n
|
print*,'icount,n',icount,n
|
||||||
|
stop
|
||||||
|
endif
|
||||||
|
|
||||||
deallocate(iorder)
|
deallocate(iorder)
|
||||||
allocate(iorder(n))
|
allocate(iorder(n))
|
||||||
print*,'before sort '
|
|
||||||
do i = 1, n
|
do i = 1, n
|
||||||
print*,'i,eigval(i) = ',i,eigval_unsrtd(i)
|
|
||||||
iorder(i) = i
|
iorder(i) = i
|
||||||
enddo
|
enddo
|
||||||
call dsort(eigval_unsrtd,iorder,n)
|
call dsort(eigval_unsrtd,iorder,n)
|
||||||
print*,'after sort '
|
|
||||||
do i = 1, n
|
do i = 1, n
|
||||||
|
print*,'sorted eigenvalues '
|
||||||
i_good = iorder(i)
|
i_good = iorder(i)
|
||||||
eigval(i) = eigval_unsrtd(i)
|
eigval(i) = eigval_unsrtd(i)
|
||||||
print*,'i,eigval(i) = ',i,eigval(i)
|
print*,'i,eigval(i) = ',i,eigval(i)
|
||||||
@ -157,7 +158,6 @@ subroutine give_degen_full_list(A,n,thr,list_degen,n_degen_list)
|
|||||||
icount = 1
|
icount = 1
|
||||||
do j = i+1, n
|
do j = i+1, n
|
||||||
if(dabs(A(i)-A(j)).lt.thr.and.is_ok(j))then
|
if(dabs(A(i)-A(j)).lt.thr.and.is_ok(j))then
|
||||||
! print*,A(i),A(j)
|
|
||||||
is_ok(j) = .False.
|
is_ok(j) = .False.
|
||||||
icount += 1
|
icount += 1
|
||||||
list_degen(n_degen_list,icount) = j
|
list_degen(n_degen_list,icount) = j
|
Loading…
Reference in New Issue
Block a user