mirror of
https://github.com/LCPQ/quantum_package
synced 2024-07-22 10:47:33 +02:00
More frequent teeth updates
This commit is contained in:
parent
245a2a90ed
commit
20edbbd777
@ -366,24 +366,27 @@ subroutine get_carlo_workbatch(computed, comb, Ncomb, tbc)
|
|||||||
integer, intent(inout) :: Ncomb
|
integer, intent(inout) :: Ncomb
|
||||||
logical, intent(inout) :: computed(N_det_generators)
|
logical, intent(inout) :: computed(N_det_generators)
|
||||||
integer :: i, j, last_full, dets(comb_teeth), tbc_save
|
integer :: i, j, last_full, dets(comb_teeth), tbc_save
|
||||||
integer :: n
|
integer :: icount, n
|
||||||
n = int(sqrt(dble(size(comb))))
|
n = tbc(0)
|
||||||
|
icount = 0
|
||||||
call RANDOM_NUMBER(comb)
|
call RANDOM_NUMBER(comb)
|
||||||
do j=1,size(comb),n
|
do i=1,size(comb)
|
||||||
do i=j,min(size(comb),j+n-1)
|
comb(i) = comb(i) * comb_step
|
||||||
comb(i) = comb(i) * comb_step
|
tbc_save = tbc(0)
|
||||||
tbc_save = tbc(0)
|
!DIR$ FORCEINLINE
|
||||||
!DIR$ FORCEINLINE
|
call add_comb(comb(i), computed, tbc, size_tbc, comb_teeth)
|
||||||
call add_comb(comb(i), computed, tbc, size_tbc, comb_teeth)
|
if (tbc(0) < size(tbc)) then
|
||||||
if (tbc(0) < size(tbc)) then
|
Ncomb = i
|
||||||
Ncomb = i
|
else
|
||||||
else
|
tbc(0) = tbc_save
|
||||||
tbc(0) = tbc_save
|
return
|
||||||
return
|
endif
|
||||||
endif
|
icount = icount + tbc(0) - tbc_save
|
||||||
end do
|
if (icount > n) then
|
||||||
call get_filling_teeth(computed, tbc)
|
call get_filling_teeth(computed, tbc)
|
||||||
|
icount = 0
|
||||||
|
n = ishft(tbc_save,-1)
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
@ -397,13 +400,16 @@ subroutine get_filling_teeth(computed, tbc)
|
|||||||
|
|
||||||
call get_last_full_tooth(computed, last_full)
|
call get_last_full_tooth(computed, last_full)
|
||||||
if(last_full /= 0) then
|
if(last_full /= 0) then
|
||||||
|
if (tbc(0) > size(tbc) - first_det_of_teeth(last_full+1) -2) then
|
||||||
|
return
|
||||||
|
endif
|
||||||
k = tbc(0)+1
|
k = tbc(0)+1
|
||||||
do j=1,first_det_of_teeth(last_full+1)-1
|
do j=1,first_det_of_teeth(last_full+1)-1
|
||||||
if(.not.(computed(j))) then
|
if(.not.(computed(j))) then
|
||||||
tbc(k) = j
|
tbc(k) = j
|
||||||
k=k+1
|
k=k+1
|
||||||
computed(j) = .true.
|
computed(j) = .true.
|
||||||
if (k>size_tbc) exit
|
! print *, "filled ", j, "to reach tooth", last_full, "ending at", first_det_of_teeth(last_full+1)
|
||||||
end if
|
end if
|
||||||
end do
|
end do
|
||||||
tbc(0) = k-1
|
tbc(0) = k-1
|
||||||
|
Loading…
Reference in New Issue
Block a user