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
|
! Sort
|
||||||
call dsort(copy,key,sze)
|
call dsort(copy,key,sze)
|
||||||
|
|
||||||
|
!TODO
|
||||||
|
! Parallelization with OMP
|
||||||
|
|
||||||
|
! Jump all the elements below thresh
|
||||||
|
i = 1
|
||||||
|
do while (copy(i) <= thresh)
|
||||||
|
i = i + 1
|
||||||
|
enddo
|
||||||
|
|
||||||
! Symmetrize
|
! Symmetrize
|
||||||
i = 1
|
|
||||||
do while(i < sze)
|
do while(i < sze)
|
||||||
pi = i
|
pi = i
|
||||||
pf = i
|
pf = i
|
||||||
val = copy(i)
|
val = 1d0/copy(i)
|
||||||
do while (dabs(val - copy(pf+1)) < thresh2)
|
do while (dabs(val * copy(pf+1) - 1d0) < thresh2)
|
||||||
pf = pf + 1
|
pf = pf + 1
|
||||||
! if pf == sze, copy(pf+1) will not be valid
|
! if pf == sze, copy(pf+1) will not be valid
|
||||||
if (pf == sze) then
|
if (pf == sze) then
|
||||||
|
Loading…
Reference in New Issue
Block a user