Commit b5433f1a authored by Henning Janssen's avatar Henning Janssen

Merge remote-tracking branch 'origin/develop' into develop

parents 018e6bc4 9d781379
......@@ -67,12 +67,12 @@ CONTAINS
! dFx_ds - derivative of this factor with respect to s
! d2Fx_ds2 - second derivative with respect to s
SUBROUTINE calculateEnhancementFactor(kF, s_inp, F_x, dFx_Ds, d2Fx_Ds2, dFx_dkF, d2Fx_dsdkF)
use m_constants, only: REAL_NOT_INITALIZED
IMPLICIT NONE
REAL, INTENT(IN) :: kF, s_inp
REAL, INTENT(OUT) :: F_x, dFx_ds, d2Fx_ds2
REAL, INTENT(OUT) :: dFx_dkF, d2Fx_dsdkF
REAL, INTENT(INOUT) :: F_x, dFx_ds, d2Fx_ds2
REAL, INTENT(INOUT) :: dFx_dkF, d2Fx_dsdkF
! Helper variables
REAL :: r1_kF, & ! 1 / kF
......@@ -107,6 +107,9 @@ CONTAINS
! If a large value of s would violate the Lieb-Oxford bound, the value of s is reduced,
! so that this condition is fullfilled
F_x=REAL_NOT_INITALIZED; dFx_ds=REAL_NOT_INITALIZED; d2Fx_ds2=REAL_NOT_INITALIZED
dFx_dkF=REAL_NOT_INITALIZED;d2Fx_dsdkF=REAL_NOT_INITALIZED
correction = s_inp > s_thresh
IF (correction) THEN
s_si2 = s_chg/(s_inp*s_inp)
......@@ -230,12 +233,12 @@ CONTAINS
appInt, dAppInt_ds, d2AppInt_ds2, dAppInt_dkF, d2AppInt_dsdkF)
USE m_exponential_integral, ONLY: calculateExponentialIntegral, gauss_laguerre
use m_constants, only: REAL_NOT_INITALIZED
IMPLICIT NONE
REAL, INTENT(IN) :: omega_kF, Hs2, D_Hs2, dHs2_ds, d2Hs2_ds2
REAL, INTENT(OUT) :: appInt, dAppInt_ds, d2AppInt_ds2
REAL, INTENT(OUT) :: dAppInt_dkF, d2AppInt_dsdkF
REAL, INTENT(INOUT) :: appInt, dAppInt_ds, d2AppInt_ds2
REAL, INTENT(INOUT) :: dAppInt_dkF, d2AppInt_dsdkF
REAL :: w2, bw, r2bw, bw_Hs2, bw_D_Hs2
! variables for temporary storage of the integrals, the prefactors and the dot_product
......@@ -252,6 +255,9 @@ CONTAINS
-0.065032363850763, 0.008401793031216/), &
b = 1.455915450052607, cutoff = 14.0
appInt=REAL_NOT_INITALIZED; dAppInt_ds=REAL_NOT_INITALIZED;
d2AppInt_ds2=REAL_NOT_INITALIZED; dAppInt_dkF=REAL_NOT_INITALIZED;
d2AppInt_dsdkF=REAL_NOT_INITALIZED
! Calculate helper variables
w2 = omega_kF**2
bw = b*w2
......@@ -601,7 +607,7 @@ CONTAINS
IMPLICIT NONE
REAL, INTENT(IN) :: s, H, dHs2_ds, d2Hs2_ds2
REAL, INTENT(OUT) :: F, dFs2_ds, d2Fs2_ds2
REAL, INTENT(INOUT) :: F, dFs2_ds, d2Fs2_ds2
REAL, PARAMETER :: slope = 6.4753871
REAL, PARAMETER :: shift = 0.4796583
......@@ -624,10 +630,11 @@ CONTAINS
! dGs2_ds - first derivative of G(s)s^2 with respect to s
! d2Gs2_ds2 - second derivative of G(s)s^2
SUBROUTINE calculateG(s2, Fs2, dFs2_ds, d2Fs2_ds2, Hs2, dHs2_ds, d2Hs2_ds2, G, dGs2_ds, d2Gs2_ds2)
use m_constants, only: REAL_NOT_INITALIZED
IMPLICIT NONE
REAL, INTENT(IN) :: s2, Fs2, dFs2_ds, d2Fs2_ds2, Hs2, dHs2_ds, d2Hs2_ds2
REAL, INTENT(OUT) :: G, dGs2_ds, d2Gs2_ds2
REAL, INTENT(INOUT) :: G, dGs2_ds, d2Gs2_ds2
! helper variables
REAL :: AHs2_1_2, AHs2_3_2, r1_Fs2, D_Hs2, D_Hs2Sqr, D_Hs2Cub, &
......@@ -646,6 +653,7 @@ CONTAINS
D = 0.57786348, &
E = -0.051955731
G=REAL_NOT_INITALIZED; dGs2_ds=REAL_NOT_INITALIZED; d2Gs2_ds2=REAL_NOT_INITALIZED
! calculate the helper variables
AHs2_1_2 = sqrtA*SQRT(Hs2)
AHs2_3_2 = AHs2_1_2*A*Hs2
......@@ -834,10 +842,11 @@ CONTAINS
! dHs2_ds - first derivative d(s^2*H(s))/ds
! d2Hs2_ds2 - second derivative d^2(s^2H(s))/ds^2
SUBROUTINE calculateH(s, H, dHs2_ds, d2Hs2_ds2)
use m_constants, only: REAL_NOT_INITALIZED
IMPLICIT NONE
REAL, INTENT(IN) :: s
REAL, INTENT(OUT) :: H, dHs2_ds, d2Hs2_ds2
REAL, INTENT(INOUT) :: H, dHs2_ds, d2Hs2_ds2
! helper variables
REAL :: s2, s3, s4, s5, s6
......@@ -853,6 +862,7 @@ CONTAINS
a4 = 0.00120824, &
a5 = 0.0347188
H=REAL_NOT_INITALIZED; dHs2_ds=REAL_NOT_INITALIZED; d2Hs2_ds2=REAL_NOT_INITALIZED
! calculate helper variables
s2 = s*s
s3 = s2*s
......
......@@ -136,9 +136,9 @@ CONTAINS
TYPE(t_atoms), INTENT(IN) :: atoms
! - scalars -
INTEGER, INTENT(IN) :: ncstd
INTEGER, INTENT(IN) :: jspin
INTEGER, INTENT(OUT):: lmaxc(:)
INTEGER, INTENT(IN) :: ncstd
INTEGER, INTENT(IN) :: jspin
INTEGER, INTENT(INOUT):: lmaxc(:)
! - arrays -
INTEGER, INTENT(INOUT):: nindxcr(0:ncstd, atoms%ntype)
......@@ -311,7 +311,7 @@ CONTAINS
TYPE(t_input), INTENT(IN) :: input
TYPE(t_atoms), INTENT(IN) :: atoms
INTEGER, INTENT(OUT) :: maxindxc, lmaxcd
INTEGER, INTENT(INOUT) :: maxindxc, lmaxcd
! - local scalars -
INTEGER :: itype, korb, ncmsh, nst
......
......@@ -73,7 +73,8 @@ CONTAINS
SUBROUTINE olap_pwp(l_real, olap_r, olap_c, gpt, ngpt, atoms, cell)
USE m_constants
USE m_constants, ONLY: REAL_NOT_INITALIZED, CMPLX_NOT_INITALIZED,&
fpi_const, tpi_const
USE m_types
IMPLICIT NONE
TYPE(t_cell), INTENT(IN) :: cell
......@@ -85,14 +86,16 @@ CONTAINS
INTEGER, INTENT(IN) :: gpt(:,:)
LOGICAL, INTENT(IN) :: l_real
REAL, INTENT(OUT) :: olap_r(ngpt*(ngpt + 1)/2)
COMPLEX, INTENT(OUT) :: olap_c(ngpt*(ngpt + 1)/2)
REAL, INTENT(INOUT) :: olap_r(ngpt*(ngpt + 1)/2)
COMPLEX, INTENT(INOUT) :: olap_c(ngpt*(ngpt + 1)/2)
! - local -
INTEGER :: i, j, k, itype, icent, ineq
REAL :: g, r, fgr
COMPLEX, PARAMETER :: img = (0.0, 1.0)
INTEGER :: dg(3)
olap_r=REAL_NOT_INITALIZED; olap_c=CMPLX_NOT_INITALIZED
if (l_real) THEN
k = 0
DO i = 1, ngpt
......
This diff is collapsed.
......@@ -229,7 +229,7 @@ CONTAINS
COMPLEX, INTENT(IN) :: coulomb_mt3(:, :, :)
COMPLEX, INTENT(IN) :: coulomb_mtir(:)
COMPLEX, INTENT(IN) :: vecin(:)!(hybdat%nbasm)
COMPLEX, INTENT(OUT):: vecout(:)!(hybdat%nbasm)
COMPLEX, INTENT(INOUT):: vecout(:)!(hybdat%nbasm)
! - local scalars -
INTEGER :: itype, ieq, iatom, ishift
......@@ -244,6 +244,7 @@ CONTAINS
COMPLEX :: vecinhlp(hybdat%nbasm(ikpt))
call timestart("spmvec_noinvs")
vecout = CMPLX_NOT_INITALIZED
vecinhlp = vecin
CALL reorder(hybdat%nbasm(ikpt), atoms, hybinp%lcutm1, maxval(hybinp%lcutm1), mpdata%num_radbasfn, 1, vec_c=vecinhlp)
......
......@@ -30,13 +30,14 @@ CONTAINS
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_kpts), INTENT(IN) :: kpts
INTEGER, INTENT(IN) :: nk
INTEGER, INTENT(OUT) :: nsymop
INTEGER, INTENT(INOUT) :: nsymop
INTEGER, INTENT(INOUT) :: rrot(:,:,:) ! 3,3,sym%nsym
INTEGER, INTENT(INOUT) :: psym(:) ! Note: psym is only filled up to index nsymop
INTEGER :: i
REAL :: rotkpt(3)
nsymop = 0
! calculate rotations in reciprocal space
DO i = 1, sym%nsym
IF (i <= sym%nop) THEN
......@@ -96,7 +97,7 @@ CONTAINS
! - scalars -
INTEGER, INTENT(IN) :: nk
INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(OUT) :: nkpt_EIBZ
INTEGER, INTENT(INOUT) :: nkpt_EIBZ
INTEGER, INTENT(IN) :: nsymop
! - arrays -
......@@ -146,7 +147,7 @@ CONTAINS
COMPLEX, ALLOCATABLE :: rep_d(:, :, :)
LOGICAL, ALLOCATABLE :: symequivalent(:, :)
parent = 0; nsest = 0; indx_sest = 0;
parent = 0; nsest = 0; indx_sest = 0; nkpt_EIBZ =0;
WRITE (6, '(A)') new_line('n')//new_line('n')//'### subroutine: symm ###'
......@@ -214,7 +215,7 @@ CONTAINS
! determine the factor n_q, that means the number of symmetrie operations of the little group of bk(:,nk)
! which keep q (in EIBZ) invariant
allocate(n_q(nkpt_EIBZ), source=0)
ic = 0
n_q = 0
DO ikpt = 1, kpts%nkptf
......
......@@ -545,15 +545,17 @@ CONTAINS
! Returns the spherical harmonics Y_lm(^rvec) for l = 0,...,ll in Y(1,...,(ll+1)**2).
SUBROUTINE harmonicsr(Y, rvec, ll)
use m_judft
use m_constants, only: CMPLX_NOT_INITALIZED
IMPLICIT NONE
INTEGER, INTENT(IN) :: ll
REAL, INTENT(IN) :: rvec(:)
COMPLEX, INTENT(OUT) :: Y((ll + 1)**2)
COMPLEX, INTENT(INOUT) :: Y((ll + 1)**2)
REAL :: stheta, ctheta, sphi, cphi, r, rvec1(3)
INTEGER :: l, lm
COMPLEX :: c
COMPLEX, PARAMETER :: img = (0.0, 1.0)
Y = CMPLX_NOT_INITALIZED
Y(1) = 0.282094791773878
IF (ll == 0) RETURN
......
......@@ -768,7 +768,7 @@ CONTAINS
IMPLICIT NONE
INTEGER, INTENT(IN) :: n
COMPLEX, INTENT(IN) :: carr(n)
COMPLEX, INTENT(OUT) :: cfac
COMPLEX, INTENT(INOUT) :: cfac
REAL :: rdum, rmax
INTEGER :: i
......@@ -810,7 +810,7 @@ CONTAINS
INTEGER, INTENT(IN) :: maxlcutm
INTEGER, INTENT(IN) :: nbasp
LOGICAL, INTENT(IN) :: writevec
INTEGER, INTENT(OUT) :: igptm_out
INTEGER, INTENT(INOUT) :: igptm_out
! - arrays -
INTEGER, INTENT(IN) :: rrot(:,:), invrrot(:,:)
INTEGER, INTENT(IN) :: lcutm(atoms%ntype),&
......@@ -825,7 +825,7 @@ CONTAINS
COMPLEX, INTENT(IN) :: dwgn(-maxlcutm:maxlcutm,&
-maxlcutm:maxlcutm,&
0:maxlcutm)
COMPLEX, INTENT(OUT) :: vecout(nbasm(ikpt0))
COMPLEX, INTENT(INOUT) :: vecout(nbasm(ikpt0))
! - private scalars -
INTEGER :: itype, ieq, ic, l, n, i, nn, i1, i2, j1, j2
......@@ -841,6 +841,8 @@ CONTAINS
COMPLEX :: vecin1(nbasm(ikpt0))
COMPLEX :: carr(mpdata%n_g(ikpt0))
igptm_out=-1;vecout=CMPLX_NOT_INITALIZED
IF (iop <= sym%nop) THEN
isym = iop
trs = .false.
......
......@@ -35,7 +35,7 @@ CONTAINS
INTEGER, INTENT(IN) :: bandi, bandf, bandoi, bandof
INTEGER, INTENT(IN) :: jsp, nk, iq
INTEGER, INTENT(IN) :: nbasm_mt
INTEGER, INTENT(OUT) :: nkqpt
INTEGER, INTENT(INOUT) :: nkqpt
! - arrays -
REAL, INTENT(INOUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
......@@ -46,7 +46,7 @@ CONTAINS
CALL timestart("wavefproducts_inv5")
cprod = 0.0
cprod = 0.0;nkqpt=-1
kqpthlp = kpts%bkf(:, nk) + kpts%bkf(:, iq)
! kqpt can lie outside the first BZ, transfer it back
kqpt = kpts%to_first_bz(kqpthlp)
......
......@@ -23,10 +23,10 @@ CONTAINS
TYPE(t_hybdat), INTENT(INOUT) :: hybdat
! - scalars -
INTEGER, INTENT(IN) :: bandi, bandf, bandoi, bandof
INTEGER, INTENT(IN) :: nk, iq, jsp
INTEGER, INTENT(IN) :: nbasm_mt
INTEGER, INTENT(OUT) :: nkqpt
INTEGER, INTENT(IN) :: bandi, bandf, bandoi, bandof
INTEGER, INTENT(IN) :: nk, iq, jsp
INTEGER, INTENT(IN) :: nbasm_mt
INTEGER, INTENT(INOUT) :: nkqpt
! - arrays -
......@@ -37,7 +37,7 @@ CONTAINS
call timestart("wavefproducts_noinv5")
cprod = cmplx_0
cprod = cmplx_0; nkqpt = 0
! calculate nkpqt
kqpthlp = kpts%bkf(:,nk) + kpts%bkf(:,iq)
......
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