Commit ba3caf3a authored by Matthias Redies's avatar Matthias Redies

mt_from_grid has no more nsp

parent f3069f7f
......@@ -150,17 +150,20 @@ CONTAINS
END SUBROUTINE mt_to_grid
SUBROUTINE mt_from_grid(atoms, sphhar, nsp, n, jspins, v_in, vr)
SUBROUTINE mt_from_grid(atoms, sphhar, n, jspins, v_in, vr)
IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_sphhar), INTENT(IN):: sphhar
INTEGER, INTENT(IN) :: nsp, jspins, n
INTEGER, INTENT(IN) :: jspins, n
REAL, INTENT(IN) :: v_in(:, :)
REAL, INTENT(INOUT) :: vr(:, 0:, :)
REAL :: vpot(nsp), vlh
INTEGER :: js, kt, lh, jr, nd
REAL :: vpot(atoms%nsp()), vlh
INTEGER :: js, kt, lh, jr, nd, nsp
nsp = atoms%nsp()
nd = atoms%ntypsy(SUM(atoms%neq(:n - 1)) + 1)
DO js = 1, jspins
!
kt = 0
......
......@@ -81,7 +81,7 @@ CONTAINS
den%phi_mt(imesh,n) = phi
ENDDO
den%mt(:,0:,n,:)=0.0
CALL mt_from_grid(atoms,sphhar,nsp,n,2,ch,den%mt(:,0:,n,:))
CALL mt_from_grid(atoms,sphhar,n,2,ch,den%mt(:,0:,n,:))
DO i=1,atoms%jri(n)
den%mt(i,:,n,:)=den%mt(i,:,n,:)*atoms%rmsh(i,n)**2
ENDDO
......@@ -126,7 +126,7 @@ CONTAINS
ch(imesh,4) = beff*SIN(theta)*SIN(phi)
ENDDO
vtot%mt(:,0:,n,:)=0.0
CALL mt_from_grid(atoms,sphhar,nsp,n,4,ch,vtot%mt(:,0:,n,:))
CALL mt_from_grid(atoms,sphhar,n,4,ch,vtot%mt(:,0:,n,:))
DO i=1,atoms%jri(n)
vtot%mt(i,:,n,:)=vtot%mt(i,:,n,:)*atoms%rmsh(i,n)**2
ENDDO
......
......@@ -119,8 +119,8 @@ CONTAINS
!Add postprocessing for libxc
IF (l_libxc.AND.xcpot%is_gga()) CALL libxc_postprocess_gga_mt(xcpot,atoms,sphhar,n,v_xc,grad)
CALL mt_from_grid(atoms,sphhar,nsp,n,input%jspins,v_xc,vxc%mt(:,0:,n,:))
CALL mt_from_grid(atoms,sphhar,nsp,n,input%jspins,v_x,vx%mt(:,0:,n,:))
CALL mt_from_grid(atoms,sphhar,n,input%jspins,v_xc,vxc%mt(:,0:,n,:))
CALL mt_from_grid(atoms,sphhar,n,input%jspins,v_x,vx%mt(:,0:,n,:))
IF (ALLOCATED(exc%mt)) THEN
!
......@@ -138,7 +138,7 @@ CONTAINS
nt=nt+nsp
END DO
ENDIF
CALL mt_from_grid(atoms,sphhar,nsp,n,1,e_xc,exc%mt(:,0:,n,:))
CALL mt_from_grid(atoms,sphhar,n,1,e_xc,exc%mt(:,0:,n,:))
ENDIF
ENDDO
......
......@@ -26,7 +26,7 @@ CONTAINS
ALLOCATE(vsigma(nsp,n_sigma),vsigma_mt(atoms%jri(n),0:sphhar%nlhd,n_sigma))
vsigma_mt=0.0
vsigma=TRANSPOSE(grad%vsigma) !create a (nsp,n_sigma) matrix
CALL mt_from_grid(atoms,sphhar,nsp/atoms%jmtd,n,n_sigma,vsigma,vsigma_mt)
CALL mt_from_grid(atoms,sphhar,n,n_sigma,vsigma,vsigma_mt)
DO i=1,atoms%jri(n)
vsigma_mt(i,:,:)=vsigma_mt(i,:,:)*atoms%rmsh(i,n)**2
ENDDO
......
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