Commit 3fc64e12 authored by Matthias Redies's avatar Matthias Redies

nbasp, max_indx_p_1, maxbasm1 moved from hybinp to hybdat

parent 8c13527f
......@@ -18,9 +18,6 @@ MODULE m_types_hybinp
INTEGER :: ewaldlambda = -1
INTEGER :: lexp = -1
INTEGER :: bands1 = -1 !Only read in
INTEGER :: nbasp = -1
INTEGER :: maxbasm1 = -1
INTEGER :: max_indx_p_1 = -1 !new
INTEGER, ALLOCATABLE :: select1(:, :)
INTEGER, ALLOCATABLE :: lcutm1(:)
INTEGER, ALLOCATABLE :: lcutwf(:)
......@@ -56,9 +53,6 @@ CONTAINS
CALL mpi_bc(this%ewaldlambda, rank, mpi_comm)
CALL mpi_bc(this%lexp, rank, mpi_comm)
CALL mpi_bc(this%bands1, rank, mpi_comm)
CALL mpi_bc(this%nbasp, rank, mpi_comm)
CALL mpi_bc(this%maxbasm1, rank, mpi_comm)
CALL mpi_bc(this%max_indx_p_1, rank, mpi_comm)
CALL mpi_bc(this%select1, rank, mpi_comm)
CALL mpi_bc(this%lcutm1, rank, mpi_comm)
CALL mpi_bc(this%lcutwf, rank, mpi_comm)
......
This diff is collapsed.
......@@ -129,8 +129,8 @@ CONTAINS
COMPLEX :: hessian(3, 3)
COMPLEX :: proj_ibsc(3, mnobd, hybdat%nbands(nk))
COMPLEX :: olap_ibsc(3, 3, mnobd, mnobd)
REAL :: carr1_v_r(hybinp%maxbasm1)
COMPLEX :: carr1_v_c(hybinp%maxbasm1)
REAL :: carr1_v_r(hybdat%maxbasm1)
COMPLEX :: carr1_v_c(hybdat%maxbasm1)
COMPLEX, ALLOCATABLE :: phase_vv(:, :)
REAL, ALLOCATABLE :: cprod_vv_r(:, :, :), carr3_vv_r(:, :, :)
COMPLEX, ALLOCATABLE :: cprod_vv_c(:, :, :), carr3_vv_c(:, :, :)
......@@ -161,7 +161,7 @@ CONTAINS
! the contribution of the Gamma-point is treated separately (see below)
! determine package size loop over the occupied bands
rdum = hybinp%maxbasm1*hybdat%nbands(nk)*4/1048576.
rdum = hybdat%maxbasm1*hybdat%nbands(nk)*4/1048576.
psize = 1
DO iband = mnobd, 1, -1
! ensure that the packages have equal size
......@@ -184,17 +184,17 @@ CONTAINS
IF (ok /= 0) call judft_error('exchange_val_hf: error allocation phase')
if (mat_ex%l_real) THEN
allocate(cprod_vv_c(hybinp%maxbasm1, 0, 0), carr3_vv_c(hybinp%maxbasm1, 0, 0))
allocate(cprod_vv_r(hybinp%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
allocate(cprod_vv_c(hybdat%maxbasm1, 0, 0), carr3_vv_c(hybdat%maxbasm1, 0, 0))
allocate(cprod_vv_r(hybdat%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
IF (ok /= 0) call judft_error('exchange_val_hf: error allocation cprod')
allocate(carr3_vv_r(hybinp%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
allocate(carr3_vv_r(hybdat%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
IF (ok /= 0) call judft_error('exchange_val_hf: error allocation carr3')
cprod_vv_r = 0; carr3_vv_r = 0
ELSE
allocate(cprod_vv_r(hybinp%maxbasm1, 0, 0), carr3_vv_r(hybinp%maxbasm1, 0, 0))
allocate(cprod_vv_c(hybinp%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
allocate(cprod_vv_r(hybdat%maxbasm1, 0, 0), carr3_vv_r(hybdat%maxbasm1, 0, 0))
allocate(cprod_vv_c(hybdat%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
IF (ok /= 0) call judft_error('exchange_val_hf: error allocation cprod')
allocate(carr3_vv_c(hybinp%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
allocate(carr3_vv_c(hybdat%maxbasm1, psize, hybdat%nbands(nk)), stat=ok)
IF (ok /= 0) call judft_error('exchange_val_hf: error allocation carr3')
cprod_vv_c = 0; carr3_vv_c = 0
END IF
......@@ -205,7 +205,7 @@ CONTAINS
ikpt0 = pointer_EIBZ(ikpt)
n = hybinp%nbasp + mpdata%n_g(ikpt0)
n = hybdat%nbasp + mpdata%n_g(ikpt0)
IF (hybinp%nbasm(ikpt0) /= n) call judft_error('error hybinp%nbasm')
nn = n*(n + 1)/2
......@@ -227,11 +227,11 @@ CONTAINS
IF (mat_ex%l_real) THEN
CALL wavefproducts_inv5(1, hybdat%nbands(nk), ibando, ibando + psize - 1, input, jsp, atoms, &
lapw, kpts, nk, ikpt0, hybdat, mpdata, hybinp, cell, hybinp%nbasp, sym, &
lapw, kpts, nk, ikpt0, hybdat, mpdata, hybinp, cell, hybdat%nbasp, sym, &
noco, nkqpt, cprod_vv_r)
ELSE
CALL wavefproducts_noinv5(1, hybdat%nbands(nk), ibando, ibando + psize - 1, nk, ikpt0, input, jsp, &!jsp,&
cell, atoms, mpdata, hybinp, hybdat, kpts, lapw, sym, hybinp%nbasp, noco, nkqpt, cprod_vv_c)
cell, atoms, mpdata, hybinp, hybdat, kpts, lapw, sym, hybdat%nbasp, noco, nkqpt, cprod_vv_c)
END IF
! The sparse matrix technique is not feasible for the HSE
......@@ -259,7 +259,7 @@ CONTAINS
CALL bra_trafo2(mat_ex%l_real, carr3_vv_r(:hybinp%nbasm(ikpt0), :, :), cprod_vv_r(:hybinp%nbasm(ikpt0), :, :), &
carr3_vv_c(:hybinp%nbasm(ikpt0), :, :), cprod_vv_c(:hybinp%nbasm(ikpt0), :, :), &
hybinp%nbasm(ikpt0), psize, hybdat%nbands(nk), kpts%bkp(ikpt0), ikpt0, kpts%bksym(ikpt0), sym, &
mpdata, hybinp, kpts, atoms, phase_vv)
mpdata, hybinp, hybdat, kpts, atoms, phase_vv)
IF (mat_ex%l_real) THEN
cprod_vv_r(:hybinp%nbasm(ikpt0), :, :) = carr3_vv_r(:hybinp%nbasm(ikpt0), :, :)
ELSE
......@@ -280,11 +280,11 @@ CONTAINS
call timestart("sparse matrix products")
IF (mat_ex%l_real) THEN
carr1_v_r(:n) = 0
CALL spmvec_invs(atoms, mpdata, hybinp, ikpt0, coulomb_mt1, coulomb_mt2_r, coulomb_mt3_r, &
CALL spmvec_invs(atoms, mpdata, hybinp, hybdat, ikpt0, coulomb_mt1, coulomb_mt2_r, coulomb_mt3_r, &
coulomb_mtir_r, cprod_vv_r(:n, iband, n1), carr1_v_r(:n))
ELSE
carr1_v_c(:n) = 0
CALL spmvec_noinvs(atoms, mpdata, hybinp, ikpt0, coulomb_mt1, coulomb_mt2_c, coulomb_mt3_c, &
CALL spmvec_noinvs(atoms, mpdata, hybinp, hybdat, ikpt0, coulomb_mt1, coulomb_mt2_c, coulomb_mt3_c, &
coulomb_mtir_c, cprod_vv_c(:n, iband, n1), carr1_v_c(:n))
END IF
call timestop("sparse matrix products")
......
......@@ -216,10 +216,10 @@ CONTAINS
allocate(basprod(atoms%jmtd), stat=ok)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation basprod')
IF(ALLOCATED(hybdat%prodm)) DEALLOCATE(hybdat%prodm)
allocate(hybdat%prodm(maxval(mpdata%num_radbasfn), hybinp%max_indx_p_1, 0:maxval(hybinp%lcutm1), atoms%ntype), stat=ok)
allocate(hybdat%prodm(maxval(mpdata%num_radbasfn), hybdat%max_indx_p_1, 0:maxval(hybinp%lcutm1), atoms%ntype), stat=ok)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation hybdat%prodm')
call mpdata%init(hybinp, atoms)
call mpdata%init(hybinp, hybdat, atoms)
basprod = 0; hybdat%prodm = 0; mpdata%l1 = 0; mpdata%l2 = 0
mpdata%n1 = 0; mpdata%n2 = 0
......
......@@ -56,7 +56,7 @@ CONTAINS
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_hybdat), INTENT(IN) :: hybdat
TYPE(t_hybdat), INTENT(INOUT) :: hybdat
TYPE(t_enpara), INTENT(IN) :: enpara
TYPE(t_input), INTENT(IN) :: input
TYPE(t_cell), INTENT(IN) :: cell
......@@ -136,7 +136,7 @@ CONTAINS
! determine maximal indices of (radial) mixed-basis functions (->num_radbasfn)
! (will be reduced later-on due to overlap)
hybinp%max_indx_p_1 = 0
hybdat%max_indx_p_1 = 0
DO itype = 1, atoms%ntype
seleco = .FALSE.
selecu = .FALSE.
......@@ -184,7 +184,7 @@ CONTAINS
IF (n_radbasfn == 0 .AND. mpi%irank == 0) &
WRITE (6, '(A)') 'mixedbasis: Warning! No basis-function product of '//lchar(l)// &
'-angular momentum defined.'
hybinp%max_indx_p_1 = MAX(hybinp%max_indx_p_1, M)
hybdat%max_indx_p_1 = MAX(hybdat%max_indx_p_1, M)
mpdata%num_radbasfn(l, itype) = n_radbasfn*input%jspins
END DO
END DO
......@@ -369,16 +369,16 @@ CONTAINS
call mpdata%check_radbasfn(atoms, hybinp)
!count basis functions
hybinp%nbasp = 0
hybdat%nbasp = 0
DO itype = 1, atoms%ntype
DO i = 1, atoms%neq(itype)
DO l = 0, hybinp%lcutm1(itype)
hybinp%nbasp = hybinp%nbasp + (2*l+1) * mpdata%num_radbasfn(l, itype)
hybdat%nbasp = hybdat%nbasp + (2*l+1) * mpdata%num_radbasfn(l, itype)
END DO
END DO
END DO
hybinp%maxbasm1 = hybinp%nbasp + maxval(mpdata%n_g)
hybinp%nbasm = hybinp%nbasp + mpdata%n_g
hybdat%maxbasm1 = hybdat%nbasp + maxval(mpdata%n_g)
hybinp%nbasm = hybdat%nbasp + mpdata%n_g
hybdat%maxlmindx = 0
do itype = 1,atoms%ntype
......
......@@ -4,7 +4,7 @@ CONTAINS
!Note this module contains a real/complex version of spmvec
SUBROUTINE spmvec_invs(&
atoms, mpdata, hybinp,&
atoms, mpdata, hybinp, hybdat,&
ikpt, &
coulomb_mt1, coulomb_mt2, coulomb_mt3,&
coulomb_mtir, vecin,&
......@@ -16,6 +16,7 @@ CONTAINS
USE m_juDFT
IMPLICIT NONE
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_hybdat), INTENT(IN) :: hybdat
TYPE(t_mpdata), intent(in) :: mpdata
TYPE(t_atoms), INTENT(IN) :: atoms
......@@ -114,7 +115,7 @@ CONTAINS
indx3 = indx3 + atoms%neq(itype1)*ishift1
END DO
IF (indx3 /= hybinp%nbasp) call judft_error('spmvec: error counting index indx3')
IF (indx3 /= hybdat%nbasp) call judft_error('spmvec: error counting index indx3')
vecout(indx1:indx2) = vecout(indx1:indx2) + coulomb_mt2(:mpdata%num_radbasfn(l, itype) - 1, 0, maxval(hybinp%lcutm1) + 1, iatom)*vecinhlp(indx3 + 1)
......@@ -159,7 +160,7 @@ CONTAINS
iatom = iatom + 1
indx1 = indx0 + 1
indx2 = indx1 + mpdata%num_radbasfn(0, itype) - 2
vecout(hybinp%nbasp + 1) = vecout(hybinp%nbasp + 1) + dot_product(coulomb_mt2(:mpdata%num_radbasfn(0, itype) - 1, 0, maxval(hybinp%lcutm1) + 1, iatom), vecinhlp(indx1:indx2))
vecout(hybdat%nbasp + 1) = vecout(hybdat%nbasp + 1) + dot_product(coulomb_mt2(:mpdata%num_radbasfn(0, itype) - 1, 0, maxval(hybinp%lcutm1) + 1, iatom), vecinhlp(indx1:indx2))
indx0 = indx0 + ishift
END DO
......@@ -192,7 +193,7 @@ CONTAINS
indx0 = indx0 + ishift
END DO
END DO
IF (indx0 /= hybinp%nbasp) call judft_error('spmvec: error index counting (indx0)')
IF (indx0 /= hybdat%nbasp) call judft_error('spmvec: error index counting (indx0)')
END IF
CALL reorder(hybinp%nbasm(ikpt), atoms, hybinp%lcutm1, maxval(hybinp%lcutm1), &
......@@ -201,7 +202,7 @@ CONTAINS
END SUBROUTINE spmvec_invs
SUBROUTINE spmvec_noinvs(&
atoms, mpdata, hybinp,&
atoms, mpdata, hybinp, hybdat,&
ikpt, &
coulomb_mt1, coulomb_mt2, coulomb_mt3,&
coulomb_mtir, vecin,&
......@@ -214,6 +215,7 @@ CONTAINS
IMPLICIT NONE
TYPE(t_mpdata), INTENT(IN) :: mpdata
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_hybdat), INTENT(IN) :: hybdat
TYPE(t_atoms), INTENT(IN) :: atoms
! - scalars -
......@@ -314,7 +316,7 @@ CONTAINS
indx3 = indx3 + atoms%neq(itype1)*ishift1
END DO
IF (indx3 /= hybinp%nbasp) call judft_error('spmvec: error counting index indx3')
IF (indx3 /= hybdat%nbasp) call judft_error('spmvec: error counting index indx3')
vecout(indx1:indx2) = vecout(indx1:indx2) + coulomb_mt2(:mpdata%num_radbasfn(l, itype) - 1, 0, maxval(hybinp%lcutm1) + 1, iatom)*vecinhlp(indx3 + 1)
......@@ -359,7 +361,7 @@ CONTAINS
iatom = iatom + 1
indx1 = indx0 + 1
indx2 = indx1 + mpdata%num_radbasfn(0, itype) - 2
vecout(hybinp%nbasp + 1) = vecout(hybinp%nbasp + 1) + dot_product(coulomb_mt2(:mpdata%num_radbasfn(0, itype) - 1, 0, maxval(hybinp%lcutm1) + 1, iatom), vecinhlp(indx1:indx2))
vecout(hybdat%nbasp + 1) = vecout(hybdat%nbasp + 1) + dot_product(coulomb_mt2(:mpdata%num_radbasfn(0, itype) - 1, 0, maxval(hybinp%lcutm1) + 1, iatom), vecinhlp(indx1:indx2))
indx0 = indx0 + ishift
END DO
......@@ -392,7 +394,7 @@ CONTAINS
indx0 = indx0 + ishift
END DO
END DO
IF (indx0 /= hybinp%nbasp) call judft_error('spmvec: error index counting (indx0)')
IF (indx0 /= hybdat%nbasp) call judft_error('spmvec: error index counting (indx0)')
END IF
CALL reorder(hybinp%nbasm(ikpt), atoms, hybinp%lcutm1, maxval(hybinp%lcutm1), mpdata%num_radbasfn,&
......
......@@ -535,7 +535,7 @@ CONTAINS
SUBROUTINE bra_trafo2( &
l_real, vecout_r, vecin_r, vecout_c, vecin_c, &
dim, nobd, nbands, ikpt0, ikpt1, iop, sym, &
mpdata, hybinp, kpts, atoms, &
mpdata, hybinp, hybdat, kpts, atoms, &
phase)
! ikpt0 :: parent of ikpt1
......@@ -548,6 +548,7 @@ CONTAINS
IMPLICIT NONE
type(t_mpdata), intent(in) :: mpdata
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_hybdat), INTENT(IN) :: hybdat
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_atoms), INTENT(IN) :: atoms
......@@ -598,7 +599,7 @@ CONTAINS
vecin1 = vecin_r
DO i = 1, nbands
DO j = 1, nobd
CALL desymmetrize(vecin1(:hybinp%nbasp, j, i), hybinp%nbasp, 1, 1, &
CALL desymmetrize(vecin1(:hybdat%nbasp, j, i), hybdat%nbasp, 1, 1, &
atoms, hybinp%lcutm1, maxval(hybinp%lcutm1), mpdata%num_radbasfn, sym)
END DO
END DO
......@@ -727,7 +728,7 @@ CONTAINS
END IF
cdum = exp(img*tpi_const*dot_product(kpts%bkf(:, ikpt1) + g1, trans(:)))
vecout1(hybinp%nbasp + igptm, :, :) = cdum*vecin1(hybinp%nbasp + igptm2, :, :)
vecout1(hybdat%nbasp + igptm, :, :) = cdum*vecin1(hybdat%nbasp + igptm2, :, :)
END DO
deallocate(vecin1)
......
......@@ -42,7 +42,7 @@ CONTAINS
! - arrays -
COMPLEX, INTENT(OUT) :: cprod(hybinp%maxbasm1, mnobd, bandf - bandi + 1)
COMPLEX, INTENT(OUT) :: cprod(hybdat%maxbasm1, mnobd, bandf - bandi + 1)
! - local scalars -
INTEGER :: ic, l, n, l1, l2, n1, n2, lm_0, lm1_0, lm2_0, lm, lm1, lm2, m1, m2, i, j, ll
......@@ -307,7 +307,7 @@ CONTAINS
! - arrays -
INTEGER, INTENT(IN) :: parent(kpts%nkptf)
REAL, INTENT(OUT) :: cprod(hybinp%maxbasm1, mnobd, bandf - bandi + 1)
REAL, INTENT(OUT) :: cprod(hybdat%maxbasm1, mnobd, bandf - bandi + 1)
! - local scalars -
INTEGER :: i, ikpt, ic, iband, iband1, igpt, igptp, ibando, iatom, iiatom, itype, ieq, ishift, ioffset, iatom1, iatom2
......@@ -1237,7 +1237,7 @@ CONTAINS
! - arrays -
INTEGER, INTENT(IN) :: parent(kpts%nkptf)
REAL, INTENT(OUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
REAL, INTENT(OUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
! - local scalars -
INTEGER :: i, ikpt, ic, iband, iband1, igpt, igptp, ig, ig2, ig1
......@@ -2257,7 +2257,7 @@ CONTAINS
! - arrays -
COMPLEX, INTENT(OUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
COMPLEX, INTENT(OUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
! - local scalars -
INTEGER :: ic, l, n, l1, l2, n1, n2, lm_0, lm1_0, lm2_0, lm, lm1, lm2, m1, m2, i, j, ll
......
......@@ -38,7 +38,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: nkqpt
! - arrays -
REAL, INTENT(OUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
REAL, INTENT(OUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
! - local scalars -
INTEGER :: g_t(3)
......@@ -92,7 +92,7 @@ CONTAINS
INTEGER, INTENT(IN) :: nkqpt
! - arrays -
REAL, INTENT(OUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
REAL, INTENT(OUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
! - local scalars -
INTEGER :: ic, ig, ig2, ig1, ok, igptm, iigptm
......@@ -208,7 +208,7 @@ CONTAINS
INTEGER, INTENT(IN) :: nkqpt
! - arrays -
REAL, INTENT(INOUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
REAL, INTENT(INOUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
! - local scalars -
INTEGER :: i, iband
......
......@@ -29,7 +29,7 @@ CONTAINS
! - arrays -
COMPLEX, INTENT(OUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
COMPLEX, INTENT(OUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
INTEGER :: g_t(3)
REAL :: kqpt(3), kqpthlp(3)
......@@ -86,7 +86,7 @@ CONTAINS
! - arrays -
COMPLEX, INTENT(OUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
COMPLEX, INTENT(OUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
! - local scalars -
INTEGER :: ic, n1, n2
......@@ -220,7 +220,7 @@ CONTAINS
! - arrays -
COMPLEX, INTENT(INOUT) :: cprod(hybinp%maxbasm1, bandoi:bandof, bandf - bandi + 1)
COMPLEX, INTENT(INOUT) :: cprod(hybdat%maxbasm1, bandoi:bandof, bandf - bandi + 1)
! - local scalars -
INTEGER :: ic, l, n, l1, l2, n1, n2, lm_0, lm1_0, lm2_0
......
......@@ -63,7 +63,7 @@ contains
& recl=input%neig*hybdat%maxlmindx*atoms%nat*16)
#ifdef CPP_NOSPMVEC
irecl_coulomb = hybinp%maxbasm1 * (hybinp%maxbasm1+1) * 8 / 2
irecl_coulomb = hybdat%maxbasm1 * (hybdat%maxbasm1+1) * 8 / 2
if (.not.l_real) irecl_coulomb =irecl_coulomb *2
OPEN(unit=778,file='coulomb',form='unformatted',access='direct', recl=irecl_coulomb)
id_coulomb=778
......
......@@ -25,6 +25,9 @@ MODULE m_types_hybdat
INTEGER, ALLOCATABLE :: nobd(:, :)
INTEGER :: maxlmindx = -1
COMPLEX, ALLOCATABLE :: stepfunc(:,:,:)
INTEGER :: nbasp = -1
INTEGER :: max_indx_p_1 = -1
INTEGER :: maxbasm1 = -1
contains
procedure :: set_stepfunction => set_stepfunction
END TYPE t_hybdat
......
......@@ -497,19 +497,21 @@ contains
end do
end subroutine mpdata_normalize
subroutine mpdata_init(mpdata, hybinp, atoms)
subroutine mpdata_init(mpdata, hybinp, hybdat, atoms)
use m_types_setup
use m_types_hybinp
use m_types_hybdat
use m_judft
implicit none
class(t_mpdata) :: mpdata
type(t_hybinp), intent(in) :: hybinp
type(t_hybdat), intent(in) :: hybdat
type(t_atoms), intent(in) :: atoms
integer :: ok
if(.not. allocated(mpdata%l1)) then
allocate(mpdata%l1(hybinp%max_indx_p_1, 0:maxval(hybinp%lcutm1), atoms%ntype), stat=ok)
allocate(mpdata%l1(hybdat%max_indx_p_1, 0:maxval(hybinp%lcutm1), atoms%ntype), stat=ok)
if (ok /= 0) call judft_error('mpdata_init: failure allocation mpdata%l1')
allocate(mpdata%l2, mold=mpdata%l1, stat=ok)
......
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