Commit de4cd6bc authored by Yingzhou Li's avatar Yingzhou Li

Updated Davidson to be robost to the number of basis

parent 8f23ac57
......@@ -269,7 +269,7 @@ contains
if (ijob == SID_INIT + 8) then
Vec_ev = resvec
Vec_evold = resvec
next = n
next = min(n,max_n-n)
call rci_op_null(task)
ijob = SID_ITER
return
......@@ -332,7 +332,7 @@ contains
if (ijob == SID_PROJ) then
resvec = Vec_evsub
call rci_op_p_multi(iS, task, 'N', m, next, MID_SPsiExt, &
MID_PsiExt)
MID_PsiExt)
ijob = ijob + 1
return
end if
......@@ -496,11 +496,8 @@ contains
end if
if (ijob == SID_ITER + 22) then
niter = niter + 1
write (*,*) 'Niter, ', niter
call rci_op_hegv(iS, task, 'V', 'L', n + next, &
MID_VR, max_n, MID_WORK1, max_n)
! TODO Remove the line
iS%m = next
ijob = ijob + 1
return
end if
......@@ -536,7 +533,7 @@ contains
! -store old ev for convergence checking
if (ijob == SID_ITER + 26) then
do it = 1, n_state
if (abs((Vec_ev(it) - Vec_evold(it))/Vec_ev(it)) &
if (abs((Vec_ev(it) - Vec_evold(it))/Vec_ev(1)) &
< tol_iter) then
Vec_conv(it) = 1.0_r8
else
......@@ -572,8 +569,6 @@ contains
exit
end if
end do
write (*,*) 'Restarting', n, n_restart
print *, Vec_conv
call rci_op_subcol(iS, task, max_n, n_state, MID_VR, MID_VRsub)
ijob = ijob + 1
return
......@@ -692,7 +687,7 @@ contains
! -- Prepare size for restarting
if (ijob == SID_RESTART + 12) then
n = n_state
next = n_restart
next = min(n_restart,max_n-n_restart)
call rci_op_null(task)
ijob = ijob + 1
return
......
......@@ -45,8 +45,8 @@ contains
select case (solver)
case (RCI_SOLVER_DAVIDSON)
r_h%n_res = min(2*n_state,n_basis)
r_h%max_n = min(2*n_state,n_basis)
r_h%n_res = min(4*n_state,n_basis)
r_h%max_n = min(4*n_state,n_basis)
case (RCI_SOLVER_OMM)
r_h%n_res = n_state
r_h%max_n = n_state
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment