Commit b0082abf authored by Matteo Gerosa's avatar Matteo Gerosa
Browse files

Revert "Removed references to div_kind_hf."

This reverts commit 0668ebde.
parent 510877ef
......@@ -355,7 +355,7 @@ MODULE class_coulomb
!
SUBROUTINE print_divergence( this )
!
USE io_global, ONLY : stdout
USE io_global, ONLY : stdout
USE types_bz_grid, ONLY : q_grid
!
! I/O
......
......@@ -168,6 +168,7 @@ MODULE wfreq_center
REAL(DP),ALLOCATABLE :: imfreq_list(:)
REAL(DP),ALLOCATABLE :: imfreq_list_integrate(:,:)
REAL(DP),PARAMETER :: frequency_list_power = 2._DP
INTEGER :: div_kind_hf ! 1=spherical region, 2=GB, 3=cut_ws
!
! gw_etot
!
......
......@@ -93,6 +93,7 @@ SUBROUTINE fetch_input( num_drivers, driver, verbose )
trev_secant = 0.003675_DP
l_enable_lanczos = .TRUE.
l_enable_gwetot = .FALSE.
div_kind_hf = 2
o_restart_time = 0._DP
ecut_spectralf = (/ -2._DP, 2._DP /)
n_spectralf = 10
......@@ -188,6 +189,8 @@ SUBROUTINE fetch_input( num_drivers, driver, verbose )
IF( found ) l_enable_lanczos = lval
CALL json%get('wfreq_control.l_enable_gwetot', lval, found)
IF( found ) l_enable_gwetot = lval
CALL json%get('wfreq_control.div_kind_hf', ival, found)
IF( found ) div_kind_hf = ival
CALL json%get('wfreq_control.o_restart_time', rval, found)
IF( found ) o_restart_time = rval
CALL json%get('wfreq_control.ecut_spectralf', rvec, found)
......@@ -294,6 +297,7 @@ SUBROUTINE fetch_input( num_drivers, driver, verbose )
CALL mp_bcast(trev_secant,root,world_comm)
CALL mp_bcast(l_enable_lanczos,root,world_comm)
CALL mp_bcast(l_enable_gwetot,root,world_comm)
CALL mp_bcast(div_kind_hf,root,world_comm)
CALL mp_bcast(o_restart_time,root,world_comm)
CALL mp_bcast(ecut_spectralf,root,world_comm)
CALL mp_bcast(n_spectralf,root,world_comm)
......@@ -415,6 +419,7 @@ SUBROUTINE fetch_input( num_drivers, driver, verbose )
CALL io_push_value('trev_secant [Ry]',trev_secant,numsp)
CALL io_push_value('l_enable_lanczos',l_enable_lanczos,numsp)
CALL io_push_value('l_enable_gwetot',l_enable_gwetot,numsp)
CALL io_push_value('div_kind_hf',div_kind_hf,numsp)
CALL io_push_value('o_restart_time [min]',o_restart_time,numsp)
CALL io_push_value('ecut_spectralf(1) [Ry]',ecut_spectralf(1),numsp)
CALL io_push_value('ecut_spectralf(2) [Ry]',ecut_spectralf(2),numsp)
......@@ -534,6 +539,7 @@ SUBROUTINE add_intput_parameters_to_json_file( num_drivers, driver, json )
CALL json%add('input.wfreq_control.trev_secant',trev_secant)
CALL json%add('input.wfreq_control.l_enable_lanczos',l_enable_lanczos)
CALL json%add('input.wfreq_control.l_enable_gwetot',l_enable_gwetot)
CALL json%add('input.wfreq_control.div_kind_hf',div_kind_hf)
CALL json%add('input.wfreq_control.o_restart_time',o_restart_time)
CALL json%add('input.wfreq_control.ecut_spectralf',ecut_spectralf)
CALL json%add('input.wfreq_control.n_spectralf',n_spectralf)
......
......@@ -33,7 +33,7 @@ SUBROUTINE calc_exx2_gamma( sigma_exx, nb1, nb2 )
USE fft_at_gamma, ONLY : single_invfft_gamma,single_fwfft_gamma
USE fft_at_k, ONLY : single_invfft_k,single_fwfft_k
USE wavefunctions_module, ONLY : evc,psic,psic_nc
USE westcom, ONLY : iuwfc,lrwfc,npwq,nbnd_occ
USE westcom, ONLY : iuwfc,lrwfc,npwq,nbnd_occ,div_kind_hf
USE control_flags, ONLY : gamma_only
USE noncollin_module, ONLY : noncolin,npol
USE buffers, ONLY : get_buffer
......@@ -350,6 +350,8 @@ SUBROUTINE calc_exx2_k( sigma_exx, nb1, nb2 )
ENDIF
!
DO iq = 1, q_grid%np
!
! if not set from input, div_kind_hf = 2 (Gygi-Baldereschi)
!
l_gammaq = q_grid%l_pIsGamma(iq)
!
......
......@@ -164,6 +164,7 @@ SUBROUTINE solve_wfreq_gamma(l_read_restart,l_generate_plot)
ENDIF
!
CALL pot3D%init('Wave','default')
CALL pot3D%print_divergence()
!
! LOOP
!
......@@ -769,6 +770,7 @@ SUBROUTINE solve_wfreq_k(l_read_restart,l_generate_plot)
l_gammaq = q_grid%l_pIsGamma(iq)
!
CALL pot3D%init('Wave','default',iq)
CALL pot3D%print_divergence()
!
DO iks = 1, k_grid%nps ! KPOINT-SPIN
!
......
......@@ -611,21 +611,21 @@ SUBROUTINE davidson_diago_k ( )
SELECT CASE(wstat_calculation)
CASE('r','R')
!
! IF ( .NOT. l_restart_q_done ) THEN
!
CALL wstat_restart_read( dav_iter, notcnv, nbase, ew, hr_distr, vr_distr, lastdone_iq, iq )
!
IF ( iq < lastdone_iq ) THEN
CYCLE QPOINTS_LOOP
ELSEIF ( iq == lastdone_iq .AND. notcnv == 0 ) THEN
CYCLE QPOINTS_LOOP
IF ( .NOT. l_restart_q_done ) THEN
!
CALL wstat_restart_read( dav_iter, notcnv, nbase, ew, hr_distr, vr_distr, lastdone_iq, iq )
!
IF ( iq < lastdone_iq ) THEN
CYCLE QPOINTS_LOOP
ELSEIF ( iq == lastdone_iq .AND. notcnv == 0 ) THEN
CYCLE QPOINTS_LOOP
ENDIF
!
l_restart_q_done = .TRUE.
wstat_calculation = 'S' ! Start from scratch for the next q (after restart has been done)
!
ENDIF
!
l_restart_q_done = .TRUE.
wstat_calculation = 'S' ! Start from scratch for the next q (after restart has been done)
!
! ENDIF
!
CASE('s','S')
!
! FROM SCRATCH
......
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