mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 19:43:32 +01:00
remove error, replace symmetry condition
This commit is contained in:
parent
0f9b2dbfe4
commit
17add36bda
@ -1835,13 +1835,21 @@ subroutine restore_symmetry_fast(m,n,A,LDA,thresh)
|
||||
! Sort
|
||||
call dsort(copy,key,sze)
|
||||
|
||||
! Symmetrize
|
||||
!TODO
|
||||
! Parallelization with OMP
|
||||
|
||||
! Jump all the elements below thresh
|
||||
i = 1
|
||||
do while (copy(i) <= thresh)
|
||||
i = i + 1
|
||||
enddo
|
||||
|
||||
! Symmetrize
|
||||
do while(i < sze)
|
||||
pi = i
|
||||
pf = i
|
||||
val = copy(i)
|
||||
do while (dabs(val - copy(pf+1)) < thresh2)
|
||||
val = 1d0/copy(i)
|
||||
do while (dabs(val * copy(pf+1) - 1d0) < thresh2)
|
||||
pf = pf + 1
|
||||
! if pf == sze, copy(pf+1) will not be valid
|
||||
if (pf == sze) then
|
||||
|
Loading…
Reference in New Issue
Block a user