From e1e94b3fafcd897813258373c2b4cabcde81782b Mon Sep 17 00:00:00 2001 From: dalcorso Date: Mon, 3 Feb 2003 13:48:59 +0000 Subject: [PATCH] Corretto un bug nella costante dielettrica con potenziali solo locali. (ADC) git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@51 c92efa57-630b-4861-b058-cf58834340f0 --- PH/dvpsi_e.f90 | 6 +++++- PH/phq_setup.f90 | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PH/dvpsi_e.f90 b/PH/dvpsi_e.f90 index e152689e3..541a03f00 100644 --- a/PH/dvpsi_e.f90 +++ b/PH/dvpsi_e.f90 @@ -53,7 +53,11 @@ subroutine dvpsi_e (kpoint, ipol) ! ! call start_clock ('dvpsi_e') - call mallocate(work , npwx, nkb) + if (nkb.gt.0) then + call mallocate(work , npwx, nkb) + else + call mallocate(work , npwx, 1) + endif call mallocate(gk , 3, npwx) call mallocate(h_diag, npwx , nbnd) call mallocate(ps , 2 , nbnd) diff --git a/PH/phq_setup.f90 b/PH/phq_setup.f90 index 62020bc51..c70a247de 100644 --- a/PH/phq_setup.f90 +++ b/PH/phq_setup.f90 @@ -153,7 +153,7 @@ subroutine phq_setup ! if (ngauss.eq. - 99) then fac = 1.d0 / sqrt (small) - xmax = 2.d0 * log (0.5 * (fac + sqrt (fac * fac - 4.0) ) ) + xmax = 2.d0 * log (0.5d0 * (fac + sqrt (fac * fac - 4.d0) ) ) endif target = ef + xmax * degauss