From 1be97910251cf2e0d7408048b5e4a6e587ecf3ba Mon Sep 17 00:00:00 2001 From: ceresoli Date: Tue, 28 Oct 2008 18:54:51 +0000 Subject: [PATCH] I changed this because I've got an 'array out of bounds' in some calculations. Can someone please check if my fix is ok? (D.C.) git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5251 c92efa57-630b-4861-b058-cf58834340f0 --- PW/dndtau_of_k.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PW/dndtau_of_k.f90 b/PW/dndtau_of_k.f90 index a75de2e06..b2ba12eb6 100644 --- a/PW/dndtau_of_k.f90 +++ b/PW/dndtau_of_k.f90 @@ -19,7 +19,7 @@ SUBROUTINE dndtau_of_k(dns,ldim,offset,proj,wfcatom,spsi,alpha,ipol,ik) USE ions_base, ONLY : nat, ityp USE basis, ONLY : natomwfc USE lsda_mod, ONLY : nspin, current_spin - USE ldaU, ONLY : Hubbard_U, Hubbard_alpha + USE ldaU, ONLY : Hubbard_U, Hubbard_alpha, Hubbard_l USE wvfct, ONLY : nbnd, npwx, npw, wg IMPLICIT NONE @@ -53,8 +53,8 @@ SUBROUTINE dndtau_of_k(dns,ldim,offset,proj,wfcatom,spsi,alpha,ipol,ik) DO na = 1,nat nt = ityp(na) IF (Hubbard_U(nt).NE.0.d0.OR.Hubbard_alpha(nt).NE.0.d0) THEN - DO m1 = 1,ldim - DO m2 = m1,ldim + DO m1 = 1, 2*Hubbard_l(nt)+1 + DO m2 = m1, 2*Hubbard_l(nt)+1 DO ibnd = 1,nbnd dns(m1,m2,current_spin,na) = dns(m1,m2,current_spin,na) + & wg(ibnd,ik) * &