Commit 9d7115d7 authored by Matthias Redies's avatar Matthias Redies

replace one read_cmt caller

parent d17cf276
......@@ -232,7 +232,8 @@ CONTAINS
noco, oneD, nkqpt, cprod_vv_r)
ELSE
CALL wavefproducts_noinv5(ibando, ibando + psize - 1, ik, iq, input, jsp, &
cell, atoms, mpdata, hybinp, hybdat, kpts, lapw, sym, noco, nkqpt, cprod_vv_c)
cell, atoms, mpdata, hybinp, hybdat, kpts, lapw, &
sym, noco, oneD, nkqpt, cprod_vv_c)
END IF
! The sparse matrix technique is not feasible for the HSE
......
......@@ -4,7 +4,7 @@ module m_wavefproducts_noinv
CONTAINS
SUBROUTINE wavefproducts_noinv5(bandoi, bandof, ik, iq, &
input, jsp, cell, atoms, mpdata, hybinp,&
hybdat, kpts, lapw, sym, noco,&
hybdat, kpts, lapw, sym, noco, oneD,&
nkqpt, cprod)
USE m_types
use m_juDFT
......@@ -13,6 +13,7 @@ CONTAINS
TYPE(t_input), INTENT(IN) :: input
TYPE(t_noco), INTENT(IN) :: noco
type(t_oneD), intent(in) :: oneD
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_kpts), INTENT(IN) :: kpts
......@@ -33,7 +34,8 @@ CONTAINS
INTEGER :: g_t(3)
REAL :: kqpt(3), kqpthlp(3)
complex :: c_phase_k(hybdat%nbands(ik))
type(t_mat) :: z_k_p
call timestart("wavefproducts_noinv5")
cprod = cmplx_0; nkqpt = 0
......@@ -51,11 +53,13 @@ CONTAINS
call wavefproducts_noinv5_IS(bandoi, bandof, ik, iq, g_t,&
input, jsp, cell, atoms, mpdata, hybinp,&
hybdat, kpts, lapw, sym, noco,&
nkqpt, cprod)
nkqpt, z_k_p, c_phase_k, cprod)
call wavefproducts_noinv_MT(bandoi, bandof, ik, iq, &
input,atoms, mpdata, hybinp, hybdat, kpts, &
nkqpt, cprod)
input,atoms, cell, noco, oneD, sym,&
mpdata, hybinp, hybdat, kpts, &
jsp, nkqpt, z_k_p, c_phase_k, cprod)
call timestop("wavefproducts_noinv5")
END SUBROUTINE wavefproducts_noinv5
......@@ -63,7 +67,7 @@ CONTAINS
subroutine wavefproducts_noinv5_IS(bandoi, bandof, ik, iq, g_t, &
input, jsp, cell, atoms, mpdata, hybinp,&
hybdat, kpts, lapw, sym, noco,&
nkqpt, cprod)
nkqpt, z_k_p, c_phase_k, cprod)
use m_types
use m_constants
use m_wavefproducts_aux
......@@ -80,6 +84,7 @@ CONTAINS
TYPE(t_mpdata), intent(in) :: mpdata
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_hybdat), INTENT(INOUT) :: hybdat
type(t_mat), intent(inout) :: z_k_p
! - scalars -
INTEGER, INTENT(IN) :: bandoi, bandof
......@@ -87,8 +92,8 @@ CONTAINS
INTEGER, INTENT(IN) :: nkqpt
! - arrays -
COMPLEX, INTENT(INOUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, hybdat%nbands(ik))
complex, intent(inout) :: c_phase_k(hybdat%nbands(ik))
COMPLEX, INTENT(INOUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, hybdat%nbands(ik))
! - local scalars -
INTEGER :: ic, n1, n2
......@@ -121,11 +126,14 @@ CONTAINS
CALL lapw_nkqpt%init(input, noco, kpts, atoms, sym, nkqpt, cell, sym%zrfs)
nbasfcn = calc_number_of_basis_functions(lapw, atoms, noco)
call z_nk%alloc(.false., nbasfcn, input%neig)
call z_k_p%init(z_nk)
nbasfcn = calc_number_of_basis_functions(lapw_nkqpt, atoms, noco)
call z_kqpt%alloc(.false., nbasfcn, input%neig)
! read in z at k-point ik and nkqpt
call read_z(atoms, cell, hybdat, kpts, sym, noco, input, ik, jsp, z_nk)
call read_z(atoms, cell, hybdat, kpts, sym, noco, input, ik, jsp, z_nk, &
c_phase=c_phase_k, parent_z=z_k_p)
call read_z(atoms, cell, hybdat, kpts, sym, noco, input, nkqpt, jsp, z_kqpt)
g = maxval(abs(lapw%gvec(:,:lapw%nv(jsp), jsp)), dim=2) &
......@@ -198,29 +206,36 @@ CONTAINS
subroutine wavefproducts_noinv_MT(bandoi, bandof, ik, iq, &
input,atoms, mpdata, hybinp, hybdat, kpts, &
ikqpt, cprod)
input,atoms, cell, noco, oneD, sym,&
mpdata, hybinp, hybdat, kpts, &
jsp, ikqpt, z_k_p, c_phase_k, cprod)
use m_types
USE m_constants
use m_io_hybinp
use m_judft
use m_wavefproducts_aux
use m_calc_cmt
IMPLICIT NONE
TYPE(t_input),INTENT(IN) :: input
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_atoms), INTENT(IN) :: atoms
type(t_cell), intent(in) :: cell
type(t_noco), intent(in) :: noco
type(t_oneD), intent(in) :: oneD
type(t_sym), intent(in) :: sym
TYPE(t_mpdata), INTENT(IN) :: mpdata
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_hybdat), INTENT(INOUT) :: hybdat
type(t_mat), intent(in) :: z_k_p
! - scalars -
INTEGER, INTENT(IN) :: bandoi, bandof
INTEGER, INTENT(IN) :: ik, iq
INTEGER, INTENT(IN) :: ik, iq, jsp
INTEGER, INTENT(IN) :: ikqpt
! - arrays -
COMPLEX, INTENT(INOUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, hybdat%nbands(ik))
complex, intent(in) :: c_phase_k(hybdat%nbands(ik))
COMPLEX, INTENT(INOUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, hybdat%nbands(ik))
! - local scalars -
INTEGER :: ic, l, n, l1, l2, n1, n2, lm_0, lm1_0, lm2_0
......@@ -236,7 +251,7 @@ CONTAINS
COMPLEX :: carr(bandoi:bandof, hybdat%nbands(ik))
COMPLEX :: cmt_ikqpt(input%neig, hybdat%maxlmindx, atoms%nat)
COMPLEX :: cmt_nk(input%neig, hybdat%maxlmindx, atoms%nat)
COMPLEX :: cmt_nk(hybdat%nbands(ik), hybdat%maxlmindx, atoms%nat)
call timestart("wavefproducts_noinv5 MT")
! lmstart = lm start index for each l-quantum number and atom type (for cmt-coefficients)
......@@ -250,7 +265,9 @@ CONTAINS
! read in cmt coefficients from direct access file cmt
call timestart("read_cmt")
call read_cmt(cmt_nk, ik)
!call read_cmt(cmt_nk, ik)
call calc_cmt(atoms, cell, input, noco, hybinp, hybdat, mpdata, kpts, &
sym, oneD, z_k_p, jsp, ik, c_phase_k, cmt_nk)
call read_cmt(cmt_ikqpt, ikqpt)
call timestop("read_cmt")
......
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