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

Fixed bug in class_coulomb.

parent ca226893
......@@ -99,8 +99,8 @@ MODULE class_coulomb
this%sqvc = 0._DP
DO ig = 1,numg
!
IF ( gamma_only ) THEN
qg(:) = g(:,ig)
IF ( gamma_only .OR. cdriver == 'Smooth') THEN ! if smooth grid is used (X), no mapping is needed
qg(:) = g(:,ig) + q_grid%p_cart(:,this%iq)
ELSE
qg(:) = g(:,igq_q(ig,this%iq)) + q_grid%p_cart(:,this%iq)
ENDIF
......@@ -148,7 +148,7 @@ MODULE class_coulomb
USE gvecw, ONLY : ecutwfc
USE random_numbers, ONLY : randy
USE gvect, ONLY : g
USE westcom, ONLY : ngq,igq_q
USE gvecs, ONLY : ngms
USE types_bz_grid, ONLY : q_grid
!
! I/O
......@@ -251,8 +251,8 @@ MODULE class_coulomb
!
DO iq = 1, q_grid%np
!
DO ig = 1,ngq(iq)
qg(:) = q_grid%p_cart(:,iq) + g(:,igq_q(ig,iq))
DO ig = 1,ngms
qg(:) = q_grid%p_cart(:,iq) + g(:,ig)
qgnorm2 = SUM( qg(:)**2 ) * tpiba2
on_double_grid = .TRUE.
DO ipol = 1,3
......
......@@ -15,7 +15,7 @@ MODULE types_coulomb
!-----------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE class_coulomb, ONLY : coulomb
USE class_coulomb, ONLY : coulomb
!
IMPLICIT NONE
!
......
......@@ -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
!
......
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