Commit 0ba2cdef authored by Matthias Redies's avatar Matthias Redies

remove nsp vom mt init

parent c30b1989
......@@ -13,12 +13,12 @@ MODULE m_mt_tofrom_grid
REAL, ALLOCATABLE :: wt(:), rx(:, :), thet(:)
PUBLIC :: init_mt_grid, mt_to_grid, mt_from_grid, finish_mt_grid
CONTAINS
SUBROUTINE init_mt_grid(nsp, jspins, atoms, sphhar, xcpot, sym)
SUBROUTINE init_mt_grid(jspins, atoms, sphhar, xcpot, sym)
USE m_gaussp
USE m_lhglptg
USE m_lhglpts
IMPLICIT NONE
INTEGER, INTENT(IN) :: nsp, jspins
INTEGER, INTENT(IN) :: jspins
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_sphhar), INTENT(IN) :: sphhar
CLASS(t_xcpot), INTENT(IN) :: xcpot
......@@ -27,10 +27,10 @@ CONTAINS
! generate nspd points on a sherical shell with radius 1.0
! angular mesh equidistant in phi,
! theta are zeros of the legendre polynomials
ALLOCATE (wt(nsp), rx(3, nsp), thet(nsp))
ALLOCATE (wt(atoms%nsp()), rx(3, atoms%nsp()), thet(atoms%nsp()))
CALL gaussp(atoms%lmaxd, rx, wt)
! generate the lattice harmonics on the angular mesh
ALLOCATE (ylh(nsp, 0:sphhar%nlhd, sphhar%ntypsd))
ALLOCATE (ylh(atoms%nsp(), 0:sphhar%nlhd, sphhar%ntypsd))
IF (xcpot%needs_grad()) THEN
ALLOCATE (ylht, MOLD=ylh)
ALLOCATE (ylhtt, MOLD=ylh)
......@@ -38,10 +38,10 @@ CONTAINS
ALLOCATE (ylhff, MOLD=ylh)
ALLOCATE (ylhtf, MOLD=ylh)
CALL lhglptg(sphhar, atoms, rx, nsp, xcpot, sym, &
CALL lhglptg(sphhar, atoms, rx, atoms%nsp(), xcpot, sym, &
ylh, thet, ylht, ylhtt, ylhf, ylhff, ylhtf)
ELSE
CALL lhglpts(sphhar, atoms, rx, nsp, sym, ylh)
CALL lhglpts(sphhar, atoms, rx, atoms%nsp(), sym, ylh)
END IF
END SUBROUTINE init_mt_grid
......
......@@ -32,7 +32,7 @@ CONTAINS
den%phi_mt(nsp*atoms%jmtd,atoms%ntype))
CALL xcpot%init("vwn",.FALSE.,1)
CALL init_mt_grid(nsp,4,atoms,sphhar,xcpot,sym)
CALL init_mt_grid(4,atoms,sphhar,xcpot,sym)
DO n=1,atoms%ntype
CALL mt_to_grid(xcpot,4,atoms,sphhar,den%mt(:,0:,n,:),n,grad,ch)
DO imesh = 1,nsp*atoms%jri(n)
......@@ -110,7 +110,7 @@ CONTAINS
nsp=nsp/atoms%jmtd
CALL xcpot%init("vwn",.FALSE.,1)
CALL init_mt_grid(nsp,4,atoms,sphhar,xcpot,sym)
CALL init_mt_grid(4,atoms,sphhar,xcpot,sym)
DO n=1,atoms%ntype
CALL mt_to_grid(xcpot,4,atoms,sphhar,vtot%mt(:,0:,n,:),n,grad,ch)
DO imesh = 1,nsp*atoms%jri(n)
......
......@@ -95,7 +95,7 @@ CONTAINS
ALLOCATE(kinED_RS, mold=ch)
ENDIF
CALL init_mt_grid(nsp,input%jspins,atoms,sphhar,xcpot,sym)
CALL init_mt_grid(input%jspins,atoms,sphhar,xcpot,sym)
#ifdef CPP_MPI
n_start=mpi%irank+1
......
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